Questions tagged [graphql-subscriptions]

GraphQL subscriptions are a way to push data from the server to the clients that choose to listen to real time messages from the server.

In addition to fetching data using queries and modifying data using mutations, the GraphQL spec supports a third operation type, called subscription.

Subscriptions in GraphQL and Relay

Subscriptions in GraphQL and Apollo

280 questions
0
votes
0 answers

RTK query with Amplify Graphql subscribe

I am trying to build livechat with react native + rtk query + amplify. I can send the message through mutation and receive the first message through query. Now I want to add subscribe onCreate to receive the livechat when other user sends the…
Lee
  • 333
  • 3
  • 7
  • 19
0
votes
0 answers

GraphQL subscriptions not working with 'graphql-ws' (NestJS)

I'm trying to use 'graphql-ws' GraphQLModule.forRoot({ driver: ApolloDriver, autoSchemaFile: true, subscriptions: { 'graphql-ws': true, }, }), It's not working with 'subscriptions-transport-ws'…
0
votes
0 answers

Why is AxelSpringer Google PubSub library causing the error "Unable to detect a Project Id in the current environment"?

I am implementing GraphQL subscription based on this document using the PubSub Class. However, the document also says:- The PubSub class is not recommended for production environments, because it's an in-memory event system that only supports a…
Saswat
  • 12,320
  • 16
  • 77
  • 156
0
votes
0 answers

gql subscriptions are disconnected after background/lock and unlock the app using aws-appsync-subscription-link

I'm using React Native, and after background the application or lock the phone, when you focus it again all the subscriptions are disconnected and they are not receving events anymore (both useSubscription and subscribeToMore) I'm creating the…
0
votes
0 answers

How to properly handle errors on subscriptions with Apollo Server?

I have an Express + Apollo Server backend. I enabled subscriptions on it using ws and graphql-ws. Everything is working fine. Now, I would like to handle resolvers errors properly: hide backend details in production, change message based on error…
Tdy
  • 863
  • 12
  • 28
0
votes
0 answers

Looking for an example that connects Graphql with solace

Is there any code example that shows how we can use the Solace pubsub+ as a source and watch for events such as insertion or update at the database at the graphql server level and leverage graphql subscription service ? I came across example with…
0
votes
1 answer

Authenticate graphql subscription using aws cognito

I have a GraphQL server written in Java using Spring for GraphQL. We plan to use it for sending data to React clients using GraphQL's subscription over web sockets. Now, we need to deploy it into AWS EKS and authenticate traffic via AWS Cognito…
0
votes
0 answers

is there some solutions for over subscription payload size in AwsAppssync?

i am developing real-time canvas website with fabricjs and awsappsync. but, when publish some fabric.image object or group object data by json.stringify, sometimes it do not deliever to other clients. i found that data size is over 240kb, maximum…
0
votes
1 answer

How to attach JWT token to the header of graphql subscription

I am currently building chat application with microservice architecture, where auth(login and signup) service and chat service are separated using Graphql. I was trying to attach a JWT to the request header of query, mutation and subscription to…
0
votes
0 answers

GraphQL client for subscriptions in c++

I've been looking for some time now, how to implement graphql-subscriptions in c++ without libgraphqlparser, CAFFQL or cppgraphqlgen which are the recommended libraries for graphql implementations. Currently i am using curl for queries and…
PhiloLars
  • 1
  • 1
0
votes
1 answer

Curl command for GraphQL Subscriptions

When I tried to run a subscription using the cURL command, it always send the response with null data. Is there any way to keep returning the correct responses according to the event changes? I used the following js code to run the GraphQL…
0
votes
1 answer

How do you map PubSub value of a GraphQL subscription in Apollo?

I'm making a GraphQL backend in Apollo, and I'd like to use subscriptions. I followed Apollo's docs, and I've gotten basic subscriptions working using graphql-subscriptions. This package also comes with filtering via the built-in withFilter…
0
votes
0 answers

Apollo-server-express graphql-subscription and socket.io connection on the same PORT

Please I need a help! I'm working on a nodejs backend server which I have apollo-server-express and socket.io working perfectly. I want to add subscription to my graphql but I cant get the both to work. If I use app.listen, the socket.io works while…
0
votes
1 answer

How to implement only client to graphql subscriptions in a website with only front code?

I am coding a only front end site using Django. to query data to a DataBase I use AJAX to my Django and Django requests a third party GraphQL. so far all works perfect. But now I need to alert the users on updates to a table. the third party has…
0
votes
0 answers

GraphQL WS server doesn't appear to be running

I'm trying to get GraphQL Subscriptions working (without Apollo) using these libraries: import { graphqlHTTP } from 'express-graphql'; import { WebSocketServer } from 'ws'; import { useServer } from 'graphql-ws/lib/use/ws'; I've been reading the…
Scott
  • 3,204
  • 3
  • 31
  • 41