diff --git a/io/specmatic/examples/store/graphql/products_bff.graphqls b/io/specmatic/examples/store/graphql/products_bff.graphqls index 5d2def1..524bb56 100644 --- a/io/specmatic/examples/store/graphql/products_bff.graphqls +++ b/io/specmatic/examples/store/graphql/products_bff.graphqls @@ -12,12 +12,20 @@ enum ProductType { type Query { findAvailableProducts(type: ProductType!, pageSize: Int): [Product!]! + getDispatchedProductByDate(date: Date!): DispatchedProduct! } type Mutation { createProduct(newProduct: NewProductInput!): Product } +scalar Date + +type DispatchedProduct { + id: String! + dispatchDate: Date! +} + type Product { id: ID! name: String! diff --git a/io/specmatic/examples/store/graphql/products_bff_examples/getDispatchedProductByDate.md b/io/specmatic/examples/store/graphql/products_bff_examples/getDispatchedProductByDate.md new file mode 100644 index 0000000..4cfed02 --- /dev/null +++ b/io/specmatic/examples/store/graphql/products_bff_examples/getDispatchedProductByDate.md @@ -0,0 +1,18 @@ +# Get dispatched product by date + +Request + +```graphql +query { + getDispatchedProductByDate(date: "2020/12/12") { id, dispatchDate } +} +``` + +Response + +```json +{ + "id": "100", + "dispatchDate": "2020/12/12" +} +```