graphql / graphql/graphiql

[graphiql] feat: add more root types in schema documentation

Open
#3,309 4 comments 0 reactions 0 assignees View on GitHub
enhancement graphiql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

Would be awesome to be able to add some more "parent" types to the SchemaDocumentation component, the way we have `query` `mutation` and `subscription`.

My schema currently has a `_typemap` which gets displayed in the `All Schema Types` though the ability to categorize that would be great, like in the example below. These map to the exisiting GraphQL types like
`GraphQLObjectType` `GraphQLEnumType``GraphQLInputObjectType` etc.

Essentially I'd like a feature where we can categorize the types further and not just the ones in ``` const ignoreTypesInAllSchema = [
queryType?.name,
mutationType?.name,
subscriptionType?.name,
];```

I think we have a lot of the functionality for this already in place! Maybe a `categorizeAllTypes / assignAllTypesToRoot` type of prop could do the trick.

Screenshot 2023-07-01 at 1 14 19 AM

Example solution
Screenshot 2023-07-01 at 1 23 41 AM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.