async-graphql / examples

217 stars 54 forks source link

Update Playground to GraphiQL v2 #57

Closed bramvanneerven closed 1 year ago

bramvanneerven commented 2 years ago

This PR updates the examples to include the new GraphiQL IDE (see https://github.com/async-graphql/async-graphql/pull/1044).

GraphiQL requires that the passed subscriptionUrl is a valid websocket url. Therefore, we cannot use a relative path (/ws for example), since that uses the http (http://) protocol instead of the websocket one (ws://). I therefore included the full url in almost every example to be consistent.

In the rocket example I did not, because this example does not use websockets and the url is different for various environments (see Rocket.toml). The same is the case for one of the tide examples which includes some test that involves an environment variable. I removed that environment variable from the tide example that did not include tests.

sunli829 commented 1 year ago

Thanks! 🙂