Skip to main content

Module condition

Module condition 

Source
Expand description

GraphqlCondition — the structured filter type for the GraphQL adapter.

Conditions are kept abstract (field/op/value) and rendered to JSON at request time by the dialect attached to the data source. The two dialects that ship today:

  • FilterDialect::Hasura{ field: { _eq: v }, _and: [...], _or: [...], _not: {...} }. Full operator coverage.
  • FilterDialect::Generic — flat argument object: { field: v }. Equality only; non-eq operators error at render time. Used by hand-rolled schemas like the SpaceX public API.

Postgraphile / Relay-cursor styles can be added as further dialects without changing the condition surface.

Structs§

FieldCondition
A single field <op> value clause.

Enums§

FilterDialect
How a GraphqlCondition is rendered into a GraphQL argument object.
GraphqlCondition
Structured filter for GraphQL requests. Built by the operator trait (GraphqlOperation in operation.rs) and rendered at fetch time.
GraphqlOp
The set of comparison/logical operators a FieldCondition can use.