mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-04-02 20:26:09 +03:00
Merge pull request #369 from nagledb/nagledb-doc-default-field-resolver
Updated default field resolver code in documentation.
This commit is contained in:
commit
6f8aed800e
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ function defaultFieldResolver($source, $args, $context, \GraphQL\Type\Definition
|
|||
}
|
||||
}
|
||||
|
||||
return $property instanceof \Closure ? $property($source, $args, $context) : $property;
|
||||
return $property instanceof Closure ? $property($source, $args, $context, $info) : $property;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -270,4 +270,4 @@ Where **$promiseAdapter** is an instance of:
|
|||
* Other platforms: write your own class implementing interface: <br>
|
||||
[`GraphQL\Executor\Promise\PromiseAdapter`](reference.md#graphqlexecutorpromisepromiseadapter).
|
||||
|
||||
Then your **resolve** functions should return promises of your platform instead of `GraphQL\Deferred`s.
|
||||
Then your **resolve** functions should return promises of your platform instead of `GraphQL\Deferred`s.
|
||||
|
|
Loading…
Add table
Reference in a new issue