Releases: graphql/graphql-js
Releases · graphql/graphql-js
v0.4.1
New/Breaking:
- Asserts that the GraphQLSchema and GraphQLType types are properly
constructed, following the "validation" rules defined in the GraphQL Spec- Asserts that Objects which claim to implement an Interface actually do.
- Schema asserts that all included types have unique names.
- Clearer error messages when incorrect type used in GraphQLType constructors, including List and NonNull type constructors.
- Asserts that Scalar definitions include serialization functions.
- Removal of the
graphql/type/validationsubmodule.
- Asserts that the runtime Object type result of an Interface or Union typed
field is a type is a possible type of that Interface or Union. - EnumType.getValues() now returns an Array.
Fixes:
- Correctly parse Enum values from variables. #123
v0.3.0
Breaking/New:
isTypeOfis now called (if defined) to assert that GraphQL object types are executing against the correct values #38- Field
resolvefunctions now have a new API:resolve(value, args, info), whereinfois an object which contains the same information which used to be separate arguments, and includes more useful stuff! https://github.com/graphql/graphql-js/blob/master/src/type/definition.js#L359 graphql()no longer formats its errors.result.errorsis now a list ofGraphQLErrorinstances, which provides useful information including stack traces.- Arguments and Input Object Fields not provided are not set on the internal JS objects. The previous behavior was to set
nullfor these arguments and fields. - Scalar definition
coerceandcoerceLiteralhave been renamed toserializeandparseLiteralrespectively. - Scalar definitions may now define
parseValuewhich is used when interpreting variable values of that type. Previouslycoercewas being reused for this purpose.
Fixed:
- Nested input objects are no longer excluded by introspection.
- Fix issue where a fragment spread with missing definition breaks the validator.
v0.2.6
New:
- Adds all validation rules for uniqueness recently added to the GraphQL spec.
Fixed:
- formatError is exported directly from
graphql. - One validation error no longer causes spurious failures of other validations.
- Directive arguments no longer incorrectly invalidate.
- Validation errors have slightly improved messages.
v0.2.5
v0.2.4
0.2.3
v0.2.3
v0.2.2
Fixes:
- Fix case reported by @steveluscher where overlapping fragments could incorrectly invalidate.
v0.2.1
v0.2.0
New:
- Flow types are included in the npm release in the form of flow-comments. Flow will find and utilize these when you install graphql-js via npm, and if you don't use flow then it's business as usual.
- GraphQL Type predicates for common groupings are now exported from
graphql/type. - A new submodule
graphql/language/schemafor parsing and working with the GraphQL schema language. - The submodule
graphql/utilitieswas included which adds a lot of useful functions for building client tools.- A definitive full introspection query.
- Build a client-side GraphQLSchema instance from an introspection result.
- Build a client-side GraphQLSchema from GraphQL Schema language.
- Print a GraphQLSchema to GraphQL Schema language.
- Create a GraphQLType instance from GraphQL Schema language.
- Create a JavaScript value from a GraphQL language value.
- Create a GraphQL language value from a JavaScript value.
- A smart visitor which maintains type information as it visits the GraphQL document AST.
- Utilities to determine if a JavaScript value or GraphQL language value adhere to a GraphQL type.
- Minor re-organization of
submodules.