Description:
Adds support for a new parameter graphql which allows specifying payloads for named GraphQL operations. Works per-story.
The decorator was updated so that each component/story renders with it's own unique prefix path to the /api/graphql endpoint, and it's handlers are registered only for that component.
Under the hood it continues to use msw with the following benefits:
Requests continue to show up in the network tab and any GraphQL browser extensions
Requests to different components can be differentiated by the unique URL
Existing msw config will continue to work, making this change backwards-compatible
This change allows for stories to display/test different GraphQL response states per story without having to rely on conditional returns and interaction
Description: Adds support for a new parameter
graphql
which allows specifying payloads for named GraphQL operations. Works per-story.The decorator was updated so that each component/story renders with it's own unique prefix path to the
/api/graphql
endpoint, and it's handlers are registered only for that component.Under the hood it continues to use
msw
with the following benefits:msw
config will continue to work, making this change backwards-compatibleThis change allows for stories to display/test different GraphQL response states per story without having to rely on conditional returns and interaction