Skip to main content

Module select

Module select 

Source
Expand description

GraphQL SELECT-style query builder.

Accumulates a root field, a selection set, filter conditions, sort, limit/skip, and optional sub-selections for nested relationships. render() produces a (query_doc, variables) pair that GraphqlApi::post_graphql consumes directly.

Two render modes are supported via FilterDialect:

  • Hasura(where: { field: { _eq: v } }, limit: $limit, ...)
  • Generic(find: { field: v }, limit: $limit, ...) — used by hand-rolled schemas like the public SpaceX API.

Modules§

builder
Chainable builder methods for GraphqlSelect — convenience setters that don’t need to go through the Selectable trait. Useful inside the crate (the TableSource impl builds queries directly) and for ad-hoc test fixtures.
impls
render
Render a GraphqlSelect into (query_doc, variables) for HTTP POST.

Structs§

GraphqlSelect
GraphQL query builder — produces a query document + variables map.