`context` is initially undefined since v1.9.0
See original GitHub issueSince v1.9.0 the context
in a resolver seems to be initially undefined.
This leads to errors like
Cannot read properties of undefined (reading ‘session’)
Here’s a repro: https://stackblitz.com/edit/node-ysprk8
I’ve just taken the context example from graphql-helix
.
When you switch the versions in the stackblitz from v1.9.0
to v1.8.4
in package.json
it will work again.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:8
Top Results From Across the Web
React context returns undefined on first login, but works on ...
I face problem of after page refresh login context gone undefined. ... will run only one time at initial time as I didn't...
Read more >Typing React Context to avoid an undefined default value
Now we want to create provide our context with the custom hook's state, first we will declare our context: const SidebarContext = React....
Read more >Context | Android Developers
MutableContextWrapper, Special version of ContextWrapper that allows the base context to be modified after it is initially set.
Read more >React Query and TypeScript - TkDodo's blog
React Query was initially written in JavaScript (v1), and was then re-written to TypeScript with v2. This means that right now, ...
Read more >Underscore.js
Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed as resolved in 0.9.1.
Fix is being worked on in https://github.com/contrawork/graphql-helix/pull/91