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

Handle user-specified schema more defensively. #3462

Merged
merged 5 commits into from
Nov 13, 2019

Conversation

trevor-scheer
Copy link
Member

  • Use the isSchema predicate instead of instanceof checks
  • Create a final else case for unexpected results of the _schema variable
  • Add tests around AS Base constructor to validate previous and new behavior

Addresses the issue that arose in #3381
Taking recommendation from: #3381 (comment)

* Use the isSchema predicate instead of instanceof checks
* Create a final `else` case for unexpected results of the _schema variable
* Add tests around AS Base constructor to validate previous and new behavior
packages/apollo-server-core/src/ApolloServer.ts Outdated Show resolved Hide resolved
packages/apollo-server-core/src/ApolloServer.ts Outdated Show resolved Hide resolved
@abernix abernix changed the title Handle _schema possible types more carefully Handle user-specified schema more defensively. Nov 13, 2019
@abernix abernix merged commit 04fe6aa into master Nov 13, 2019
@abernix abernix deleted the trevor/schema-config-errors branch November 13, 2019 15:11
@trevor-scheer
Copy link
Member Author

Thank you for wrapping this up, @abernix! ❤️

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 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