apollographql / apollographql/fullstack-tutorial

Assume context is an object

Open
#81 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
808
PR merge metrics
No merged PRs in 30d

Description

Some methods check `this.context` and some assume it's an object:

https://github.com/apollographql/fullstack-tutorial/blob/master/final/server/src/datasources/user.js

I think it's safe to assume it's an object:

https://github.com/apollographql/apollo-server/blob/875944ea8358caa2140e6f7fff861f7a8f0149e4/packages/apollo-server-core/src/ApolloServer.ts#L587

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with final/server/src/datasources/user.js and compare its context handling with the ApolloServer.ts reference linked in the issue. Review the methods that check context against those that assume an object, then make their behavior consistent with the stated assumption and verify the affected tutorial flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.