Last active
January 3, 2020 05:08
-
-
Save dncrews/f621507faee225cec6bfb5d9e1d73993 to your computer and use it in GitHub Desktop.
Creating Order v1.1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Order { | |
id: ID! | |
productsConnection: OrderProductsConnection! | |
} | |
input OrderInput { | |
lineItems: [OrderLineItemInput!]! | |
paymentToken: String! | |
} | |
input OrderLineItemInput { | |
productId: ID! | |
quantity: Int! | |
} | |
type OrderProductsConnection { | |
edges: [OrderProductsEdge!]! | |
} | |
type OrderProductsEdge { | |
quantity: Int! | |
node: Product! | |
} | |
extend type Product @key(fields: "id") { | |
id: ID! @external | |
} | |
extend type Query { | |
order(id: ID!): Order | |
} | |
extend type Mutation { | |
orderCreate(input: OrderInput!): Order! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment