Upload schema to Fauna. Fauna will add in create, update, and delete mutations as well as a read query. You will be responsible for adding in additional queries/mutations to the originating schema.
Create your queries in a queries.gql file (or multiple gql files - however you want to organize).
Add this to package.json npm scripts "gql-codegen": "gql-codegen -r dotenv/config"
Create the codegen.yml file. This file will link to your Fauna database secret (add to a .env file). This file will have a documents attribute in it which says what queries it's going to document (queries.gql).
Run npm run gql-codegen. This will generate a typescript file that has function definitions for the queries (from queries.gql) and type definitions for what they take in/ output.