You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a setup with apollo-graphql and express, and I need to do some stuff with the context after accounts is done with it.
I used to have
"let context = await accounts.context(req);
if (context.session.body.blah == 'foo') { ... do something } ",
but now I have stricted up my typescript and I don't actually know what type context should be such that I am able to access session and body.
ModuleContext is not enough at least.
I have created my own type interface hierarchy to represent what I need from this object, but I'd prefer if I could either get this directly from the API, or at minimal from documentation.
System information
Version of accounts-js: [e.g. 0.0.27]
Additional context
Reposted from forum where it was suggested to fix this with generics.
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
I have a setup with apollo-graphql and express, and I need to do some stuff with the context after accounts is done with it.
I used to have
"let context = await accounts.context(req);
if (context.session.body.blah == 'foo') { ... do something } ",
but now I have stricted up my typescript and I don't actually know what type context should be such that I am able to access session and body.
ModuleContext is not enough at least.
I have created my own type interface hierarchy to represent what I need from this object, but I'd prefer if I could either get this directly from the API, or at minimal from documentation.
System information
Additional context
Reposted from forum where it was suggested to fix this with generics.
The text was updated successfully, but these errors were encountered: