Changes to the GraphQL package are listed here. Releases follow semantic versioning.
- Support for "extensions" field on returned GraphQL errors.
- ggqlgen no longer requires input files to be in a dependent order when generating stubs.
- Bump Go version to 1.16.
- ParseFS method to Root which allows parsing GraphQL schema from an fs.FS.
- Race condition when concurrently resolving executables using reflection.
- Race condition when concurrently resolving executables.
- Reference were not replaced on input field directives.
- Reference were not replaced on field directives.
- Validation bug when checking an object's list/non-null field argument matches the type defined by the interface the object is implementing.
- Validation bug where an object field type is a Non-Null variant of a valid sub-type of the interface field type the object is implementing.
- Infinite loop in parser when enum contains singular invalid enum value name.
- Name validation on fields, arguments, enums/values
- An error on sending events now unsubscribes a subscriber.
- Added a WebSocket example.
- List in complex types are now extracted.
- Complex input objects that are registered are now created and placed in the args.
- Field.String() would fail on nil arguments. Fixed.
- Errors on coercing input type from variables now include the path to the error.
- Relaxed flag added to allow a string to be converted to an enum on input coercion.
- A Float64 type was added.
-
Coerce bug for Ints fixed to deal with the golang JSON parser that makes all numbers float64 even if they are integers.
-
Null input bug fixed that did not allow missing input elements even if they were no non-null.
First release
- License file.
- ggqlgen can now take multiple files for input.
- Arguments for ggqlgen have changed to support multiple files.
- Updated golang version to 1.14. No other changes.
- nil is now returned with coerce errors instead of the original value.
- null is now allowed for scalar types.
- Negative numbers were marked as invalid.
- Float Scalar correctly converts int64 to Float which occurs when using JSON input.
-
scalar Time docstring updated.
-
Allow null input Time.
- Use of Unions and the @go directive fixed.
- Non-Null Enum values were not checked correct but are now.
- Fixed empty value bug that could cause infinite looping on invalid queries.
- Executable parse bug that caused a hang on extra characters is fixed.
- ggqlgen can now use .go files as input, given the right conditions (see ggqlgen usage)
- Check for null values in non-null list arguments.
- CORS headers added to example to allow use with GraphiQL.
- Check enum argument values.
Input checks
-
Additional input validation is now performed.
-
Input argument coercion performed in all cases.
List nil check
- Empty lists like argList now check for a nil dictionary.
Nested errors
- A
ggql.Errors
returned from a Resolve call is now flattened so it appears correctly in results.
Validation error locations
- Add line and column to all schema validation errors.
Stub generation
- Code generation for stubs and embedded schema SDL.
-
ofType
for NON_NULL and LIST now returns a Type instead ofnull
. -
Maybe not a bug fix but the @deprecated directive now has a double quoted default value to match expectations from GraphiQL. This is a special case and no other string values are double quoted.
Error handling
-
Allow multiple errors in return as well as partial data.
-
Include location and path in errors.
Time output should be a string.
- TimeScalar CoerceOut now outputs an RFC3339 string.
Better input validation.
- Additional type and coercion checks on input variables.
-
Empty field names in a query now cause an error.
-
Descriptions don't carry over to subsequent types.
Exclude default types.
- When creating a new root the
Time
andInt64
types can be excluded thereby allowing those type names to be implemented differently than the default.
Time handled better.
- TimeScalar now accepts time.Time.
Bug fixes.
-
Empty optional bug fixed.
-
Trim multi line documentation strings when parsing and format properly in output. Issue #15
-
Parsing HTTP POST requests no longer misses the last character which is read but also returns and EOF error on HTTP Body Readers. Issue #14
-
Variable substitution now is correct replaced in list as object instead of just scalars.