-
Notifications
You must be signed in to change notification settings - Fork 2k
Unify InputValueConfig in schema definition #3067
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
base: next
Are you sure you want to change the base?
Conversation
4b7897b
to
c853294
Compare
c853294
to
1d87c02
Compare
Defines a central `GraphQLInputValueConfig` and `GraphQLInputValue` as well as single definitions for converting between them, unifying this common functionality between input values and arguments. This is a pre-req for #3049
1d87c02
to
9830fda
Compare
Depends on #3067 Removes `valueFromAST()` and adds `coerceInputLiteral()` as an additional export from `coerceInputValue`. The implementation is almost exactly the same as `valueFromAST()` with a slightly more strict type signature and refactored tests to improve coverage (the file unit test has 100% coverage) While this does not change any behavior, it could be breaking if you rely directly on the valueFromAST() method. Use `coerceInputLiteral()` as a direct replacement.
Depends on #3067 Removes `valueFromAST()` and adds `coerceInputLiteral()` as an additional export from `coerceInputValue`. The implementation is almost exactly the same as `valueFromAST()` with a slightly more strict type signature and refactored tests to improve coverage (the file unit test has 100% coverage) While this does not change any behavior, it could be breaking if you rely directly on the valueFromAST() method. Use `coerceInputLiteral()` as a direct replacement.
Depends on #3067 Removes `valueFromAST()` and adds `coerceInputLiteral()` as an additional export from `coerceInputValue`. The implementation is almost exactly the same as `valueFromAST()` with a slightly more strict type signature and refactored tests to improve coverage (the file unit test has 100% coverage) While this does not change any behavior, it could be breaking if you rely directly on the valueFromAST() method. Use `coerceInputLiteral()` as a direct replacement.
Depends on #3067 Removes `valueFromAST()` and adds `coerceInputLiteral()` as an additional export from `coerceInputValue`. The implementation is almost exactly the same as `valueFromAST()` with a slightly more strict type signature and refactored tests to improve coverage (the file unit test has 100% coverage) While this does not change any behavior, it could be breaking if you rely directly on the valueFromAST() method. Use `coerceInputLiteral()` as a direct replacement.
Taking this out of the stack for now. When working on rebasing, I found it not necessarily needed. |
Noting that this PR stills adds a bit more sanity to the code base, and can still be considered separately. When rebasing this PR on main, we will have to consider how/whether to generalize GraphQLInputValue to include GraphQLVariableSignature, which was added to support fragment spread argument/fragment definition variables. |
Depends on #3059
Defines a central
GraphQLInputValueConfig
andGraphQLInputValue
as well as single definitions for converting between them, unifying this common functionality between input values and arguments.This is a pre-req for #3049, as it means we now have a single authority for how
defaultValue
is defined, as that is a property ofInputValue