graphql-voyager
graphql-voyager copied to clipboard
Show mutations in voyager
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
any update on this? looks promising!
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 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.
I moved the discussion into a separate PR and closed this one since we wouldn't be rendering multiple roots simultaneously.