Skip to content

Commit 9901185

Browse files
authored
make resolver naming consistent in example
Align resolver function name in docs: `resolveHumanQuery` -> `resolveHuman`, so both examples use the same naming.
1 parent e443921 commit 9901185

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/learn/execution.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ At the top level of every GraphQL server is an Object type that represents the p
5858
In this example, our `Query` type provides a field called `human` which accepts the argument `id`. The resolver function for this field likely accesses a database and then constructs and returns a `Human` type:
5959

6060
```js
61-
function resolveHumanQuery(obj, args, context, info) {
61+
function resolveHuman(obj, args, context, info) {
6262
return context.db.loadHumanByID(args.id).then(userData => new Human(userData));
6363
}
6464
```
@@ -170,4 +170,4 @@ To recap what we've learned about execution:
170170
- When a field on an Object type returns a List type of other objects, additional data may need to be fetched from the underlying data source to transform any foreign key-like references (such as IDs) into the related objects
171171
- Once all of the requested fields have been resolved to the expected leaf values, the result is sent to the client, typically as JSON
172172

173-
Now that we understand how operations are executed, we can move to the last stage of the lifecycle of a GraphQL request where the [response](/learn/response/) is delivered to a client.
173+
Now that we understand how operations are executed, we can move to the last stage of the lifecycle of a GraphQL request where the [response](/learn/response/) is delivered to a client.

0 commit comments

Comments
 (0)