apollographql / apollographql/graphql-subscriptions

Allow to pass symbols as event names

Open
#175 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
1.6k
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Hi and thanks for this package,

Node's EventEmitters allows symbols as event names, it would be nice to be able to use them here as well. The problematic line is here https://github.com/apollographql/graphql-subscriptions/pull/174 (for now workaround is to pass a symbol as a 1-length array). I'm not familiar with TypeScript though, so I guess there is typing stuff to adapt...

Cheers

Contributor guide

Open the contributing guide

Research direction

Start with the problematic line identified in pull request #174 and inspect the surrounding TypeScript event-name handling and its type definitions. Confirm how Node's EventEmitters accept symbols, then verify that symbols work directly as event names without the current one-element-array workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.