Less than 1 minute
SubQuery simplifies and ensures type-safety when working with GraphQL entities, actions, and transactions.
yarn
yarn codegen
npm
npm run-script codegen
This action will generate a new directory (or update the existing one) named src/types
. Inside this directory, you will find automatically generated entity classes corresponding to each type defined in your schema.graphql
. These classes facilitate type-safe operations for loading, reading, and writing entity fields. You can learn more about this process in the GraphQL Schema section.
Now that you have made essential changes to the GraphQL Schema file, let’s move forward to the next file.