Skip to main content
The CLI loads a schema target in module:attribute form.
Use --context module:attribute to supply a context factory. The factory can be synchronous or asynchronous and is called once per GraphQL request.
Run python -m fastql --help for the current argument list. Import failures and missing attributes are reported before the server starts.

export-schema

Write a built schema’s SDL or introspection JSON, to a file or stdout.
The target is a module:attribute path to a Schema. --format is sdl (default) or json; --output writes a file instead of stdout. An unresolvable target exits non-zero.