Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/learn/execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ At the top level of every GraphQL server is an Object type that represents the p
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:

```js
function resolveHumanQuery(obj, args, context, info) {
function resolveHuman(obj, args, context, info) {
return context.db.loadHumanByID(args.id).then(userData => new Human(userData));
}
```
Expand Down Expand Up @@ -170,4 +170,4 @@ To recap what we've learned about execution:
- 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
- Once all of the requested fields have been resolved to the expected leaf values, the result is sent to the client, typically as JSON

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.
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.
Loading