mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-04-02 20:26:09 +03:00
Improve example
This commit is contained in:
parent
300b58093b
commit
3a4f520da7
1 changed files with 14 additions and 4 deletions
18
UPGRADE.md
18
UPGRADE.md
|
@ -15,15 +15,25 @@ A new parameter was added to `parseLiteral()`, which also needs to be added to a
|
|||
|
||||
Before:
|
||||
```php
|
||||
public function parseLiteral($valueNode) {
|
||||
//custom implementation
|
||||
class MyType extends ScalarType {
|
||||
|
||||
...
|
||||
|
||||
public function parseLiteral($valueNode) {
|
||||
//custom implementation
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
After:
|
||||
```php
|
||||
public function parseLiteral($valueNode, array $variables = null) {
|
||||
//custom implementation
|
||||
class MyType extends ScalarType {
|
||||
|
||||
...
|
||||
|
||||
public function parseLiteral($valueNode, array $variables = null) {
|
||||
//custom implementation
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue