When it comes to write code you don't need to learn magic spells.
All you need is to take a look outside the window and solve your problem with patterns from the real world.
Step by step guide how to use Auth0 with Hasura in a Single Page App bootstrapped with Create React App.
How to add an Authentication layer for your GraphQL API - At the end of this article, you are able to authenticate GraphQL requests and protect your sensible queries.
How to integrate GraphQL into an ExpressJS app with ForrestJS
Create your Universal PWA in React / ExpressJS / GraphQL. With ForrestJS it's easy and fast. In this first tutorial we'll get you up and running in 27 seconds!