Questions tagged [graphql-ws]
11 questions
3
votes
1 answer
cannot connect graphql-ws to gqlgen
I'm using gqlgen for my service and apollo client and graphql-ws for my front end and I'm trying to use a subscription and it perfectly works in my playground but when i try to connect the client to it I receive this error:
WebSocket connection to…

nastaran jalali
- 53
- 4
1
vote
0 answers
GraphQL useSubscription is not working with graphql-js in NextJS
I am trying to implement Websocket using apollo client GraphQLWsLink. Which is not at emitting the data. However the Websocket connect is alive only. What I observed from the network tab is the query is not at all passed in the payload while using…

Tamil Vanan
- 11
- 1
1
vote
1 answer
Graphql subscription in playground during local development throwing "Could not connect to websocket endpoint" in basic nestjs project
This is happening on a simple project during local development, so cloud infrastructure isn't an issue.
This is also happening in the application playground.
My module registration:
GraphQLModule.forRootAsync({
driver:…

SebastianG
- 8,563
- 8
- 47
- 111
0
votes
0 answers
NestJS Graphql subscription -- how to disconnect client?
I've been looking like mad trying to find some API documentation on how to do this.
I'm using 9x versions of nestjs with graphql-ws 5.11.2 and graphql-redis-subscriptions 2.5.0 and 16.5.0 graphql.
I'm doing the code first approach which has this…

SebastianG
- 8,563
- 8
- 47
- 111
0
votes
1 answer
How to add authorization headers to HTTP upgrade messages when using Subscriptions over websockets in a NODEJS Application?
I have a NODE application that also acts as a GraphQL client.
I need to fetch the data from a GraphQL server using SUBSCRIPTION requests.
The GraphQL server validates the incoming HTTP upgrade message during the handshake to establish the WebSocket…

aman bhardwaj
- 3
- 2
0
votes
0 answers
pass pubsub into context in graphql subscription
I'm struggling with this all day long, I want to implement subscriptions feature on my mongodb-express-graphql-nextjs project. I can't use context.pubsub in resolver. Am I missing something? please save me!
Problem
Cannot use pubsub in subscription…

ton1
- 7,238
- 18
- 71
- 126
0
votes
0 answers
I'm trying to use apollo graphql subscriptions with my react-native app. Works fine on android but on iOS there is no response
Here is my graphqlClient.ts file:
import {
ApolloClient,
HttpLink,
ApolloLink,
InMemoryCache,
concat,
Operation,
NextLink,
FetchResult,
Observable,
split,
} from '@apollo/client';
import { getMainDefinition } from…

Stefan Đikić
- 51
- 5
0
votes
0 answers
How to authenticate graphql-ws on nestjs?
I need to apply authentication in graphql subscription. But I get into a problem when I try to implement. I find the documentation and from the documentation -
@Module({
imports: [
ConfigModule.forRoot({ isGlobal: true }),
…

Raihan Chowdhory
- 11
- 1
0
votes
0 answers
How to authenticate graphql subscription into nestjs?
I need to apply authentication in graphql subscription. I find the documentation and from the documentation -
@Module({
imports: [
ConfigModule.forRoot({ isGlobal: true }),
ScheduleModule.forRoot(),
…

Raihan Chowdhory
- 11
- 1
0
votes
1 answer
graphql-ws createClient throws WebSocket implementation missing
I have a nextjs(client side) project,
I followed this to subscribe to my graphql subscription but I got
"WebSocket implementation missing; on Node you can import WebSocket from 'ws'; and pass webSocketImpl: WebSocket to createClient"
, it seems to…

Amir Mahmoodi
- 1
- 2
0
votes
1 answer
How to fix "Firefox can’t establish a connection to the server at wss://example.domain/subscription" issue?
This is how I have setup app.js:
/**
* Importing Packages
*/
require("dotenv").config({ path: `./env/.env-${process.env.NODE_ENV}` });
const express = require("express");
const logger …

Saswat
- 12,320
- 16
- 77
- 156