Documentation
¶
Overview ¶
Package graphqlcompat provides a graphql.Client (genqlient's interface) backed by the defederator federation planner. Swap one constructor call; keep all existing genqlient-generated types and functions unchanged.
Because genqlient delivers the query document at call time (not at startup), this package builds plans lazily on first use and caches them by operation name. For code generated by defederator, use the generated NewClient directly — it pre-builds plans at startup and does not pay this per-operation cold start.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(sg *federation.Supergraph, httpClient *http.Client) graphql.Client
NewClient returns a graphql.Client that routes all requests through the federation query planner instead of a gateway.
Types ¶
This section is empty.