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
1 answer

Apollo 2.x: Subscription Resolver not Firing?

There are many posts on SO that come up with a search on Apollo Subscription Resolver Never Activates?, including one from me from June 2017. Since then I've had subscriptions working well, for many months. But that was Apollo 1.x, and now with…
VikR
  • 4,818
  • 8
  • 51
  • 96
0
votes
0 answers

How to setup Google Compute Engine to work with websocket using subscriptions-transport-ws

Am using google compute engine with $300 credit, i have successfully deployed my APIs, the mutation, query are all working but the subscription seems not to be working. I used "subscriptions-transport-ws" library from apollo team, my questions…
0
votes
1 answer

Connecting to neo4j-graphql websocket for subscriptions?

I haven't found any information on how to connect to a websocket to enable graphql subscriptions on a neo4j (3.3) instance with the neo4j-graphql plugin installed. I've also unsuccessfully tried urls relating to the bolt port (localhost:7687). Is…
bebbi
  • 2,489
  • 3
  • 22
  • 36
0
votes
1 answer

Apollo-graphql: using withFilter

could you, please explain the origin of variables param passed to the withFilter function. An example provided here does not explain it. A payload is provided when publish is called, but variables... From where do we get them? and if they are needed…
Le garcon
  • 7,197
  • 9
  • 31
  • 46
0
votes
1 answer

How can I know what all clients have subscription to my graphql data?

I need to know what all clients are watching what type of data in my subscription server. How can I do that?
0
votes
1 answer

React GraphQL Subscriptions for Delete and Update

I'm trying to use GraphQL Apollo in API subscriptions for faster and realtime updates in my React Project. I'm using "subscriptions-transport-ws": "^0.8.2". But delete and update is throwing error. I'm quite new to react and JS and am not able to…
s develop
  • 115
  • 3
  • 16
0
votes
1 answer

How to define context object for graphql subscription server

With the normal graphql server we can define the context object like this: app.use('/graphql', graphqlExpress(async (req) => { return { schema, context: { app, params, } }; })); ** subscription server…
DowinskiField
  • 133
  • 2
  • 15
0
votes
1 answer

Why do GraphQL Subscriptions use an AsyncIterator?

AsyncIterator requires pulling data using .next(). But with websockets I generally want to push data when events occur. Only thing I can think of is that by using pull-based they can rate-limit. So what is calling .next()? Is it a timer, or does it…
vaughan
  • 6,982
  • 6
  • 47
  • 63
0
votes
0 answers

Relay Modern subscriptions: returning record mutiple times incrementally

I am working on a very simple app which contains Posts and comments on those Posts. I have got 1) comment_mutation.js ( Server side - i am publishing the saved comment using pubsub). I have removed unnecessary code CommentCreateMutation:…
sushil bansal
  • 1,894
  • 2
  • 12
  • 13
0
votes
1 answer

GraphQL Subscriptions do not execute nested Resolvers

There is a query player and subscription playerJoinedTable. Both should return PlayerType and both receive object with property profileId. PlayerType has property profile with resolver: profile: { type: ProfileType, resolve: (obj, args,…
OKey
  • 182
  • 1
  • 2
  • 10
0
votes
1 answer

Authorization (not authentication!) patterns with graphql-subscriptions and microservices

I've created an apollo-server with graphql-subscriptions, and that's all good so far. I can receive publications on the front-end. Great! What I want to do now is only send publications to authorized users, so, some sort of logic/test needs to be…
0
votes
2 answers

Relay subscriptions not working with react-native

I'm using Express Graphql server with react native and Relay. My device does connects to the subscription but it does not subscribe to it. Here's my index.js on the server const subscriptionServer = SubscriptionServer.create( { execute, …
0
votes
1 answer

Making a real time application using graphql subscriptions with React and Apollo

I am building a real-time application using React, Apollo and GraphQL. My plan was that a component will issue a query and then subsequently depend on subscriptions to keep the client cache consistent with backend data in real time. However, I don't…
0
votes
1 answer

Error: Can only create List of a GraphQLType but got: function GraphQLObjectType(config) , in GraphQL?

I am working on a demo project on GraphQL. But stuck here. I want to send the whole object as result. The object which I want to send is: exports.fakeDatabase = { 1: { id: 1, name: 'Abhay', …
Shubham Verma
  • 8,783
  • 6
  • 58
  • 79
0
votes
1 answer

Apollo Client subscriptions must provide schema

I have no idea why it is happening. I am listening to subscription postAdded which gets published every time I create a post using mutation. import React, { Component } from 'react' import { graphql, gql } from 'react-apollo' class App extends…
shabenda
  • 1,759
  • 3
  • 14
  • 23
1 2 3
18
19