Skip to content

Commit

Permalink
Merge pull request #291 from danez/patch-1
Browse files Browse the repository at this point in the history
 Add one more breaking change in 0.12
  • Loading branch information
vladar authored Jun 23, 2018
2 parents 6195029 + 3a4f520 commit 89369fd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,33 @@ Exception inside `parseLiteral()`, `parseValue()` and `serialize()`.

Returning null from any of these methods will now be treated as valid result.

### Breaking: Custom scalar types parseLiteral() declaration changed
A new parameter was added to `parseLiteral()`, which also needs to be added to any custom scalar type extending from `ScalarType`

Before:
```php
class MyType extends ScalarType {

...

public function parseLiteral($valueNode) {
//custom implementation
}
}
```

After:
```php
class MyType extends ScalarType {

...

public function parseLiteral($valueNode, array $variables = null) {
//custom implementation
}
}
```

### Breaking: Descriptions in comments are not used as descriptions by default anymore
Descriptions now need to be inside Strings or BlockStrings in order to be picked up as
description. If you want to keep the old behaviour you can supply the option `commentDescriptions`
Expand Down

0 comments on commit 89369fd

Please sign in to comment.