Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to configure GraphcoolPlayground endpoint + subscription endpoint #86

Closed
wants to merge 1 commit into from

Conversation

AttilaTheFun
Copy link
Contributor

Hello! I've been using graphql-go successfully in my app for a while now, but I've had to use a standalone GraphQL client for testing because the handler package's bundled GraphiQL doesn't support HTTP headers, and the bundled Playground don't allow me to change the websocket endpoint.

Right now the endpoint and websocket endpoint are hardcoded in this package to be relative to the request's url, but this doesn't work in cases where the websocket is served off of a different subdomain. Also the "ws" protocol is hardcoded but in production environments, most people are using "wss".

This proposed change allows users to optionally pass an additional PlaygroundConfig object in the main Handler Config which can change the endpoint and subscription endpoint. If it's not included, but the Playground flag is true, the original behavior is retained so as not to break existing users.

If you have a better idea of how to accomplish this, I'm all ears! I'd just love to be able to do all of my testing from a web browser without needing some Electron app as well.

@chris-ramon
Copy link
Member

Addressed it via: #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants