Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[graphiql] Using ToolbarButton in toolbar/additionalContent throws an error #3796

Open
1 task done
receter opened this issue Oct 15, 2024 · 0 comments
Open
1 task done

Comments

@receter
Copy link

receter commented Oct 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When passing a ToolbarButton to the toolbar prop of <GraphiQL> (via additionalContent) an error is thrown:

Uncaught Error: Tooltip must be used within TooltipProvider

<GraphiQL
//…
        toolbar={{
          additionalContent: <ToolbarButton label="Hello" />,
        }}
//…
      />

At least this is the case for https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-graphiql-explorer/src/app.jsx#L173

Expected Behavior

Using the ToolbarButton is possible without an error

Steps To Reproduce

<GraphiQL
//…
        toolbar={{
          additionalContent: <ToolbarButton label="Hello" />,
        }}
//…
      />```

### Environment

* GraphiQL Version: 3.7.1 (@graphiql/[email protected])
* OS: all
* Browser: all
* Bundler: 
* `react` Version:
* `graphql` Version:


### Anything else?

_No response_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant