Commit 46fe3aea authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'cablett-clarify-resolver-reuse' into 'master'

Clarify use of resolvers in code

See merge request gitlab-org/gitlab!69458
parents eab7b454 7b44239b
......@@ -940,7 +940,9 @@ class PostResolver < BaseResolver
end
```
You should never re-use resolvers directly. Resolvers have a complex life-cycle, with
While you can use the same resolver class in two different places,
such as in two different fields where the same object is exposed,
you should never re-use resolver objects directly. Resolvers have a complex life-cycle, with
authorization, readiness and resolution orchestrated by the framework, and at
each stage [lazy values](#laziness) can be returned to take advantage of batching
opportunities. Never instantiate a resolver or a mutation in application code.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment