Operation Builder

Warning

This is a low-level generated support module. It is documented primarily for reference and type linking. Most users should not interact with it directly.

The operation builder module contains utilities for constructing GraphQL AST field selections when building custom GraphQL operations.

API Reference

class gpp_client.generated.base_operation.GraphQLArgument(argument_name: str, argument_value: Any)[source]

Bases: object

Represents a GraphQL argument and allows conversion to an AST structure.

to_ast() ArgumentNode[source]

Converts the argument to an ArgumentNode AST object.

class gpp_client.generated.base_operation.GraphQLField(field_name: str, arguments: dict[str, dict[str, Any]] | None = None)[source]

Bases: object

Represents a GraphQL field with its name, arguments, subfields, alias, and inline fragments.

formatted_variables

The formatted arguments

Type:

dict[str, dict[str, Any]]

of the GraphQL field.
alias(alias: str) GraphQLField[source]

Sets an alias for the GraphQL field and returns the instance.

formatted_variables: dict[str, dict[str, Any]]
get_formatted_variables() dict[str, dict[str, Any]][source]

Retrieves all formatted variables for the current GraphQL field, including those from subfields and inline fragments.

to_ast(idx: int, used_names: set[str] | None = None) FieldNode[source]

Converts the current GraphQL field to an AST (Abstract Syntax Tree) node.