Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs about Shipping events #1464

Merged
merged 3 commits into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions docs/developer/extending/webhooks/synchronous-events/shipping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ shipping methods are queried for a checkout object.
}
```

:::warning
Due to circular reference, subscription queries should not contain fields:

- `checkout.shippingMethods`
- `checkout.deliveryMethod`
Comment on lines +53 to +54
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

below in docs you mentioned order fields too, I guess it should be mentioned?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is SHIPPING_LIST_METHODS_FOR_CHECKOUT event so it won't be order here - Saleor don't yet have SHIPPING_LIST_METHODS_FOR_ORDER 😞


Instead fetch checkout via GraphQL query with those fields if you need them in your webhook handling logic.

:::

#### Request format

This is an example response from the application:
Expand Down Expand Up @@ -223,9 +233,10 @@ Saleor Apps can subscribe to the synchronous webhooks:
:::warning
Due to circular reference, subscription queries should not contain fields:

- `checkout.shippingMethods`,
- `checkout.deliveryMethods`,
- `order.shippingMethods`.
- `checkout.shippingMethods`
- `checkout.deliveryMethod`
- `order.shippingMethods`
- `order.deliveryMethod`

:::

Expand Down Expand Up @@ -420,4 +431,4 @@ as every single synchronous webhook affects the response time of your Saleor API

### Community resources

- [Demo shipping app](https://github.com/krzysztofzuraw/dummy-shipping-app)
- [Demo shipping app](https://github.com/saleor/dummy-shipping-app)