mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 06:16:05 +03:00
Improve example
This commit is contained in:
parent
300b58093b
commit
3a4f520da7
14
UPGRADE.md
14
UPGRADE.md
@ -15,15 +15,25 @@ A new parameter was added to `parseLiteral()`, which also needs to be added to a
|
|||||||
|
|
||||||
Before:
|
Before:
|
||||||
```php
|
```php
|
||||||
public function parseLiteral($valueNode) {
|
class MyType extends ScalarType {
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
public function parseLiteral($valueNode) {
|
||||||
//custom implementation
|
//custom implementation
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
After:
|
After:
|
||||||
```php
|
```php
|
||||||
public function parseLiteral($valueNode, array $variables = null) {
|
class MyType extends ScalarType {
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
public function parseLiteral($valueNode, array $variables = null) {
|
||||||
//custom implementation
|
//custom implementation
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user