From bf748e1421e7fa0218fa99817608b35cdbafa831 Mon Sep 17 00:00:00 2001 From: vladar Date: Sat, 19 Nov 2016 17:46:54 +0700 Subject: [PATCH] Added notes to UPGRADE document about AST classes renaming --- UPGRADE.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 60ccd3b..72ac3c1 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,8 +1,20 @@ # Upgrade -## Upgrade v0.7.x > v1.0.x +## Upgrade v0.7.x > v0.8.x -### 1. Custom directives handling +### AST node classes +AST node classes were renamed to disambiguate with types. e.g.: + +``` +GraphQL\Language\AST\Field -> GraphQL\Language\AST\FieldNode +GraphQL\Language\AST\OjbectValue -> GraphQL\Language\AST\OjbectValueNode +``` +etc. + +Node kind constants were extracted from `GraphQL\Language\AST\Node` to `GraphQL\Language\AST\NodeKind` + + +### Custom directives handling When passing custom directives to schema, default directives (like `@skip` and `@include`) are not added to schema automatically anymore. If you need them - add them explicitly with your other directives @@ -22,7 +34,7 @@ $schema = new Schema([ ]); ``` -### 2. Protected property and method naming +### Protected property and method naming In order to unify coding style, leading underscores were removed from all private and protected properties and methods. @@ -39,6 +51,10 @@ GraphQL\Schema::$queryType; So if you rely on any protected properties or methods of any GraphQL class, make sure to delete leading underscores. +### Deprecations +There are also several deprecations which still work, but trigger `E_USER_DEPRECATED` +when used. + ## Upgrade v0.6.x > v0.7.x There are a few new breaking changes in v0.7.0 that were added to the graphql-js reference implementation