Skip to content
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

Me Resolver on final is misleading #137

Open
davicatunda opened this issue Apr 30, 2020 · 1 comment
Open

Me Resolver on final is misleading #137

davicatunda opened this issue Apr 30, 2020 · 1 comment

Comments

@davicatunda
Copy link

This is the resolver for me on final

me: async (_, __, { dataSources }) =>
      dataSources.userAPI.findOrCreateUser(),

However it could (and probably should) be

me: async (_, __, context) => context.user

which is the logged in user authenticated by the authorization headers.

@dylan-cm
Copy link

you might be right. However, I do want to point out that the UserAPI.findOrCreateUser method, checks for a user on the context when it is called without the email argument. Not sure one solution is better than the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants