Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 481 Bytes

README.md

File metadata and controls

22 lines (20 loc) · 481 Bytes

Query in Graphiql

{ products }

Mutation in Graphiql

mutation ($in: ProductInput!) { addNewProduct(product: $in) { name code vendor sku price status quantity addedOn addedBy } }

curl http://localhost:3000 -H 'content-type: application/json' -d '{"query":"{ products { name vendor } }"}' curl http://localhost:3000 -H 'content-type: application/json' -d '{"query":"{ product (code: "iphone8") { name vendor price quantity } }"}'