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

test(graphql): add test on anonymous operation warning #1693

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Aug 8, 2023

  • Adds a missing test that MSW should warn when capturing an anonymous GraphQL operation that doesn't have a corresponding graphql.operation() handler.
  • Improves the request handler's header for anonymous GraphQL operations when printing them in the unhandled request warning/error: anonymous query|mutation (method url) (previously, query|mutation undefined (method url).

What ends up happening now, is that we display the warning even if the user has a permissive graphql.operation() handler in place, which makes no sense.

@kettanaito kettanaito mentioned this pull request Aug 8, 2023
34 tasks
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 8, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ff04927:

Sandbox Source
MSW React Configuration

@kettanaito kettanaito changed the title test(graphql): anonymous operation warning test(graphql): add test on anonymous operation warning Aug 18, 2023
@kettanaito kettanaito merged commit bb02e57 into feat/standard-api Aug 18, 2023
11 checks passed
@kettanaito kettanaito deleted the fix/anonymous-gql-warnings branch August 18, 2023 20:16
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

Successfully merging this pull request may close these issues.

1 participant