Me Resolver on final is misleading
davicatunda opened this issue · comments
Davi Catunda commented
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 Cortez-Modell commented
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.