Giter Site home page Giter Site logo

Comments (9)

sebastienfi avatar sebastienfi commented on May 2, 2024 29

Would love to have this

from graphiql.

acarl005 avatar acarl005 commented on May 2, 2024 4

@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

from graphiql.

imolorhe avatar imolorhe commented on May 2, 2024 1

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

from graphiql.

jimthedev avatar jimthedev commented on May 2, 2024

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

from graphiql.

asiandrummer avatar asiandrummer commented on May 2, 2024

@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.

from graphiql.

leebyron avatar leebyron commented on May 2, 2024

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!

from graphiql.

acarl005 avatar acarl005 commented on May 2, 2024

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

from graphiql.

kirillgroshkov avatar kirillgroshkov commented on May 2, 2024

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!

from graphiql.

capaj avatar capaj commented on May 2, 2024

@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.

from graphiql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.