Skip to content

Commit

Permalink
Add getDispatchedProductByDate query in products_bff.graphqls
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshnikam671 committed Aug 16, 2024
1 parent 28b6107 commit 1a3ba80
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions io/specmatic/examples/store/graphql/products_bff.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
```

0 comments on commit 1a3ba80

Please sign in to comment.