Skip to main content

Input objects

@Input follows the same class metadata contract as @Type, but its fields are compiled as GraphQL input fields and cannot have output resolvers.

Interfaces and unions

Use interfaces when members guarantee shared fields. Use unions when members only share a possible result position.

Enums and scalars

@Enum maps Python enum members to GraphQL enum values. @Scalar or Scalar(...) defines custom serialization and parsing. Include non-root types explicitly in build_schema(types=[...]) when they are not reachable through a root field.