Skip to content

Handle user-specified schema more defensively.#3462

Merged
abernix merged 5 commits into
masterfrom
trevor/schema-config-errors
Nov 13, 2019
Merged

Handle user-specified schema more defensively.#3462
abernix merged 5 commits into
masterfrom
trevor/schema-config-errors

Conversation

@trevor-scheer

Copy link
Copy Markdown
Contributor
  • 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)

@trevor-scheer trevor-scheer requested a review from abernix November 1, 2019 18:17
* 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
@trevor-scheer trevor-scheer force-pushed the trevor/schema-config-errors branch from dc4831e to f20c5df Compare November 1, 2019 18:28
Comment thread packages/apollo-server-core/src/ApolloServer.ts Outdated
Comment thread packages/apollo-server-core/src/ApolloServer.ts Outdated
@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
Copy Markdown
Contributor 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.

2 participants