je_load_density.utils.graphql.graphql_task

GraphQL helper.

Lightweight adapter that converts a GraphQL task definition into a LoadDensity HTTP task. No new user template needed — every HTTP user template can run GraphQL via this helper.

Functions

extract_field(payload, dotted_path)

Pluck a value out of a parsed GraphQL response by dotted path (e.g. data.user.id).

graphql_to_http_task(endpoint, query[, ...])

Build a POST task that submits a GraphQL operation.

je_load_density.utils.graphql.graphql_task.extract_field(payload: Dict[str, Any], dotted_path: str) Any

Pluck a value out of a parsed GraphQL response by dotted path (e.g. data.user.id). Returns None on miss.

je_load_density.utils.graphql.graphql_task.graphql_to_http_task(endpoint: str, query: str, variables: Dict[str, Any] | None = None, operation_name: str | None = None, headers: Dict[str, str] | None = None, name: str | None = None, assertions: list | None = None, extract: list | None = None) Dict[str, Any]

Build a POST task that submits a GraphQL operation.

The returned dict is a normal LoadDensity HTTP task, so all placeholders, assertions, and extractors work as usual.