question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create login(), logout() GraphQL mutations

See original GitHub issue
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.

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
Bogdaancommented, Mar 16, 2016

@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:

  • mobile-app / native-app clients
  • no-backend app ( web-client <–> RSK <–> Scala/Python/C++/hhvm backend )
8reactions
Bogdaancommented, Feb 29, 2016

👎 Http-api easier to use for simple apps. Include react-relay and GraphQL server in “starter kit”?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simple Logout with GraphQL - Part 19 - YouTube
Learn how to logout users with GraphQL.Code: https://github.com/benawad/ graphql -ts-server-boilerplate/tree/20_simple_logoutPlaylist: ...
Read more >
Mutations - Ariadne GraphQL
Mutation type with two mutations: login mutation that requires username and password strings and returns bool with status, and logout that takes no ......
Read more >
A guide to authentication in GraphQL
When your session is over, you can call a logout mutation which invalidates the session token. On the surface, this looks quite reasonable,...
Read more >
Logging out a logged user through the Parse GraphQL API
Using the Parse GraphQL API, you can log out a logged user just by sending the user's sessionToken through the X-Parse-Session-Token header (as...
Read more >
Headless WordPress: Log-out using GraphQL & ReactJS
Creating the GraphQL Mutation# ... We need to register a logout mutation in WP GraphQL first which logs the user out and unsets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found