Skip to main content

Module api

Module api 

Source
Expand description

GraphqlApi — the data source struct.

Wraps a single HTTP endpoint and a reqwest client. Each query goes out as one POST with { "query": …, "variables": {…} } and the JSON data payload comes back as serde_json::Value. Higher layers (GraphqlSelect, TableSource) build the request body and parse the response.

The query language itself is handled by the query builder in the select module — GraphqlApi is just transport.

Structs§

GraphqlApi
GraphQL HTTP data source. Cheap to clone — the inner reqwest::Client is Arc-wrapped.
GraphqlApiBuilder
Builder for GraphqlApi. Use GraphqlApi::builder to start.