{"action":"created","issue":{"url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions/issues/10","repository_url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions","labels_url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions/issues/10/comments","events_url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions/issues/10/events","html_url":"https://github.com/davidyaha/graphql-redis-subscriptions/issues/10","id":186915778,"number":10,"title":"Use `redis.createClient` rather than the RedisClient constructor","user":{"login":"thebigredgeek","id":2799276,"avatar_url":"https://avatars.githubusercontent.com/u/2799276?v=3","gravatar_id":"","url":"https://api.github.com/users/thebigredgeek","html_url":"https://github.com/thebigredgeek","followers_url":"https://api.github.com/users/thebigredgeek/followers","following_url":"https://api.github.com/users/thebigredgeek/following{/other_user}","gists_url":"https://api.github.com/users/thebigredgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/thebigredgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebigredgeek/subscriptions","organizations_url":"https://api.github.com/users/thebigredgeek/orgs","repos_url":"https://api.github.com/users/thebigredgeek/repos","events_url":"https://api.github.com/users/thebigredgeek/events{/privacy}","received_events_url":"https://api.github.com/users/thebigredgeek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-02T20:47:47Z","updated_at":"2016-12-13T13:27:17Z","closed_at":null,"body":"It's a bit confusing that we are using the RedisClient constructor directly, as all of the docs (including options) for node_redis are around `redis.createClient`.  Because of this, there is at least one discrepancy with passing connection options to redis.  According to current [node_redis docs here](https://github.com/NodeRedis/node_redis/blame/master/README.md#L184), the client should be able to specify a `url` option rather than passing `host` and `port` options through the connection hash that you pass through to `node_redis`.  However, the `RedisClient` constructor does not support a `url` property.  The `url` property is normalized and split into `host` and `port` properties through a call [here](https://github.com/NodeRedis/node_redis/blob/master/index.js#L1081), which dives into `lib/createClient.js` and parsed into `host` and `port` [here](https://github.com/NodeRedis/node_redis/blob/master/lib/createClient.js#L26).  Passing the `url` option through `options.connection` in `RedisPubSub` constructor causes an attempted connection to `redis://127.0.0.1:6379`, regardless of what is passed via `url`.  Because of this discrepancy, and for the sake of developer sanity, I think it makes more sense to interact with the publicly documented API of `node_redis` (aka, `redis.createClient(options: Object)` rather than interface with the `RedisClient` constructor directly as it fits more inline with the `node_redis` docs and this lib provides a passthrough via `options.connection` which will be assumed to follow the `node_redis` publicly doc'd API.  I am willing to put in a PR to make this switch later this week. "},"comment":{"url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions/issues/comments/266737922","html_url":"https://github.com/davidyaha/graphql-redis-subscriptions/issues/10#issuecomment-266737922","issue_url":"https://api.github.com/repos/davidyaha/graphql-redis-subscriptions/issues/10","id":266737922,"user":{"login":"davidyaha","id":2580920,"avatar_url":"https://avatars.githubusercontent.com/u/2580920?v=3","gravatar_id":"","url":"https://api.github.com/users/davidyaha","html_url":"https://github.com/davidyaha","followers_url":"https://api.github.com/users/davidyaha/followers","following_url":"https://api.github.com/users/davidyaha/following{/other_user}","gists_url":"https://api.github.com/users/davidyaha/gists{/gist_id}","starred_url":"https://api.github.com/users/davidyaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidyaha/subscriptions","organizations_url":"https://api.github.com/users/davidyaha/orgs","repos_url":"https://api.github.com/users/davidyaha/repos","events_url":"https://api.github.com/users/davidyaha/events{/privacy}","received_events_url":"https://api.github.com/users/davidyaha/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T13:27:17Z","updated_at":"2016-12-13T13:27:17Z","body":"@youngboy Actually working on it right now.. will be published in a couple of hours"}}
{"actor":{"display_login":"davidyaha"}}