We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I don't know why the subscription is not working
Mutation: { async test(root, args, { injector}){ injector.get(PubSub).publish('NUMBER_INCREMENTEDD', {messageAdded:{id:"testsuscription"}}); } } Subscription: { messageAdded: { subscribe: (root, args, { injector }) => { return injector.get(PubSub).asyncIterator('NUMBER_INCREMENTEDD'); } }
if i print the injector.get(PubSub) the result is
PostgresPubSub { ee: EventEmitter { _events: [Object: null prototype] { newListener: [Function (anonymous)], removeListener: [Function (anonymous)], NUMBER_INCREMENTEDD: [Function: pushValue] }, _eventsCount: 3, _maxListeners: undefined, notify: [Function (anonymous)], send: [Function (anonymous)], end: [Function (anonymous)], [Symbol(kCapture)]: false }, subscriptions: {}, subIdCounter: 0, client: Client { _events: [Object: null prototype] { notification: [Function (anonymous)] }, _eventsCount: 1, _maxListeners: undefined, connectionParameters: ConnectionParameters { user: 'testuser', database: 'whatsapp', port: 25432, host: 'localhost', password: 'testpassword', binary: false, ssl: false, client_encoding: '', replication: undefined, isDomainSocket: false, application_name: undefined, fallback_application_name: undefined, statement_timeout: false, idle_in_transaction_session_timeout: false, query_timeout: false, connect_timeout: 0 }, user: 'testuser', database: 'whatsapp', port: 25432, host: 'localhost', password: 'testpassword', replication: undefined, _Promise: [Function: Promise], _types: TypeOverrides { _types: [Object], text: {}, binary: {} }, _ending: false, _connecting: true, _connected: false, _connectionError: false, _queryable: true, connection: Connection { _events: [Object: null prototype], _eventsCount: 14, _maxListeners: undefined, stream: [Socket], _keepAlive: false, _keepAliveInitialDelayMillis: 0, lastBuffer: false, lastOffset: 0, buffer: null, offset: null, encoding: 'utf8', parsedStatements: {}, writer: [Object], ssl: false, _ending: false, _mode: 0, _emitMessage: false, _reader: [Object], [Symbol(kCapture)]: false }, queryQueue: [ [Query] ], binary: false, processID: null, secretKey: null, ssl: false, _connectionTimeoutMillis: 0, [Symbol(kCapture)]: false }, commonMessageHandler: [Function: defaultCommonMessageHandler] }
the subscriptions: {} is empty
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I don't know why the subscription is not working
if i print the injector.get(PubSub) the result is
the subscriptions: {} is empty
The text was updated successfully, but these errors were encountered: