GraphQL

Frends.GraphQl.ExecuteQuery / 2.2.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

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0
2.2.02026-10-23
Changed
  • Improved documentation of header and variable parameters with realistic examples.
2.1.02026-04-13
Added
  • Add a new ClientCertificate connection option
2.0.02025-11-14
Changed
  • Breaking Variable values now support complex types (objects, arrays) instead of only strings. Variables are properly serialized without double-serialization.
  • GET method now uses JSON serialization for variables instead of manual string construction.
  • GraphQL response errors are now properly detected. Result.Success is set to false when the response contains errors, and an exception is thrown when ThrowErrorOnFailure is enabled.
Added
  • Support for operationName field to specify which operation to execute when a query contains multiple operations.
  • Support for extensions field for protocol extensions and additional metadata.
1.1.02025-07-31
Changed
  • Make default error message empty by default
1.0.02025-06-03
Added
  • Initial implementation
An unhandled error has occurred. Reload 🗙