graphql / graphql/graphiql

Does GraphiQL support passing a prop to automatically open the documentation explorer to a specific query or type?

Open
#2,396 1 comment 0 reactions 0 assignees View on GitHub
@graphiql/react enhancement
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

As mentioned in the title, I am looking to pass in a prop to the GraphiQL component so that it automatically launches with a specific documentation explorer page open. This is similar to what is currently supported with the `query` propr.

Example of what I mean

```
React.createElement(GraphiQL, {
fetcher: graphQLFetcher,
defaultVariableEditorOpen: true,
docExplorerOpen: true,
openDocPage: "UserType"
}),
```

Is something like this possible today? If not, what file would be edited to allow for this?

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.