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

Fixes graphiql so it works with koa #370

Merged
merged 5 commits into from Mar 5, 2017
Merged

Conversation

smh
Copy link
Contributor

@smh smh commented Feb 21, 2017

When run with koa, static files for graphiql would fail with error
message Error: Can't set headers after they are sent.

This is caused by pillarjs/send being incompatible with koa, at least in
the manner it was used here. See pillarjs/send#118 and pillarjs/send#119
for more discussion

When run with koa, static files for graphiql would fail with error
message `Error: Can't set headers after they are sent.`

This is caused by pillarjs/send being incompatible with koa, at least in
the manner it was used here. See pillarjs/send#118 and pillarjs/send#119
for more discussion
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me; thanks! 👍

@mlegenhausen
Copy link

mlegenhausen commented Feb 27, 2017

For everybody who is waiting for the pull request to land you can work around this issue with koa-connect. Simply wrap the postgraphql call in c2k and the error is gone.

@benjie
Copy link
Member

benjie commented Feb 27, 2017

@benjie
Copy link
Member

benjie commented Feb 27, 2017

I've rebuilt a few times and cleared the relevant cache but it still fails on an npm issue.

@smh
Copy link
Contributor Author

smh commented Feb 27, 2017

Seems to be unrelated to the changes here, built locally and got the same error both for master branch and this branch (node v4.3.2 and npm v2.14.12).

Looks like it is caused by graphiql@0.8.0 not happy with graphql versions >= 0.9. Any reason we can't update the graphiql dependency to follow graphql?

@smh
Copy link
Contributor Author

smh commented Feb 27, 2017

@benjie Created a pull request to get the devDependencies in sync. See #377

@benjie
Copy link
Member

benjie commented Feb 27, 2017

I defer to @calebmer on that; he's got a better grasp of the various versions and why they were chosen than I do.

@calebmer
Copy link
Collaborator

calebmer commented Mar 5, 2017

CI was passing when I just looked. Updated the branch, and if CI still passes we can merge 😊

@calebmer calebmer merged commit 53c6a31 into graphile:master Mar 5, 2017
@calebmer
Copy link
Collaborator

Released in 3.1.0 🎉

Belline pushed a commit to Belline/postgraphql that referenced this pull request Dec 18, 2017
* Fixes graphiql so it works with koa

When run with koa, static files for graphiql would fail with error
message `Error: Can't set headers after they are sent.`

This is caused by pillarjs/send being incompatible with koa, at least in
the manner it was used here. See pillarjs/send#118 and pillarjs/send#119
for more discussion

* Removed unnecessary semicolon to make linter happy
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

4 participants