Skip to content

Releases: graphql/graphql-js

v0.6.2

21 Jul 20:53
Compare
Choose a tag to compare

Thanks to the excellent contributions from community members both in the form
of code, careful review, and thoughtful discussion. This version of GraphQL
fixes a handful of issues

New:

  • Union type definitions may now accept list of possible Types as a "thunk". (#436 @ekosz)
  • List fields can now return any iterable collection, not limited to Array, including Backbone.Collection, or Immutable.js Lists. (#449, #300 @mwschall)

Fixed:

  • Ensure source code is only ASCII. (#429 @kassens)
  • astFromValue() now requires a Type as a second parameter and properly serializes Enums with different internal values. (#435 @nodkz)
  • GraphQLError.stack is now a writable property, fixing issues in Bluebird and other libraries which use a brand-check for Error. (#439 @alexturek)
  • GraphQLError.message, GraphQLError.locations, and GraphQLError.path are now enumerable properties, which means JSON.stringify() will now produce a value which is compliant with the GraphQL spec. (#426 @bnewtonius)
  • Field errors are now thrown when values are resolved for fields typed Int or Float which are not representable by those types, improving debugability and spec compliance. (#391 @stubailo)
  • Errors during field value completion (e.g. a value returned of an incorrect type) now include location information. (#445)

v0.6.1

06 Jul 23:07
Compare
Choose a tag to compare

Builds on npm are now smaller and dependency-free! This should make graphql easier to use in clients like Apollo and Relay.

New:

  • Execution errors now include a path property indicating the position in the response which produced the error. (#396)

Fixes:

  • No longer causes issues when included in a React Native project. (#414)
  • Better error reporting in edge cases thanks to improved Flow error checking. (c7700f2)

v0.6.0

10 May 22:08
Compare
Choose a tag to compare

This version introduces directives to the (still experimental) schema language and introduces a @deprecated directive for marking deprecated fields. It also improves validation error messages, thanks to @yuzhi and @robzhu.

New:

  • Schema Language Directives (#376, #382)
  • New @deprecated directive (#384)
  • Directive constructor and built-ins are now exported from the main module (#381)
  • Introspection types are now exported from the main module (71b6a4a)
  • Validation: improving overlapping fields quality, may detect new issues (#386)
  • Improve validation error message when field names conflict (#363)
  • Include possible names when validation fails (#355)
  • Error logging for new interface type semantics (#350)

Fixes:

  • Deepen introspection query from 3 levels to 7 (#364)
  • Printer now correct prints empty block lists (ea5b241)
  • Ensure buildASTSchema does not exclude @skip and @include (#380)

v0.5.0

08 Apr 02:01
Compare
Choose a tag to compare

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)

v0.5.0-beta.1

05 Apr 05:17
Compare
Choose a tag to compare

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

09 Mar 02:26
Compare
Choose a tag to compare

New:

  • Adds validator to ensure variable names are unique (#296)

v0.4.17

09 Feb 08:26
Compare
Choose a tag to compare

Fixes:

  • Fix a case where the AST printer could erroneously exclude information from anonymous operations (#289)

v0.4.16

03 Feb 06:04
Compare
Choose a tag to compare

New:

  • Utilities for comparing GraphQL types are now exported directly. (aff18e6)

Fixes:

  • No longer parses documents which contain u2028 or u2029 characters, to comply with the spec. This is technically breaking, but these are so rare that I doubt anyone will encounter this.

v0.4.15

03 Feb 01:24
Compare
Choose a tag to compare

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

01 Dec 08:19
Compare
Choose a tag to compare

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.