Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Update GraphiQL and expose 'headerEditorEnabled' property
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jul 5, 2020
1 parent d19578b commit 7a75533
Show file tree
Hide file tree
Showing 6 changed files with 531 additions and 17 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ The `graphqlHTTP` function accepts the following options:
is provided and no stored query exists from a previous session.
If undefined is provided, GraphiQL will use its own default query.

- **`headerEditorEnabled`**: An optional boolean which enables the header editor when true.
Defaults to false.

- **`rootValue`**: A value to pass as the `rootValue` to the `graphql()`
function from [`GraphQL.js/src/execute.js`](https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L119).

Expand Down
2 changes: 1 addition & 1 deletion examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.use(
graphqlHTTP({
schema,
rootValue,
graphiql: true,
graphiql: { headerEditorEnabled: true },
}),
);
app.listen(4000);
Expand Down

0 comments on commit 7a75533

Please sign in to comment.