How can I mock a graphql subscription like we do with mockGraphQLMutation
or mockGraphQLQuery
.
I have been searchn how but I don’t find anything. Does RW provide a helper for this on Realtime package?
Thank you
How can I mock a graphql subscription like we do with mockGraphQLMutation
or mockGraphQLQuery
.
I have been searchn how but I don’t find anything. Does RW provide a helper for this on Realtime package?
Thank you
No See here for the currently available request mock implementations: redwood/packages/testing/src/web/mockRequests.ts at main · redwoodjs/redwood · GitHub
These mocks are based on Mock Service Worker V1, which doesn’t support subscription mocking: graphql - Api - Mock Service Worker Docs
It looks like the current MSW (V2) doesn’t support subscriptions either, though: graphql - Mock Service Worker