question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`context` is initially undefined since v1.9.0

See original GitHub issue

Since 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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

3reactions
mcrawshawcommented, Nov 4, 2021

Confirmed as resolved in 0.9.1.

3reactions
n1ru4lcommented, Nov 4, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found