For misspelled enums or field names, these suggestions can be helpful.
This also changes the suggestions algorithm to better detect case-sensitivity mistakes, which are common
ref: graphql/graphql-js#1153
This generalizes the "arguments of correct type" and "default values of correct type" to a single rule "values of correct type" which has been re-written to rely on a traversal rather than the utility function `isValidLiteralValue`. To reduce breaking scope, this does not remove that utility even though it's no longer used directly within the library. Since the default values rule included another validation rule that rule was renamed to a more apt "variable default value allowed".
This also includes the original errors from custom scalars in the validation error output, solving the remainder of graphql/graphql-js#821.
ref: graphql/graphql-js#1144
This includes:
graphql/graphql-js#1147graphql/graphql-js#355
This also fixes two bugs in the Schema
- types that were not found where still added to the typeMap
- InputObject args should not be searched for types.
There are possibilities for errors during validation if a schema is not valid when provided to TypeInfo. Most checks for validity existed, but some did not. This asks flow to make those checks required and adds the remaining ones. Important now that we allow construction of invalid schema.
ref: graphql/graphql-js#1143
This is a fairly major refactoring of coerceValue which returns an Either so it can return a complete collection of errors. This allows originalError to be preserved for scalar coercion errors and ensures *all* errors are represented in the response.
This had a minor change to the logic in execute / subscribe to allow for buildExecutionContext to abrupt complete with multiple errors.
ref: graphql/graphql-js#1133
If a GraphQLError represents multiple nodes across files (could happen for validation across multiple parsed files) then the reported locations and printError output can be incorrect for the second node. This ensures locations are derived from nodes whenever possible to get correct location and amends comment documentation.
ref: graphql/graphql-js#1131