The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild


Hive logoHive blurred logo


Schema Registry for your GraphQL Workflows

Skip to main content

All Presets

GraphQL Code Generator also support presets - which is a way to manipulate and affect the execution of plugins.

Presets are CLI extensions, that allow manipulation of a generates section of codegen, based on custom logic.

You can use and writes presets to tell codegen which output files to creates, and what each one should include.

Available Presets

NamePurposePackage Name & Docs
near-operation-fileGenerates operation code near the source file@graphql-codegen/near-operation-file-preset
gql-tag-operationsGenerate types for inline gql tag usages. Reduces import statement amount and the file count significantly.@graphql-codegen/gql-tag-operations-preset
import-types-Allow you to separate base types declarations and the operations that uses it@graphql-codegen/import-types-preset
graphql-modulesGenerates types and resolvers signature for GraphQL-Modules@graphql-codegen/graphql-modules-preset