Releases: graphql/graphql-js
Releases · graphql/graphql-js
v0.5.0
This version is the first reference implementation fully compatible with GraphQL — April 2016. In addition to any relevant breaking changes from the spec, it also has made some breaking changes to its API.
Thanks so much to those who contributed issues and pull requests for your help in improving GraphQL!
Breaking:
- The
graphql
andexecute
functions now accept acontext
parameter which is distinct fromrootValue
and available as the third argument to allresolve
functions. The additional information is now the fourth argument toresolve
functions. Anyresolve
function which currently uses the third argument will need to be updated in order to use this version of graphql-js. (#326) - Types can now be explicitly provided to
new GraphQLSchema({ types: [...] })
. Types which implement an interface but are otherwise not referenced as a field return type are no longer automatically added to the Schema! Provide types like this directly tonew GraphQLSchema
to ensure they are included in order to use this version of graphql-js. This fixes a long-standing bug which made it difficult to build multiple related Schema with the same type instances. (#327) - Spec compliance: Directives are now defined and introspected with an array of locations they can be legally placed, rather than a set of booleans. (#317)
New:
- Spec compliance: Overlapping fields must have compatible response shapes (c034de9)
- More support for the experimental schema IDL: (#325) (#323) (fdafe32)
Fixes:
- Spec compliance:
@skip
and@include
are now commutative. (#335) (47f87fa) - Experimental schema IDL no longer allows duplicate query types. (ffe76c5)
- No longer sends incorrect error messages when a response name is not provided (#319)
- Visitor now correctly encounters both
enter
andleave
when editing the root node in an AST (#298) - Visitor helpers are now directly exported (5ea2ff1)
v0.5.0-beta.1
Many breaking changes which have been planned for some time were introduced in the last few weeks. This beta release should help you test support. A full description of changes will be outlined in the final release, please refer to the commit history for detailed information.
v0.4.18
v0.4.17
v0.4.16
v0.4.15
New:
- The full GraphQL API is now exported from the top module. If you're building a tool that uses GraphQL.js, hopefully this makes it easier to import and use utilities in this library. (4547904)
- Clearer error messages:
- When a requested field cannot be found on an interface or union, we'll suggest an inline fragment. (#282)
- When a variable isn't used, we'll include the name of the query that defined it.
- When a field typed as
List
returns something that is not a list, the error will include the name of the type and field. (#276) - When an input type includes unknown information, ensure it's name is printed. (#261)
v0.4.14
New:
- Original errors can now be retrieved from any GraphQLError with
error.originalError
#251. visitWithTypeInfo
now supports visitors which edit or break-early.visitInParallel
now experimentally supports visitors which edit or break-early.
Fixes:
- No longer allows 52-bit integers, instead requiring 32-bit values as per the spec.
- No more false-positive validation errors when validating a query which contains experimental type definitions #255.
visitInParallel
now correctly skips subtrees when a visitor returns false #254.- Release now uses babel-runtime again, broken in 0.4.13, #246.
v0.4.13
New:
import { extendSchema } from 'graphql/utilities
allows extending an existing schema with the GraphQL type definition language (#227)- When an Object type implements an Interface type, a field on the Object type can return a more specific type than the same field defined on the Interface type. This "covariant return types" is now also defined in the GraphQL Spec (#239)
- Loosens the rule which requires overlapping fields to be unambiguously merged in the case that two same-named fields are statically known to not overlap due to being conditional to different types. This rule change has also been reflected in the GraphQL Spec (#229)
- Removes the rule which requires overlapping fields to have equivalent directives. This rule change has also been reflected in the GraphQL Spec (#230)
- Validation now ~25-30x faster due to a number of improvements including simplifications, algorithm improvements, memoization, and running validation rules in parallel.
- Parallelizing rules will change the order in which validation errors are reported within a file.
Fixes:
- Fixes issues when used in a Babel 6 environment (#228)
- Validation error of incorrect variable placement now includes a reference to the variable definition for easier debugging.
- Validation errors of ambiguous overlapping fields now includes clearer non-interleaved references to the overlapping fields.
- Input object validation errors now include more accurate error messages documenting which input object field contains the error (#204)