Frends.GraphQl.ExecuteQuery / 2.1.0
Summary
Sends a GraphQL document to an endpoint, with variables and operation name passed separately as the protocol expects, and returns both data and any errors. GraphQL reports field-level errors alongside a successful response, so the response can be partly good.
Typical use — APIs where one round trip should fetch exactly the fields needed; worth checking the errors collection even when the call succeeded
Essential parameters.
| Name | Type | Default | Example | Description |
|---|---|---|---|---|
| Query | String |
– | query ($surname: String!) { users(surname: $surname) { id name } } |
GraphQl Query |
| Variables | Variable[] |
– | [{"key" : "surname", "value" : "Doe"}] |
GraphQl variables for query |
| OperationName | String |
– | GetUser |
The name of the operation to execute. Required if the query contains multiple operations. |
| Extensions | Variable[] |
– | [{"key" : "persistedQuery", "value" : {"version": 1, "sha256Hash": "abc123"}}] |
Additional entries for protocol extensions. This is a map of additional metadata. |