graphql-subscriptions

How can I implement apollographql client into the maven project to activate subscription?

牧云@^-^@ 提交于 2020-06-29 04:24:26
问题 I am trying to create a graphql client in Java project and I am using apollographql library. The problem is that I am not able to get the dependencies using the pom.xml with version different than from Central repository. The other thing is that all of the examples are built with Gradle. Do you have any examples or ideas about how to create a simple subscription client using apollo library and maven project? One of the specific issues that I have is that once apollographql-runtime library is

GraphQL Subscriptions: Max Listeners Exceeded Warning

怎甘沉沦 提交于 2020-05-25 17:07:38
问题 We are using GraphQL Subscriptions and pubsub to subscribe to posts. When more than 10 subscriptions occur we get the the node warning "MaxListenersExceededWarning: Possible EventEmitter memory leak detected." Is it possible to raise the max listeners in the pubsub class? The pubsub class is inside a separate module and looks like this: import { PubSub } from 'graphql-subscriptions'; const pubsub = new PubSub(); export { pubsub }; The subscription server looks like this: import {

GraphQL Subscriptions: Max Listeners Exceeded Warning

ぐ巨炮叔叔 提交于 2020-05-25 17:06:16
问题 We are using GraphQL Subscriptions and pubsub to subscribe to posts. When more than 10 subscriptions occur we get the the node warning "MaxListenersExceededWarning: Possible EventEmitter memory leak detected." Is it possible to raise the max listeners in the pubsub class? The pubsub class is inside a separate module and looks like this: import { PubSub } from 'graphql-subscriptions'; const pubsub = new PubSub(); export { pubsub }; The subscription server looks like this: import {

Subscribe to a List of Group / Private Chats in AWS AppSync

人盡茶涼 提交于 2020-01-01 07:09:10
问题 Im currently evaluating AWS AppSync as a backend solution for a messaging app. The users will have a view to explore new Chat Groups and a different view where they see a list of their joined and private Chats (In the list the name and the last message of the chats should be displayed). Each Chat will of course have a detail view where all the messages are displayed. The question is how to design the subscription part. My Mutation to send a message will look something like this: createMessage

AWS AppSync Authorization

喜你入骨 提交于 2019-12-31 22:27:12
问题 I'm planning to use AWS Appsync to migrate a graphQL endpoint in a lambda function, which is being triggered by a POST via the API Gateway. I'm looking into AppSync mainly because of the subscriptions, which I can't create using a Lambda function. My Authentication mechanism is based on Auth0, using passwordless, and my authorization mechanism in based on the data from several tables in DynamoDB and it's embedded in the graphQL resolvers, as recommended by Facebook and Apollo. What is more,

AWS AppSync Authorization

浪子不回头ぞ 提交于 2019-12-31 22:27:11
问题 I'm planning to use AWS Appsync to migrate a graphQL endpoint in a lambda function, which is being triggered by a POST via the API Gateway. I'm looking into AppSync mainly because of the subscriptions, which I can't create using a Lambda function. My Authentication mechanism is based on Auth0, using passwordless, and my authorization mechanism in based on the data from several tables in DynamoDB and it's embedded in the graphQL resolvers, as recommended by Facebook and Apollo. What is more,

GraphQL-subscriptions: How to get published object in subscription resolver

↘锁芯ラ 提交于 2019-12-25 09:01:20
问题 I am using an express server with GraphQL subscriptions and subscriptions-transport-ws. I have set up the subscription with a given channel: ... const subscriptionManager = new SubscriptionManager({ schema: executableSchema, pubsub: pubsub, setupFunctions: { testRunChanged: (options, args) => { return { testRunChangedChannel: { filter: (testRun) => { return testRun.id === args.testRunId; } }, }; }, }, }); ... After a mutation is received a process is started on the server where the database

Looking for code for a server side GraphQL subscription listener

独自空忆成欢 提交于 2019-12-20 04:54:18
问题 I have been looking high and low for some code that will allow me to register to a GraphQL subscription on the server side and read messages, coming from the external subscription server on the server side. I can get my server-side subscription client to connect to the external subscription server, but I after get an initial null message upon connection like so { message: 'From Default Listener', data: { data: { eventAdded: null } } } no messages get captured there after. Help, please? Here

How to use subscriptions-transport-ws with passport and express-session

陌路散爱 提交于 2019-12-12 08:14:39
问题 I'm using a passport local strategy that works well with express: passport.use(localStrategy); passport.serializeUser((user, done) => done(null, JSON.stringify(user))); passport.deserializeUser((obj, done) => done(null, JSON.parse(obj))); app.use(passport.initialize()); app.use(passport.session()); This localStrategy is doing a Mongoose call to get the user based on his pubKey and I guess that request.user is populated by this way. I setup my graphql endpoint like this: app.use('/graphql',