Skip to content

GraphiQL IDE 2.0 #2623

Description

@jasonbahl

What problem does this address?

The official GraphiQL IDE (you can try it here) has reached v2.0 and it has some nice improvements such as:

  • Tabs
  • Schema re-fetch button
  • Command menu
  • Light/Dark Mode
  • Better options for configuring different instances of the IDE (if we want to use it in different places within the Admin, like the GraphQL Document post type in WPGraphQL Smart Cache

It has better design and APIs that make it more friendly to plug into and extend/customize the functionality.

I think we should support the new version of the IDE and work toward deprecating the current version.

We could potentially ship both for some period of time and let users chose between them (via a setting or filter or whatever) for a period of time, then formally deprecate the old one at some point in the future.

What is your proposed solution?

I think we should introduce the new GraphiQL 2.0 IDE, adding custom features we've added to this version:

  • ability to execute as public/authenticated user
  • query composer
  • full-screen toggle
  • Help screen
  • Hashes the query in the URL for sharing queries
  • Filters:
    • graphiql_app
    • graphiql_query_params_provider_config
    • graphiql_app_context
    • graphiql_auth_switch_context_default_value
    • graphiql_explorer_context_default_value
    • graphiql_fetcher
    • graphiql_before_graphiql
    • graphiql_after_graphiql
    • graphiql_context_value
    • graphiql_toolbar_buttons
    • graphiql_toolbar_before_buttons
    • graphiql_toolbar_after_buttons
    • graphiql_explorer_operation_action_menu_items
    • graphiql_router_screens

I think we can ship both versions (for a period of time), with the new one under a flag (filter) while we iterate, then switch it to be the default at some point and let folks filter back to the old one if they chose, then at some point formally remove the old version.

What alternatives have you considered?

Leaving GraphiQL IDE as-is 👎🏻

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    graphiql ideIssues or pull requests related to the GraphiQL IDEtype: featureNew functionality being added
    No fields configured for Feature.

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions