opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
207 stars 15 forks source link

feature: Add `__typename` to the GraphiQL browsable explorer menu #3051

Open petercrocker opened 6 months ago

petercrocker commented 6 months ago

Component

Frontend UI

Describe the Feature Request

From @ubaumann on discord:

Is adding "__typename" to the GraphiQL Explorer possible? It works great. What I mean: Can it be added to the browsable Explorer on the left? It was really handy to click my request together, and it would be nice to have it already there.

image

Describe the Use Case

No response

Additional Information

No response

ogenstad commented 6 months ago

I think we're pretty much using https://github.com/graphql/graphiql/tree/main/packages/graphiql-plugin-explorer as is for this feature it would probably require us to create a forked version or get them to change it in the upstream. I'm somewhat skeptical of this. As __typename can be used everywhere within GraphQL it might be very verbose to have the same thing show up in all places.

ubaumann commented 6 months ago

I would definitely try to avoid maintaining an own fork. Especially for just a small nice to have. I was thinking if it is possible to enable it, it could be nice for people not familiar with graphQL.