Skip to content

Commit ea4d111

Browse files
authored
Merge pull request #209 from Shopify/constraints_schema_refresh
Refresh `fulfillment_constraints` schema
2 parents fcd5bb2 + a2fb761 commit ea4d111

File tree

2 files changed

+90
-18
lines changed

2 files changed

+90
-18
lines changed

order-routing/javascript/fulfillment-constraints/default/schema.graphql

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type Attribute {
3131
}
3232

3333
"""
34-
Represents information about the buyer that is interacting with the cart.
34+
Represents information about the buyer that is interacting with the cart. Only set when the buyer is logged in.
3535
"""
3636
type BuyerIdentity {
3737
"""
@@ -2622,6 +2622,11 @@ type GateConfiguration implements HasMetafields {
26222622
"""
26232623
appId: String
26242624

2625+
"""
2626+
A non-unique string used to group gate configurations.
2627+
"""
2628+
handle: String
2629+
26252630
"""
26262631
The ID of the gate configuration.
26272632
"""
@@ -2654,7 +2659,7 @@ type GateSubject {
26542659
"""
26552660
The appId of the gate configurations to search for.
26562661
"""
2657-
appId: String
2662+
appId: String @deprecated(reason: "Use GateSubject.handle to filter gates instead.")
26582663
): GateConfiguration!
26592664

26602665
"""
@@ -2670,7 +2675,12 @@ interface HasGates {
26702675
"""
26712676
Returns active gate subjects bound to the resource.
26722677
"""
2673-
gates: [GateSubject!]!
2678+
gates(
2679+
"""
2680+
The handle of the gate configurations to search for.
2681+
"""
2682+
handle: String
2683+
): [GateSubject!]!
26742684
}
26752685

26762686
"""
@@ -2701,6 +2711,9 @@ Example value: `"gid://shopify/Product/10079785100"`
27012711
"""
27022712
scalar ID
27032713

2714+
"""
2715+
The input object for the function.
2716+
"""
27042717
type Input {
27052718
"""
27062719
The cart.
@@ -2715,7 +2728,17 @@ type Input {
27152728
"""
27162729
The locations where the inventory items on this cart are stocked.
27172730
"""
2718-
locations: [Location!]!
2731+
locations(
2732+
"""
2733+
The list of location identifiers to search for.
2734+
"""
2735+
identifiers: [String!]
2736+
2737+
"""
2738+
The list of location names to search for.
2739+
"""
2740+
names: [String!]
2741+
): [Location!]!
27192742
}
27202743

27212744
"""
@@ -2930,7 +2953,9 @@ type MoneyV2 {
29302953
}
29312954

29322955
"""
2933-
MustFulfillFrom constraints force a set of items to be fulfilled from a specified location.
2956+
Force a set of items to be fulfilled from a specified location.
2957+
If the cart item isn't stocked at the specified location, then checkout won't return any shipping rates and
2958+
completing checkout will be blocked.
29342959
"""
29352960
input MustFulfillFrom {
29362961
"""
@@ -2945,7 +2970,9 @@ input MustFulfillFrom {
29452970
}
29462971

29472972
"""
2948-
MustFulfillFromSameLocation constraints force a set of items to be fulfilled from the same location.
2973+
Force a set of items to be fulfilled from the same location.
2974+
If the cart items with constraints aren't stocked at the same location,
2975+
then checkout won't return any shipping rates and completing checkout will be blocked.
29492976
"""
29502977
input MustFulfillFromSameLocation {
29512978
"""
@@ -2974,12 +3001,16 @@ An operation to apply fulfillment constraints.
29743001
"""
29753002
input Operation @oneOf {
29763003
"""
2977-
MustFulfillFrom constraints force a set of items to be fulfilled from a specified location.
3004+
Force a set of items to be fulfilled from a specified location.
3005+
If the cart item isn't stocked at the specified location, then checkout won't return any shipping rates and
3006+
completing checkout will be blocked.
29783007
"""
29793008
mustFulfillFrom: MustFulfillFrom
29803009

29813010
"""
2982-
MustFulfillFromSameLocation constraints force a set of items to be fulfilled from the same location.
3011+
Force a set of items to be fulfilled from the same location.
3012+
If the cart items with constraints aren't stocked at the same location,
3013+
then checkout won't return any shipping rates and completing checkout will be blocked.
29833014
"""
29843015
mustFulfillFromSameLocation: MustFulfillFromSameLocation
29853016
}
@@ -2991,7 +3022,12 @@ type Product implements HasGates & HasMetafields {
29913022
"""
29923023
Returns active gate subjects bound to the resource.
29933024
"""
2994-
gates: [GateSubject!]!
3025+
gates(
3026+
"""
3027+
The handle of the gate configurations to search for.
3028+
"""
3029+
handle: String
3030+
): [GateSubject!]!
29953031

29963032
"""
29973033
A unique human-friendly string of the product's title.

order-routing/rust/fulfillment-constraints/default/schema.graphql

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type Attribute {
3131
}
3232

3333
"""
34-
Represents information about the buyer that is interacting with the cart.
34+
Represents information about the buyer that is interacting with the cart. Only set when the buyer is logged in.
3535
"""
3636
type BuyerIdentity {
3737
"""
@@ -2622,6 +2622,11 @@ type GateConfiguration implements HasMetafields {
26222622
"""
26232623
appId: String
26242624

2625+
"""
2626+
A non-unique string used to group gate configurations.
2627+
"""
2628+
handle: String
2629+
26252630
"""
26262631
The ID of the gate configuration.
26272632
"""
@@ -2654,7 +2659,7 @@ type GateSubject {
26542659
"""
26552660
The appId of the gate configurations to search for.
26562661
"""
2657-
appId: String
2662+
appId: String @deprecated(reason: "Use GateSubject.handle to filter gates instead.")
26582663
): GateConfiguration!
26592664

26602665
"""
@@ -2670,7 +2675,12 @@ interface HasGates {
26702675
"""
26712676
Returns active gate subjects bound to the resource.
26722677
"""
2673-
gates: [GateSubject!]!
2678+
gates(
2679+
"""
2680+
The handle of the gate configurations to search for.
2681+
"""
2682+
handle: String
2683+
): [GateSubject!]!
26742684
}
26752685

26762686
"""
@@ -2701,6 +2711,9 @@ Example value: `"gid://shopify/Product/10079785100"`
27012711
"""
27022712
scalar ID
27032713

2714+
"""
2715+
The input object for the function.
2716+
"""
27042717
type Input {
27052718
"""
27062719
The cart.
@@ -2715,7 +2728,17 @@ type Input {
27152728
"""
27162729
The locations where the inventory items on this cart are stocked.
27172730
"""
2718-
locations: [Location!]!
2731+
locations(
2732+
"""
2733+
The list of location identifiers to search for.
2734+
"""
2735+
identifiers: [String!]
2736+
2737+
"""
2738+
The list of location names to search for.
2739+
"""
2740+
names: [String!]
2741+
): [Location!]!
27192742
}
27202743

27212744
"""
@@ -2930,7 +2953,9 @@ type MoneyV2 {
29302953
}
29312954

29322955
"""
2933-
MustFulfillFrom constraints force a set of items to be fulfilled from a specified location.
2956+
Force a set of items to be fulfilled from a specified location.
2957+
If the cart item isn't stocked at the specified location, then checkout won't return any shipping rates and
2958+
completing checkout will be blocked.
29342959
"""
29352960
input MustFulfillFrom {
29362961
"""
@@ -2945,7 +2970,9 @@ input MustFulfillFrom {
29452970
}
29462971

29472972
"""
2948-
MustFulfillFromSameLocation constraints force a set of items to be fulfilled from the same location.
2973+
Force a set of items to be fulfilled from the same location.
2974+
If the cart items with constraints aren't stocked at the same location,
2975+
then checkout won't return any shipping rates and completing checkout will be blocked.
29492976
"""
29502977
input MustFulfillFromSameLocation {
29512978
"""
@@ -2974,12 +3001,16 @@ An operation to apply fulfillment constraints.
29743001
"""
29753002
input Operation @oneOf {
29763003
"""
2977-
MustFulfillFrom constraints force a set of items to be fulfilled from a specified location.
3004+
Force a set of items to be fulfilled from a specified location.
3005+
If the cart item isn't stocked at the specified location, then checkout won't return any shipping rates and
3006+
completing checkout will be blocked.
29783007
"""
29793008
mustFulfillFrom: MustFulfillFrom
29803009

29813010
"""
2982-
MustFulfillFromSameLocation constraints force a set of items to be fulfilled from the same location.
3011+
Force a set of items to be fulfilled from the same location.
3012+
If the cart items with constraints aren't stocked at the same location,
3013+
then checkout won't return any shipping rates and completing checkout will be blocked.
29833014
"""
29843015
mustFulfillFromSameLocation: MustFulfillFromSameLocation
29853016
}
@@ -2991,7 +3022,12 @@ type Product implements HasGates & HasMetafields {
29913022
"""
29923023
Returns active gate subjects bound to the resource.
29933024
"""
2994-
gates: [GateSubject!]!
3025+
gates(
3026+
"""
3027+
The handle of the gate configurations to search for.
3028+
"""
3029+
handle: String
3030+
): [GateSubject!]!
29953031

29963032
"""
29973033
A unique human-friendly string of the product's title.

0 commit comments

Comments
 (0)