apollographql / apollographql/graphql-subscriptions

Authorizing subscriptions

Open
#90 12 comments 6 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
1.6k
Forks
129
PR merge metrics
No merged PRs in 30d

Description

I've got a `foobarUpdated` subscription, but I need to authorize the users who subscribe to it as well as validate the variable (if the given id is not a valid foobar id, subscription doesn't make sense).

Is there a way to deny/cancel a subscription? I'm using `withFilter` but that only works for filtering after the subscription has been initiated.

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by tracing the subscription entry point and the withFilter behavior; determine where authorization and variable validation are handled before initiation. Done means the supported behavior for rejecting unauthorized users or invalid foobar IDs is defined and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.