-
Notifications
You must be signed in to change notification settings - Fork 538
How to do live-reload #296
Comments
is it possible to add something like app.use('/graphql', graphqlHTTP({
schema: MyGraphQLSchema,
graphiql: true,
livereload: true
})); |
Assuming that when you say "whenever there is a change, graphiql should live-reload", you are referring to a change in the data on the server, no, that's not currently possible @nsisodiya, but it's a good question. In terms of live updates:
|
Whoops, didn't mean to hit close on that. Please feel free to comment further if you have any clarifications or questions. |
What I mean to say, "when I make changes in File, graphiql tab should auto-reload". |
@wincent - Please re-open bug. |
Can you clarify what kind of files you are making changes in? Do you mean files related to the schema ( |
If so, check out this for one example of how this was done. |
@wincent Basically, when JavaScript files changes, |
@wincent I went to the link, That code, restart graphql server. I want, when server restart, client page (graphiql) should reload. |
@nsisodiya reloading a client-side application (webpage in this case) when the server restarts sounds like a good "feature request" to me, but I'm not sure if we want to support it in this repo because:
My recommendation to resolve your use case is to create a custom middleware in your server code, implement a live-reloading step in your custom middleware, and combine with this middleware to achieve your goal. In the future we may consider incorporating this option - we would love to consider and review any PRs should you choose to experiment with this idea and contribute. Thanks for the question! |
I have a graphql based node application. I am using express-graphql.
How to enable live-reload. I want, whenever there is a change, graphiql should live-reload.
Edit: Read As
whenever there is a change in JavaScript files, graphiql should live-reload.
The text was updated successfully, but these errors were encountered: