Last active
January 3, 2020 05:00
-
-
Save dncrews/c1b124a93476df0efc4c45ee1436bd49 to your computer and use it in GitHub Desktop.
Simple E-Commerce v1.0.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 Inventory { | |
total: Int! | |
available: Int! | |
} | |
extend type Product @key(fields: "id") { | |
id: ID! @external | |
inventory: Inventory! | |
} | |
input ProductAddInventoryInput { | |
productId: ID! | |
quantityToAdd: Int! | |
} | |
extend type Mutation { | |
productAddInventory(input: ProductAddInventoryInput): Product! | |
} |
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
extend type Query { | |
product(id: ID!): Product | |
} | |
type Product @key(fields: "id") { | |
id: ID! | |
name: String! | |
} | |
input ProductCreateInput { | |
name: String! | |
} | |
extend type Mutation { | |
productCreate(input: ProductCreateInput): Product! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment