Skip to content

v0.5.0

Compare
Choose a tag to compare
@leebyron leebyron released this 08 Apr 02:01
· 2569 commits to 16.x.x since this release

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 and execute functions now accept a context parameter which is distinct from rootValue and available as the third argument to all resolve functions. The additional information is now the fourth argument to resolve functions. Any resolve 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 to new 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 and leave when editing the root node in an AST (#298)
  • Visitor helpers are now directly exported (5ea2ff1)