graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

@graphiql/react: migrate DocExplorer components

Open acao opened this issue 4 years ago • 0 comments

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:

  1. migrate the legacy DocExplorer components 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 seperate SchemaExplorer component 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?
  1. port the existing DocExplorer components 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.

acao avatar Dec 23 '21 11:12 acao