Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Report
defaultValuein introspection as a GraphQL literal #625New 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: reflection-type-comparison
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Report
defaultValuein introspection as a GraphQL literal #625Changes from 1 commit
74d5c625e95032File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
The `defaultValue` of `__InputValue` is a GraphQL-formatted string, but the schema serialized the default value to JSON with its `JsonOptions`, which is a valid GraphQL literal only by chance: an enum value became its .NET value, such as `{"Case":"Local"}` for an F# union case, the keys of an input object were quoted, and the output coercion of a scalar was skipped. Clients that build a schema from introspection, like graphql-js `buildClientSchema`, parse every `defaultValue` and failed on it. The new internal `ValueLiterals` module prints a value by its input type, like `astFromValue` and `print` of graphql-js: * an enum value as the name of its `EnumValue`; * a scalar value as its output coercion serializes it: numbers, booleans and escaped strings directly, and any other type, like a date, a GUID or a URI, the way the JSON options of the schema serialize it; * a list with every item printed by the item type, and a single value as that item, which input coercion accepts in place of a list; * an input object with the GraphQL names of its fields, read through the properties the fields bind to, leaving the skipped skippable fields out; * an `option` or `voption` unwrapped, and a missing one as `null`. A default value without a GraphQL literal, such as a value outside of its enum, a `NaN` float, a value its scalar cannot serialize or an input object without a property for one of its fields, is not reported, while its input stays nullable. Printing never throws, because the introspected schema backs the validation of every request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.