Feature Request: add refine
method to object types with access to the collected fields
#3303
Labels
refine
method to object types with access to the collected fields
#3303
Right now, we provide the
fieldNodes
as part of theinfo
parameter for resolvers, but the fields are not collected, because the type is not yet known until the resolver returns. Since the type resolver logic may be known, resolvers can include that logic and collect fields manually based on that known type, and then perform whatever logic necessary => but that means that fields are collected twice, once by the framework, and once by the resolver. It would be great if there was a hook that could provide access to the collected fields and allow modification of the result.The proposal: add a
refine
method to GraphQLObjectTypes with signature:Any thoughts?
The text was updated successfully, but these errors were encountered: