apollo-server: Error: Can't set headers after they are sent

Every time I make a graphql query from my client, the server console outputs:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 32): Error: Can't set headers after they are sent.

The data arrives fine on the client, but I keep getting this error spit out on the server console. It only happens on graphql queries (I’m using Apollo client and Apollo server). I’m not sure where to start since there is no stack trace, so I figured I would start here and see if anyone has any ideas on what’s going on!

    "graphql": "0.10.5",
    "graphql-date": "^1.0.3",
    "graphql-loader": "^1.2.1",
    "graphql-log": "^0.1.3",
    "graphql-redis-subscriptions": "^1.2.0",
    "graphql-server-express": "^1.0.2",
    "graphql-subscriptions": "^0.4.4",
    "graphql-tools": "^1.0.0",
    "graphql-type-json": "^0.1.4",

My server is a Meteor app @ METEOR@1.6-beta.4 and using the meteor/apollo integration, so the graphql server is based on express.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 19 (4 by maintainers)

Most upvoted comments

+1 same issue here #4527