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

Keyboard shortcut to add all fields #75

Closed
jimthedev opened this issue Dec 21, 2015 · 9 comments
Closed

Keyboard shortcut to add all fields #75

jimthedev opened this issue Dec 21, 2015 · 9 comments

Comments

@jimthedev
Copy link

There are times when I want to add all fields then remove some. I'd be fantastic l if there was a way to add all fields in a given navigation context using a keyboard shortcut.

@jimthedev
Copy link
Author

Fantastic tool btw. Feel free to close this, just wanted to submit a potentially useful feature.

@asiandrummer
Copy link
Contributor

@jimthedev We already have a feature that kinda does what you suggested - if, during an execution stage, a query is invalid due to the innermost field (terminal fields) not representing a leaf selection (http://facebook.github.io/graphql/#sec-Leaf-Field-Selections), GraphiQL will automatically fill in the leaf selections for invalid fields. Take a look at https://github.com/graphql/graphiql/blob/master/src/utility/fillLeafs.js and see if this is something you wanted.

If you meant recursively adding all non-terminal fields and terminal fields, you might end up in a situation where the field call added may address the top-level type, which ends up in an infinite loop of field completions.

@leebyron
Copy link
Contributor

Closing this since it's aging and tricky to implement in a usable way. However anyone who stumbles here in the future - it would certainly be an interesting PR!

@sebastienfi
Copy link

Would love to have this

@acarl005
Copy link

Also, the automatic leaf-filling does not work within a fragment.

@acarl005
Copy link

@jimthedev I have a fork of GraphiQL where I added this feature. It adds all available field names (non-recursively) with based on whichever field the cursor is inside of.

acarl005/graphsiql@9f88eba

@kirillgroshkov
Copy link

Would love to have it too!
Or any other way to do * for debugging. I understand that for production * shouldn't be used according to the intended use and the concept of GraphQL itself. But for debugging it's invaluable!

@capaj
Copy link

capaj commented Sep 9, 2018

@imolorhe why do link this here? Does altair have this feature? Because I just tried it out and it doesn't seem to have this feature.

@imolorhe
Copy link
Contributor

imolorhe commented Sep 9, 2018

@capaj Oh right! I confused the question for another 😅

acao pushed a commit to acao/graphiql that referenced this issue Jun 1, 2019
…ransform-es2015-block-scoping-6.21.0

chore(package): update babel-plugin-transform-es2015-block-scoping to version 6.21.0
acao pushed a commit to acao/graphiql that referenced this issue Jun 5, 2019
…ransform-es2015-computed-properties-6.22.0

Update babel-plugin-transform-es2015-computed-properties to version 6.22.0 🚀
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

8 participants