codegen.ymlin your root directory and add the below lines
schema- Link to graphql schema
documents- Path of your queries
generates- It is going to generate the types in
plugins- The plugins it will use to create the types.
exportFragmentSpreadSubTypes- If set to true, it will export the sub-types created in order to make it easier to access fields declared under fragment spread.
package.jsonto execute the codegen.
yarn generatewont generate any types yet because we have not written any query.
index.tswhich is again in the root folder.
lib/graphql.tswhich got generated and has all the necessary types.