graphql-voyager icon indicating copy to clipboard operation
graphql-voyager copied to clipboard

Show mutations in voyager

Open sarahoka opened this issue 4 years ago • 2 comments

Modified the property displayOptions.rootType so it takes an array of strings rather than a string by representing the root types. By default, this is ["Query"].

This additional functionality allows both Query and Mutation types to be seen on Voyager.

Resolves #37, resolves #200

sarahoka avatar Aug 13 '21 15:08 sarahoka

any update on this? looks promising!

macrozone avatar Jul 28 '22 12:07 macrozone

I disagree with this. In GraphQL the read and write model are separated. Purposefully separated. The root, but definition, is one, any type can be root. An array of roots feels weird and logically it does not make a lot of sense. What's the effect of returning multiple root type in a bigger model?

LunaticMuch avatar Jul 28 '22 13:07 LunaticMuch

@LunaticMuch I agree with you on that, voyager is already too noisy for big graphs. At the same time, the current way of switching query/mutation/subscription is not very intuitive. Also, it is bad that you need to wait each time you switch between query and mutation. What we can do is to make tabs on top of the graph view (only if API has Mutation or Subscription root types): https://mui.com/material-ui/react-tabs/#basic-tabs Also, we can run multiple web workers so query/mutation is rendered in parallel.

IvanGoncharov avatar Apr 06 '23 19:04 IvanGoncharov

I moved the discussion into a separate PR and closed this one since we wouldn't be rendering multiple roots simultaneously.

IvanGoncharov avatar Apr 06 '23 19:04 IvanGoncharov