infrahub_sdk.graphql
Functions
convert_to_graphql_as_string
convert_to_graphql_as_string(value: str | bool | list | BaseModel | Enum | Any, convert_enum: bool = False) -> str
render_variables_to_string
render_variables_to_string(data: dict[str, type[str | int | float | bool]]) -> str
Render a dict into a variable string that will be used in a GraphQL Query.
The $ sign will be automatically added to the name of the query.
render_query_block
render_query_block(data: dict, offset: int = 4, indentation: int = 4, convert_enum: bool = False) -> list[str]
render_input_block
render_input_block(data: dict, offset: int = 4, indentation: int = 4, convert_enum: bool = False) -> list[str]
Classes
BaseGraphQLQuery
Methods:
render_first_line
render_first_line(self) -> str
Query
Methods:
render
render(self, convert_enum: bool = False) -> str
Mutation
Methods:
render
render(self, convert_enum: bool = False) -> str