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

Error: Currently only support fetch(url, options), saw fetch(Request) #76

Open
MarkLyck opened this issue May 21, 2022 · 0 comments
Open

Comments

@MarkLyck
Copy link

I'm getting the following error when using cypress-graphql-mock with @apollo-client

It seems like it doesn't support the standard way @apollo-client makes fetch requests?

Please consider adding support for this.

I tried adding a very quick test myself to see how difficult it is to stub, but it seems straight forward? Even something as simple as this works:

  function fetchStub(path, request) {
    if (request && request.body) {
      // Using operation name of the request to look for response mock data
      const { operationName }  = JSON.parse(request.body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant