graphql / graphql/graphiql

[graphiql] Option to have fixed theme and disable settings dialog

Open
#3,220 6 comments 2 reactions 0 assignees View on GitHub
enhancement graphiql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

When using the `` component there is an option for `editorTheme` which doesn't work how I would've expected. I did some searching and found that you can use the `useTheme` hook to specify a theme:

```tsx
useEffect(() => {
setTheme("light");
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
```

For my purposes I have also disabled headers with `isHeadersEditorEnabled={false}` which renders the settings button redundant. It would be great if there was a way to hide it to avoid confusion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.