diff --git a/src/pages/learn/execution.mdx b/src/pages/learn/execution.mdx index 6f3efa82c8..9c451548f4 100644 --- a/src/pages/learn/execution.mdx +++ b/src/pages/learn/execution.mdx @@ -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)); } ``` @@ -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. \ No newline at end of file +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.