Skip to content

v6: Retire the composable GraphiQL.Toolbar and GraphiQL.Logo slots#4425

Merged
trevor-scheer merged 4 commits into
graphiql-6from
trevor/retire-toolbar-logo-slots
Jul 13, 2026
Merged

v6: Retire the composable GraphiQL.Toolbar and GraphiQL.Logo slots#4425
trevor-scheer merged 4 commits into
graphiql-6from
trevor/retire-toolbar-logo-slots

Conversation

@trevor-scheer

@trevor-scheer trevor-scheer commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the composable GraphiQL.Toolbar and GraphiQL.Logo slots. v6: Remove the legacy editor toolbar and corner logo #4398 already stopped rendering their v5 defaults, leaving them in an awkward half-fit spot with nowhere natural left to render; this finishes the job by removing the slots themselves.
  • GraphiQL.Toolbar is a straight removal, no deprecation period first. Custom editor actions belong on a plugin's sessionActions now, rendered into the tab strip alongside Prettify/Merge/Copy/Save.
  • GraphiQL.Logo is removed now that <TopBar> takes a new brand prop (any ReactNode), which is also exposed straight off <GraphiQL>. It replaces the default hexagon icon + "GraphiQL" wordmark; leave it unset to keep the default.
  • GraphiQL.Footer is untouched.
  • Also drops the dead toolbar.additionalContent/toolbar.additionalComponent TypeError guards, since they pointed at the component being removed here, and the .graphiql-toolbar/.graphiql-logo CSS those slots used.
  • Updates the README and the v6 migration guide with before/after snippets, and migrates the graphiql-vite-react-router example off both slots.

Builds on #4398.

Test plan

  • Render <GraphiQL> with no extra props. The top bar shows the default hexagon icon and "GraphiQL" wordmark.
  • Render <GraphiQL brand="My Company">. The top bar shows "My Company" instead, and the default wordmark is gone.
  • Confirm the old GraphiQL.Toolbar/GraphiQL.Logo slots are gone: referencing <GraphiQL.Toolbar> or <GraphiQL.Logo> as JSX children is now a TypeScript error, and there's no runtime path that renders them.
  • Confirm toolbar actions still work from the tab strip: Prettify, Merge Fragments, Copy, and Save each appear once and behave as before.
  • Register a plugin with a sessionActions component and confirm it renders in the tab strip alongside the built-in actions.
  • Confirm <GraphiQL.Footer> still renders below the response, unchanged.
  • Run the graphiql-vite-react-router example and confirm the branding shows "API Explorer" and the share-query button still works from the tab strip.

Refs: #4228 (builds on #4398)

TopBar currently hardcodes the GraphQL hexagon icon and "GraphiQL"
wordmark. Add an optional `brand` prop (any `ReactNode`) that renders
in its place, defaulting to the existing icon + wordmark when unset.
This is the replacement branding slot for the `GraphiQL.Logo` removal
that follows.
Both slots are vestigial after the v6 redesign: the tab strip's
prettify/merge/copy/save actions already cover the toolbar's default
buttons, and branding now lives in the top bar. `GraphiQL.Toolbar` is
gone outright with no deprecation period; use a plugin's
`sessionActions` instead. `GraphiQL.Logo` is gone now that `<TopBar>`
takes a `brand` prop for custom branding. `GraphiQL.Footer` is
untouched.

Also drops the now-dead `toolbar.additionalContent` /
`toolbar.additionalComponent` `TypeError` guards, since they pointed
embedders at the component being removed here, and the `.graphiql-toolbar`
/ `.graphiql-logo` CSS that only those slots used.

Breaking change, major changeset included.
Add a "Removed GraphiQL.Toolbar and GraphiQL.Logo" section with
before/after snippets for both replacements (plugin sessionActions,
TopBar brand prop), and update the overview/contents to mention it
alongside the removed-hooks breaking change.
Replace `<GraphiQL.Logo>` with the `brand` prop and rebuild the custom
share-query button as a plugin with `sessionActions`, alongside the
default history/query-builder/collections plugins it implicitly had
before.
@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 17c786e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
graphiql Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trevor-scheer
trevor-scheer marked this pull request as ready for review July 13, 2026 02:59
@trevor-scheer
trevor-scheer merged commit ff2e4ca into graphiql-6 Jul 13, 2026
13 checks passed
@trevor-scheer
trevor-scheer deleted the trevor/retire-toolbar-logo-slots branch July 13, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant