github graphql/graphql-spec April2016
April 2016

latest releases: October2021, June2018, July2015...
8 years ago

http://facebook.github.io/graphql/April2016/

GraphQL is still an active working draft specification. As GraphQL is used by more teams in more environments it continues to improve. This milestone represents the most up to date version of the GraphQL specification for those building GraphQL services.

Most of the changes since the October 2015 edition have been clarifying edits and fixing small mistakes, however there have been notable additions, changes, and clarifications.

A huge thanks to all community members who submitted pull requests and reported issues that lead to these improvements!

Breaking:

  • Introspection of Directives now queries for a locations Enum instead of onField, onOperation, onFragment booleans. (1c38e6a)
  • The @skip and @include directives are no longer allowed to be used directly on Fragment Definitions. (1c38e6a)

Changes:

  • The order of fields in the response is now well defined by the query. (d4b4e67)
  • Implementation of an interface allows for additional field arguments, provided that those arguments are not required. (5741ea7)
  • Implementation of an interface allows for a covariant rather than invariant return type. (0b4fd58)
  • Directives are allowed to be different on overlapping fields. (6a639da)
  • Two overlapping fields which can never be queried on the same object are allowed to have different arguments. (6a639da)
  • Two overlapping fields must have compatible response shapes rather than equal return types. (d481d17)
  • An operation must not define two variables of the same name. (89475ac)

Clarifications:

  • Better explanation for when validation must occur, including support for memoizing the result of validation before execution. (1feb562)
  • Provided variable values need to be coerced before execution. (ffbb14e)
  • When @skip and @include directives are both used, one does not have precedence over the other. (914c62a)
  • Overlapping field validation is recursive. (14c93e8)
  • When a non-null field throws an error, that error is propagated. (c589e2e)

Don't miss a new graphql-spec release

NewReleases is sending notifications on new releases.