-
Notifications
You must be signed in to change notification settings - Fork 332
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
Hive Gateway subscriptons not working #7673
Comments
Could you give more details about your subgraphs? |
There is only one subgraph serving subscriptions. It is based on graphql-ws protocol https://docs.spring.io/spring-graphql/reference/transports.html#server.transports.websocket But it seems like the gateway is not even trying to call it |
Have you tried to make the HTTP request with curl or some other http client? |
I tried making a request with Postman GraphQL client. Here are the logs from this request { |
Can you give me an example of correct curl for querying subscription on gateway? |
curl 'http://localhost:4000/graphql' \
-H 'accept: text/event-stream' \
-H 'content-type: application/json' \
--data-raw '{"query":"subscription OnProductPriceChanged { productPriceChanged { name price reviews { score } } }","operationName":"OnProductPriceChanged"}' You can initiate an SSE connection as in here with curl. Regarding the error in the screenshots you shared above; |
Hi, I tried forming the request like in the curl you described.
And in the logs:
This likely means two things:
|
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Github,
Stackblitz
or
CodeSandbox
Describe the bug
Graphql subscriptions do not work. If i try to run the subscription through GraphiQL, the response is 404
The OpenTelemetry logs are as follows:
gateway.config.ts: |
import {defineConfig, type WSTransportOptions, createStdoutExporter} from '@graphql-hive/gateway'
The text was updated successfully, but these errors were encountered: