Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve only the requested fields #78

Closed
iainmckay opened this issue Nov 7, 2016 · 1 comment
Closed

Resolve only the requested fields #78

iainmckay opened this issue Nov 7, 2016 · 1 comment

Comments

@iainmckay
Copy link

Is there a recommended way only to resolve the fields that the consumer has requested? In our model we have a few run-time calculated fields, ideally these aren't resolved on every request if the consumer does not actually ask for them.

Poking around the code I can't see a way to find the actual fields requested in the field resolver. I can see the entire query but as a field can be exposed from multiple nodes in the graph it's hard to infer the context it is being resolved for.

Thanks

@iainmckay
Copy link
Author

Yep, Blonde moment. ResolveInfo::getFieldASTList()

Sorry :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant