-
-
Notifications
You must be signed in to change notification settings - Fork 139
Closed
Description
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
- Version of accounts-js: [e.g. 0.0.27]
Additional context
Reposted from forum where it was suggested to fix this with generics.