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

Commit 7a75533

Browse files
committed
Update GraphiQL and expose 'headerEditorEnabled' property
1 parent d19578b commit 7a75533

File tree

6 files changed

+531
-17
lines changed

6 files changed

+531
-17
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ The `graphqlHTTP` function accepts the following options:
8585
is provided and no stored query exists from a previous session.
8686
If undefined is provided, GraphiQL will use its own default query.
8787

88+
- **`headerEditorEnabled`**: An optional boolean which enables the header editor when true.
89+
Defaults to false.
90+
8891
- **`rootValue`**: A value to pass as the `rootValue` to the `graphql()`
8992
function from [`GraphQL.js/src/execute.js`](https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L119).
9093

examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ app.use(
2121
graphqlHTTP({
2222
schema,
2323
rootValue,
24-
graphiql: true,
24+
graphiql: { headerEditorEnabled: true },
2525
}),
2626
);
2727
app.listen(4000);

0 commit comments

Comments
 (0)