graphiql
graphiql copied to clipboard
@graphiql/react: migrate DocExplorer components
Migrate just the "classic" DocExplorer set of components over to @graphiql/react, or to a seperate package entirely, such as @graphiql/doc-explorer.
A good chunk of important, spec-dependent functionality lives here.
we have a few options:
- migrate the legacy
DocExplorercomponents to their own export or package, where they will continue to use css classes and the same props interface. Allow people to import and extend just DocExplorer and some of the higher level DocExplorer components. This is often requested already. Then, rebuild from the ground up a new and seperateSchemaExplorercomponent based on orta's redesign using the new themeing system
considerations
- will supporting the legacy doc explorer components as is be worth it?
- will starting fresh be easier or a better choice than migrating the existing schema explorer to the new redesign?
- port the existing
DocExplorercomponents to use orta's redesign and the new theming system.
considerations:
- do we leave classes in place or drop them entirely for css-in-js?
- will we then add
data-ids for cypress and RTL?
anything that seems react agnostic about these capabilities can be moved to toolkit. for example, a utility function for building a lunr.js index from a GraphQLSchema or a schema DocumentAST.