cdmbase / graphql-nats-subscriptions

MIT License
15 stars 5 forks source link

not working without a logger specified #3

Open Fxlr8 opened 6 years ago

Fxlr8 commented 6 years ago

This is not working

import { NatsPubSub } from 'graphql-nats-subscriptions'
const pubsub = new NatsPubSub()

Here is the error

TypeError: Cannot read property 'child' of undefined
    at new NatsPubSub (...blah/node_modules/graphql-nats-subscriptions/src/nats-pubsub.ts:52:38)
    at Object.<anonymous> (...blah/.build/webpack:/src/pubsub.js:3:16)

Is the logger required? https://github.com/cdmbase/graphql-nats-subscriptions/blob/191b81df88d1d3ce8b6832e177b4b76e9c799e03/src/nats-pubsub.ts#L4 Why then it is not listed in dependencies? https://github.com/cdmbase/graphql-nats-subscriptions/blob/191b81df88d1d3ce8b6832e177b4b76e9c799e03/package.json#L41-L45

matheuscampanhaf commented 5 years ago

Any updates on that ?

veeramarni commented 5 years ago

The logger is still needed. You can use pino logger or some other logger. I would like to remove that dependency but I have no time to make that change. If you can create PR, I can review it.

greg-md commented 3 years ago

Still not fixed?

gedw99 commented 3 years ago

@veeramarni why not add an example showing the js and nats system working ?

it would make it much easier for me and others to get past these initial getting started bugs and likely to get more participation and eventually PR’s