graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

query returns null instead of value

Open msadovyi opened this issue 4 years ago • 1 comments

Describe the bug

Hi! I'm trying to run graphql-mesh with 1 handler that uses graphql-ws as transport. It seems like queries does not works correctly with graphql-ws.

To Reproduce Clone https://github.com/msadovyi/mesh-graphql-ws-issue

  1. Run yarn && yarn start. It runs source API at port 3000 and grapql-mesh at port 4000.
  2. Open http://localhost:3000 and make sure query { hello } and subscription subscription { greetings } return values.
  3. Open http://localhost:4000 and execute same queries: { hello }, subscription { greetings }.

Expected behavior Both of queries works correctly and returns values as source API does.

Environment:

  • Dependencies:
"@graphql-mesh/cli": "^0.30.2",
"@graphql-mesh/graphql": "^0.17.10",
"apollo-server-express": "^2.25.1",
"express": "^4.17.1",
"graphql": "^15.5.0",
"graphql-ws": "^5.1.2",
 "ws": "^7.4.6"
  • NodeJS: v14.16.1

msadovyi avatar Jun 14 '21 14:06 msadovyi

Can you give a little more context? When you run the subscription does an error come back? Or is it just hanging?

Davenporten avatar Sep 02 '21 00:09 Davenporten