src/data/mutations/user.login.js
src/data/mutations/user.logout.js
Login mutations validates user's email and password via passport.validate('basic') or passport.validate('local'), creates id_token JWT token, sends it via HttpOnly cookie and refreshes me query. Logout mutation removes id_token cookie and refreshes the me query.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
:-1: Http-api easier to use for simple apps.
Include react-relay and GraphQL server in "starter kit"?
+1 for react-relay implementation with GraphQL mutations
@Bogdaan if you already use GraphQL for data, why to use another approach for login/logout?
@koistya GraphQL/react-relay is great, and you code is awesome. Perhaps graph query/mutation is the "right way".
But there are cases where REST api is preferred:
how we can login-local via passportjs? and check user login and logout?
Most helpful comment
+1 for react-relay implementation with GraphQL mutations