- BREAKING/BUGFIX: Strict coercion of scalar types (#278)
- BREAKING: Removed deprecated directive introspection fields (onOperation, onFragment, onField)
- BREAKING: Removal of
VariablesDefaultValueAllowed
validation rule. All variables may now specify a default value. - BREAKING: renamed
ProvidedNonNullArguments
toProvidedRequiredArguments
(no longer require values to be provided to non-null arguments which provide a default value). - BREAKING:
GraphQL\Deferred
now extendsGraphQL\Executor\Promise\Adapter\SyncPromise
- Add schema validation: Input Objects must not contain non-nullable circular references (#492)
- Added retrieving query complexity once query has been completed (#316)
- Allow input types to be passed in from variables using \stdClass instead of associative arrays (#535)
- Fixes parsing of string literals of the form \u0000 for code points in the range [128, 255] inclusive
- Parse UTF-16 surrogate pairs within string literals
- Added quotes around
parentType.fieldName
in error message:
- Cannot return null for non-nullable field parentType.fieldName.
+ Cannot return null for non-nullable field "parentType.fieldName".
- Simplified Deferred implementation
- Having an empty string in
deprecationReason
will now print the@deprecated
directive (only anull
deprecationReason
won't print the@deprecated
directive).
- Fix coroutine executor when using with promise (#486)
- Force int when setting max query depth (#477)
- Reverted minor possible breaking change (#476)
- Added QueryPlan support (#436)
- Fixed an issue with NodeList iteration over missing keys (#475)
- Better validation of field/directive arguments
- Support for apollo client/server persisted queries
- Minor tweaks and fixes
This release brings several breaking changes. Please refer to UPGRADE document for details.
New features and notable changes:
- PHP version required: 7.1+
- Spec compliance: error
category
and extensions are displayed underextensions
key when using default formatting (#389) - New experimental executor with improved performance (#314).
It is a one-line switch:GraphQL::useExperimentalExecutor()
.
**Please try it and post your feedback at webonyx#397 (as it may become the default one in future)
- Ported `extendSchema` from the reference implementation under `GraphQL\Utils\SchemaExtender` (#362) - Added ability to override standard types via `GraphQL::overrideStandardTypes(array $types)` (#401) - Added flag `Debug::RETHROW_UNSAFE_EXCEPTIONS` which would only rethrow app-specific exceptions (#337) - Several classes were renamed (see [UPGRADE.md](UPGRADE.md)) - Schema Validation improvements
- Bugfix: Call to a member function getLocation() on null (#336)
- Fixed several errors discovered by static analysis (#329)
- Execution performance optimization for lists
- Allow stringeable objects to be serialized by StringType (#303)
- StandardServer: add support for the multipart/form-data content type (#300)
- SchemaPrinter: Use multi-line block for trailing quote (#294)
- Fixed bug in validation rule OverlappingFieldsCanBeMerged (#292)
- Added one more breaking change note in UPGRADE.md (#291)
- Spec compliance: remove
data
entry from response on top-level error (#281)
- RFC: Block String (multi-line strings via triple-quote """string""")
- GraphQL Schema SDL: Descriptions as strings (including multi-line)
- Changed minimum required PHP version to 5.6
Improvements:
- Allow extending GraphQL errors with additional properties
- Fixed parsing of default values in Schema SDL
- Handling several more cases in findBreakingChanges
- StandardServer: expect
operationName
(instead ofoperation
) in input
- Allow objects with __toString in IDType
- findBreakingChanges utility (see #199)
- StandardServer: Support non pre-parsed PSR-7 request body (see #202)
- Bugfix: provide descriptions to custom scalars (see #181)
- Ability to override internal types via
types
option of the schema (see #174).
This release brings little changes but there are two reasons why it is released as major version:
- To follow reference implementation versions (it matches 0.11.x series of graphql-js)
- It may break existing applications because scalar input coercion rules are stricter now:
In previous versions sloppy client input could leak through with unexpected results. For example string"false"
accidentally sent in variables was converted to booleantrue
and passed to field arguments. In the new version, such input will produce an error (which is a spec-compliant behavior).
Improvements:
- Stricter input coercion (see #171)
- Types built with
BuildSchema
now have reference to AST node with corresponding AST definition (in $astNode property) - Account for query offset for error locations (e.g. when query is stored in
.graphql
file)
- StandardServer improvement: do not raise an error when variables are passed as empty string (see #156)
- Fixed infinite loop in the server (see #153)
This release brings several breaking changes. Please refer to UPGRADE document for details.
New features and notable changes:
- Changed minimum PHP version from 5.4 to 5.5
- Lazy loading of types without separate build step (see #69, see docs)
- PSR-7 compliant Standard Server (see docs)
- New default error formatting, which does not expose sensitive data (see docs)
- Ability to define custom error handler to filter/log/re-throw exceptions after execution (see docs)
- Allow defining schema configuration using objects with fluent setters vs array (see docs)
- Allow serializing AST to array and re-creating AST from array lazily (see docs)
- Apollo-style query batching support via server (see docs)
- Schema validation, including validation of interface implementations (see docs)
- Ability to pass custom config formatter when defining schema using GraphQL type language (see docs)
Improvements:
- Significantly improved parser performance (see #137 and #128)
- Support for PHP7 exceptions everywhere (see #127)
- Improved documentation and docblock comments
Deprecations and breaking changes - see UPGRADE document.
- Minor change to assist DataLoader project in fixing #150
- Fixed PHP notice and invalid conversion when non-scalar value is passed as ID or String type (see #121)
- Fixed bug occurring when enum
value
is bool, null or float (see #141)
- Ability to disable introspection (see #131)
- Fixed issue with query complexity throwing on invalid queries (see #125)
- Fixed "Out of memory" error when
resolveType
returns unexpected result (see #119)
- Bugfix: throw UserError vs InvariantViolationError for errors caused by client (see #123)
- Bugfix: use directives when calculating query complexity (see #113)
- Bugfix:
AST\Node::__toString()
will convert node to array recursively to encode to json without errors
- Bugfix:
ResolveInfo::getFieldSelection()
now correctly merges fragment selections (see #98)
- Bugfix:
ResolveInfo::getFieldSelection()
now respects inline fragments
- Fixed SyncPromiseAdapter::all() to not change the order of arrays (see #92)
- Tools to help building schema out of Schema definition language as well as printing existing schema in Schema definition language (see #91)
- Fixed Utils::assign() bug related to detecting missing required keys (see #89)
- Schema Definition Language: element descriptions can be set through comments (see #88)
- Fixed:
GraphQL\Server
now properly sets promise adapter before executing query
- Deferred resolvers (see #66, see docs)
- New Facade class with fluid interface:
GraphQL\Server
(see #82) - Experimental: ability to load types in Schema lazily via custom
TypeResolutionStrategy
(see #69)
This release brings several minor breaking changes. Please refer to UPGRADE document for details.
New features:
- Support for
null
value (as required by latest GraphQL spec) - Shorthand definitions for field and argument types (see #47)
path
entry in errors produced by resolvers for better debuggingresolveType
for interface/union is now allowed to return string name of type- Ability to omit name when extending type class (vs defining inline)
Improvements:
- Spec compliance improvements
- New docs and examples
Look at GitHub Releases Page.