Skip to Main Content
React Projects
book

React Projects

by Roy Derks
December 2019
Intermediate to advanced content levelIntermediate to advanced
474 pages
10h 3m
English
Packt Publishing
Content preview from React Projects

Receiving JWT from the GraphQL server

The GraphQL server has already been set up to handle authentication since we sent a document containing a mutation with our login information to it. When you send the correct username and password, the server will return a JWT containing your username and expiration date. Sending a query to the GraphQL server can be done by using a Mutation component from react-apollo or by using the React Apollo Hooks, which offer you more flexibility. Logging in can be done from the Login component, which you can find in the client/src/components/Checkout/Login.js file, where the following changes need to be made to authenticate the user:

  1. The React Apollo Hook for the mutation will need a document that will be sent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

React Projects - Second Edition

React Projects - Second Edition

Roy Derks
Test-Driven React

Test-Driven React

Trevor Burnham

Publisher Resources

ISBN: 9781789954937Supplemental Content