Skip to content
Discussion options

You must be logged in to vote

We have this function builds operations by root field name;
https://github.com/ardatan/graphql-tools/blob/master/packages/utils/src/build-operation-for-field.ts

You can see the use cases here in the unit tests;
https://github.com/ardatan/graphql-tools/blob/master/packages/utils/tests/build-operation-node-for-field.spec.ts

I hope this helps you. If anyone wants to build a plugin based on these, we'd love to accept a PR!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by luisrudge
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants