Python Operations
Document-driven GraphQL Code Generator plugin that emits Python operation types (per-operation result + variables). This plugin is based on the `python` plugin, but it generates operations instead of schema types.
- Version
- 0.0.2
- License
- MIT
- Updated
- Oct 29, 2026
Installation
npm i -D @graphql-codegen/python-operations
yarn add -D @graphql-codegen/python-operations
pnpm add -D @graphql-codegen/python-operations
bun add -D @graphql-codegen/python-operations
For each .graphql operation document, python-operations generates:
- a per-operation result type (nested
BaseModelclasses,snake_casefields, reserved-keyword handling e.g.from→from_) - variables as a
TypedDict
Type references are generated to line up exactly with python, so run the
two plugins together.