[Bug?]: Context from graphql-server no longer carrying currentUser post 7.x.x #10101
Closed
1 task done
Labels
bug/needs-info
More information is needed for reproduction
What's not working?
This is new and wasn't addressed in the upgrade guide:
'"@redwoodjs/graphql-server"' has no exported member named 'context'. Did you mean 'Context'?
I have various redwood functions that need to pull user data, and it's typically done via:
import {
context as globalContext
} from '@redwoodjs/graphql-server'
const user = globalContext.currentUser
But now it fails with
TypeError: Cannot read properties of undefined (reading 'currentUser')
I think this may be related to #9371
How do we reproduce the bug?
yarn rw g function testContextNotWorking
import {
context as globalContext
} from '@redwoodjs/graphql-server'
Then in the function:
const user = globalContext.currentUser
This should cause it to crash
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: