npm i -D @graphql-codegen/typescript-operations @graphql-codegen/typescript-react-apollo @graphql-codegen/cli @graphql-codegen/add
then add codegen.yml
to the project
overwrite: true
schema: "https://your.endpoint.com/graphql"
documents: "src/graphql/*.ts"