-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user and userID undefined in application resolvers #803
Comments
I'd be more than willing to hire someone to help get this fixed. Any ideas? |
@stolinski if you can provide a reproducible example I might be able to help you :) |
I'll see what I can put together @pradel I'll have to get a db with creds I'm able to share. |
After digging in a bit more, I've realized that I have a fundamental misunderstanding of what this library does not do. After looking things over I realized that I'm not sending the auth token on requests, which is why user data isn't available in context. My ideal use would be to mirror how Meteor/Apollo configuration worked and have user data available on every resolver via context. I'll most likely end up using a bits of this and some custom work to replicate . Thanks! |
This is kinda a weird one. Everything with accounts-js is working as expected however my application's context shows user and userId as undefined. The weird part is that
accountsGraphQL.getUser()
successfully returns the user. I noticed that the resolver in accounts-js is simply just returning from context however from within my application I'm unable to get the context user defined.Apollo Client Setup
relevant parts of Apollo server setup
Sample query resolver
This means that authenticated resolvers also refuse to run due to auth errors. Is there any reason why context is working for accounts-js resolvers and not for my own? I'll be happy to submit a recipe once this is working for a Meteor => NextJS conversion.
The text was updated successfully, but these errors were encountered: