angel-dart / angel

[ARCHIVED] A polished, production-ready backend framework in Dart for the VM, AOT, and Flutter.
https://angel-dart.dev/
MIT License
1.06k stars 67 forks source link

Recommended way to access current user #201

Closed thosakwe closed 3 years ago

thosakwe commented 4 years ago

This issue was originally created by @venkatd here, before being automatically moved: https://github.com/angel-dart-archive/graphql/issues/38


I'm unsure how I to store current user inside and later access to it in my resolvers. What is the recommended way to do this?

I see there are some variables set like so:

    var globalVariables = <String, dynamic>{
      '__requestctx': req,
      '__responsectx': res,
    };

But not sure how to add data to them.