graphql

package
v0.37.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package graphql implements the ```graphql rehearse step block: a GraphQL query with `url=<endpoint>` in the info string, an optional `-- variables: {...}` directive, plus `-- assert-jsonpath: <path> == <json-value>` and `-- capture-jsonpath: <name> = <path>` directives. The block is compiled onto a generated Hurl document — a POST of the JSON body {query,variables} with `HTTP 200` asserted and the jsonpath asserts/captures in Hurl syntax — and executed via the hurl package's delegation, inheriting its missing-binary skip semantics and context-bag handling (REQ: graphql-block, REQ: context-bag).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(url, body string) (string, error)

Compile turns a graphql block (endpoint URL + query + directives) into a Hurl document: POST of the JSON body {query,variables}, `HTTP 200` asserted, jsonpath captures/asserts in Hurl syntax (REQ: graphql-block).

Types

type Executor

type Executor struct{}

Executor runs graphql step blocks.

func New

func New() *Executor

New returns the graphql block executor.

func (*Executor) Kind

func (*Executor) Kind() string

Kind returns "graphql".

func (*Executor) RequiredBinary

func (*Executor) RequiredBinary() string

RequiredBinary names the external binary the compiled document is delegated to, feeding the runner's upfront missing-binary scan — a scenario with a graphql block skips exactly like one with a hurl block when hurl is not on PATH (REQ: graphql-block).

func (*Executor) Run

Run compiles the block onto a Hurl document and delegates it to the hurl engine. The context bag flows through untouched as --variable flags — the graphql body gets no textual interpolation (REQ: context-bag).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL