GraphQL - Automatically generate leaf nodes #3666
Unanswered
rafaelrenanpacheco
asked this question in
Ideas
Replies: 6 comments
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
0 replies
|
I think this should be possible |
0 replies
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
0 replies
|
Hahaaaa 😄 Let me give this one a go. I've been working with GraphQL plenty (via GatsbyJS) but may still need some advice with this. Any suggestions? |
0 replies
|
Example of how GraphiQL achieves this - https://github.com/graphql/graphiql/blob/5b9012ea0e74452787f6c793d68aaa2cb915731b/src/utility/fillLeafs.js#L73-L104 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Details
Hi there!
Back then someone asked for a feature in GraphQL to automatically generate leaf nodes when opening the query brackets, but the request got stale and closed.
As of today, is this feature still hard to be implemented? Insomnia's GraphQL already have a good intellisence, so I'm guessing it has all information needed to automatically generate all leaf nodes when openning the query bracket. Like GraphiQL, this feature should be activated as needed.
It is easier to generate all leaf nodes and delete the unwanted ones than to write each required node.
Edit: Would be good an option to set the level of children to generate. If set to 1, then only the direct children will be generated. If set to 2, then the children's children will be generated as well, and so on. For me 1 level is good enough.
Best regards,
Rafael Pacheco.
All reactions