lib/pokko.tsin our projects.
POK_TOKEN. These can go into your
clientexport from this file, it will provide you with a raw GraphQL interface to query content.
.graphqlfiles that are then validated against the Pokko API and then output into Typescript files for easier consumption.
codegen.ymlfile alongside your
package.jsonwith the contents below. You can put these files wherever you like, this is just how we set things up.
.graphqlfiles in the
pokko/queriesfolder and output the generated Typescript to
POK_TOKEN=<< API TOKEN >>alongside the
yarn run graphql-codegento generate the Typescript file.
lib/pokko.tsfile to the following.