Provide bootstrap graphiql entry point
tlvenn opened this issue · comments
Right now, GraphiQL is completely self configured and bootstrapped which works great for Sangria purpose but kinda limit how it can be used outside of it.
It would be nice to introduce a bootstrapGraphiQL
function that can be called from the html template. Such function should take the defaultUrl
param and be passed to AppConfig
.
Additionally, it would be nice to support the following optional params to configure the first tab if there is no previous state:
- query
- variables
- response
Given GraphiQL is exported as var by webpack under graphiql
, we can juste create a function named bootstrap
in graphiql.jsx.
@OlegIlyenko Let me know what you think, I can submit a PR very soon to implement that.
Hi @OlegIlyenko, PR is ready for review :)