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)