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

Added unit tests for masked and unmodified error logging options #6795

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

bonnici
Copy link
Contributor

@bonnici bonnici commented Aug 11, 2022

Added some unit tests to cover the new error reporting options introduced in #6794. The transform case was already covered but I added two new tests for the unmodified and masked options.

@changeset-bot
Copy link

changeset-bot bot commented Aug 11, 2022

🦋 Changeset detected

Latest commit: 2e99630

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@apollo/server-integration-testsuite Patch
@apollo/server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Aug 11, 2022

Deploy Preview for apollo-server-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2e99630
🔍 Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/62f58c3e1a8f330009632ee5
😎 Deploy Preview https://deploy-preview-6795--apollo-server-docs.netlify.app/migration
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 11, 2022

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 2e99630:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

@glasser
Copy link
Member

glasser commented Aug 11, 2022

@bonnici This is great! I made two minor improvements:

  • I changed the errors to be GraphQLErrors with "extensions" so that we can see that unmodified preserves extensions and masked removes them
  • I changed one of the asserts to use toMatchInlineSnapshot, which has the advantage that if the test fails, you can run jest -u and it will update the source code to match the current version (which you can compare in git or whatever).

@glasser glasser merged commit 363fd30 into apollographql:version-4 Aug 11, 2022
@bonnici bonnici deleted the nickmarsh/error-option-tests branch September 12, 2022 06:00
@github-actions github-actions bot mentioned this pull request Oct 10, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants