-
Notifications
You must be signed in to change notification settings - Fork 12
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphql keeps pending #4
Comments
nvm, I don't much time, hardcode to skip catching |
Hey, @viiiprock. You should be using MSW for API mocking. As the readme of this repository states, it's designed primarily for introspection and complex scenarios, like dockerized applications. Your case, based on the info you've provided, is neither and should use MSW directly. It can intercept and mock GraphQL operations without issues. |
@kettanaito the truth is I still need a graphql mock server using MSW since my project is in NX mono-repo with separate admin site and web site. |
@viiiprock, I'd be happy to look into your issue if you provide a reproduction repository. |
@kettanaito here is my demo https://github.com/viiiprock/nx-msw |
Is their any update on this? If the middleware doesn't respect graphql mockiing, then it should really be taken out of the docs, or a footnote saying it can only be used in a standalone server, which is not what express middleware implies |
See mswjs/msw-storybook-addon#55 (comment) |
I tried to setup
http-middleware
with graphql as bothcreateServer
orcreateMiddleware
as the document, but it only works withrest
I don't know if I'm missing something or it's an issue. Can I have an example with graphql?
Note: I used
msw
for my nextjs, but since I had/pages/[...slug].tsx
, it had issue withgraphql
endpoint, so I have to find another solution, seemshttp-middleware
is what I'm looking for.The text was updated successfully, but these errors were encountered: