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

Conversation

@juffalow
Copy link
Contributor

When using typescript, it is not allowed to pass an object as graphiql value. Only boolean values are allowed. This disables the user to set his own defaultQuery that is shown by default on GraphiQL render.

@juffalow
Copy link
Contributor Author

Workaround for now:

app.use('/graphql', graphqlHTTP({ context, graphiql: <boolean> <unknown> { defaultQuery: config.defaultQuery, }, schema, }));
When using typescript, it is not allowed to pass an object as graphiql value. Only boolean values are allowed. This disables the user to set his own defaultQuery that is shown by default on GraphiQL render.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.76% when pulling 2e913c2 on juffalow:patch-1 into d634e41 on graphql:master.

@ppsirius
Copy link

Anyone could merge this?

@IvanGoncharov IvanGoncharov added the PR: bug fix 🐞 requires increase of "patch" version number label May 31, 2020
@IvanGoncharov IvanGoncharov changed the title Allow to pass object as graphiql option TS: Allow to pass object as graphiql option May 31, 2020
@IvanGoncharov IvanGoncharov merged commit ecf8882 into graphql:master May 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR: bug fix 🐞 requires increase of "patch" version number

4 participants