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

override equals method for TypedGraphQLError #702

Merged
merged 2 commits into from Nov 2, 2021

Conversation

clandry94
Copy link
Contributor

@clandry94 clandry94 commented Oct 20, 2021

Pull request checklist

  • Please read our contributor guide
  • Consider creating a discussion on the discussion forum
    first
  • Make sure the PR doesn't introduce backward compatibility issues
  • Make sure to have sufficient test cases

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Changes in this PR

Describe the new behavior from this PR, and why it's needed
Closes #700
cc @srinivasankavitha

Overrides the default equals method to compare TypedGraphQLErrors using the same fields outputted when toString() is called. This is helpful for users of the framework in their test environments and ensuring that error responses are semantically equal without needing to call toString() first.

Alternatives considered

Describe alternative implementation you have considered

@berngp berngp merged commit b4bfa3e into Netflix:master Nov 2, 2021
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.

bug: TypedGraphQLError that have equal fields do not pass with equals()
3 participants