graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph

Home Page:https://graphql-kit.com/graphql-voyager/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot see mutations for my graphql response

ladecruze opened this issue · comments

response.txt

I have found workarounds to enable mutations on the demo site but I cant see mutations for my graphql response! I dont know whether it is tool issue or mine. I have attached my response here, kindly lemme know.

same for me

@ladecruze after some minutes of deeper investigations it works for me, but only Mutation or Query.

// rootType : ['Query'] or rootType : ['Mutation'] 
// both are not working rootType : ['Query', 'Mutation']

// Render <Voyager /> into the body.
      GraphQLVoyager.init(document.getElementById('voyager'), {
        introspection: introspectionProvider,
        displayOptions : {
          rootType : ['Query']
        }
      });

Comparison with the same input schema extracted with clairvoyance between GraphQL Voyager and GraphQL Visualizer.

GraphQL Voyager (mutations hidden)

image

GraphQL Visualizer (mutations displayed)

image

It’s intended. Read and write are different in GraphQL, although that can share the same type. In Voyager you must select the Mutation root to see all mutations.

This is actually nice to have it separated. But as it's not intuitive it's actually the first time (after reading your comment) I noticed the drop-down select menu:

image