Releases: graphql/graphql-js
v0.9.0
New:
- Added isNamedType() and assertNamedType() #589
- Default field resolvers now get full execution info as a third argument #615
- ObjectType.isTypeOf() and InterfaceType.resolveType() may now return Promises #631
- Support and fixes for flow type v0.38 #671
- Added TypeInfo.getEnumValue() and EnumType.getValue(name) #674
- Added findDeprecatedUsages() #676
Fixes:
- Enforce spec that no non-meta field may start with "__" #600 (Potentially breaking for existing non-compliant uses).
- isValidJSValue() reports if coercion results in error #602
- Executor throws friendlier error if no document is provided #614
- Fixed import circular dependency, improving compressed builds #644
v0.8.2
v0.8.1
v0.8.0
GraphQL.js v0.8.0 is now compliant with the most recent version of the GraphQL specification! This release is also the first to include flow types in the NPM package, which should make it easier to use GraphQL in a well typed way. It also includes many new utilities and small improvements. Thanks to everyone who helped with this release!
Breaking & Spec Changes:
- A resolve function's
info.path
value is now a Linked List instead of an Array (#562) - A resolve function's
info.fieldASTs
value has been renamed toinfo.fieldNodes
(#554) formatError
now includes the path of field errors (#561)- The most recent version of the GraphQL specification is more strict about field argument validation. (#553)
- The most recent version of the GraphQL specification does not allow multiple directives of the same name in the same location (#552)
New:
- GraphQL now supports a literal
null
value as a field argument. (#544) - Flow type definitions are now included in the NPM package! The names of many types were changed to be more descriptive. (#554, #526, #412)
printType
lets you print a single GraphQL type using the experimental schema language (#558)defaultResolver
, the field resolver used when one is not provided, is now available (#527)
v0.7.2
v0.7.1
New:
- Adds
parseType
method, which allows for parsing type references independently of whole GraphQL documents (#506) - Adds
isDeprecated
field to type definition API, making it easier to use within tools (#496 @asiandrummer)
Fixes:
- Allows GraphQL Errors to be configurable, fixing compatibility issues with Bluebird Promises (#505 @darthtrevino)
- Fix bug where locations go missing when the error comes from something at the beginning of the file (#487 @martijnwalraven)
- Supports Promises-A (in addition to Promises-A+) which improves support with older libraries (#481)
- No longer accept empty string as a valid Int/Float value. (#477 @robzhu)
- Provide clearer error message when variables are provided as an unparsed string. (f2f3db5)
v0.7.0
Thanks to many contributors, GraphQL v0.7.0 contains many improvements and a few new utilities for those building tools using graphql-js.
Most exciting is that the schema language is now more fully featured than ever and you can create new usable schemas directly from that language, making GraphQL easier to use than ever. Huge thanks to @lacker for his vision and effort in making this happen.
Breaking:
- Default resolver behavior now provides
args
andcontext
, allowing for more powerful resolvers on your existing data objects (#468 @lacker) - GraphQLError has been refactored to provide more information and behave more like the built-in Error object (8df7894)
New:
- GraphQL schema documents can now specify descriptions via doc-block style comments (#463 #464)
- Schema language documents no longer have to specify a
schema
declaration if their root types are namedQuery
andMutation
(#470) - GraphQLSchema generated by referencing introspection, read from a schema language document, or extending an existing schema can now be used for execution (#469)
New Utilities:
buildSchema()
is a utility for creating a usable GraphQLSchema directly from the GraphQL schema language (#471 @lacker)separateOperations()
is a utility for splitting up a GraphQL document with many operations into multiple smaller documents with one operation each (#456)
Fixed:
v0.6.2
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
orFloat
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
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:
v0.6.0
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: