Replies: 1 comment 2 replies
-
I think this would be 100% doable if we make there be an official spec directive to use for grouping, such as |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In very large schemas, esp. in a federated supergraph, it becomes cumbersome to work with that many fields; not only, but probably most prominently, in Query itself.
It would be cool to be able to group and hide fields, to better focus on specific sub-sets, if they are annotated with directives. Say you have a
@tag
directive with the valuesplanets
,characters
, etc. on most fields. If you enable grouping fortag
, the list of fields in the schema view as well as in the auto completion is subdivided by the different actual tag values. By clicking on the group name, you can fold and hide all the values you're currently not interested in. This folding is sticky, i.e. if you fold it in the schema view, it remains folded also in the auto completion and vice versa. Until you unfold it again. If you fold multiple values, they merge into a single line. There is even an option to fold all but one value.I'm unsure about a good UI for enabling the grouping for a directive, because directives can have none or multiple arguments, maybe even optional.
Beta Was this translation helpful? Give feedback.
All reactions