Skip to content

GraphQL G2: client HTTP binding, errors and local validation #1584

Closed

Description

@jlouvel

Part of #1581. Depends on G0.

GraphqlClientAdapter over a borrowed org.restlet.Client:

  • POST with Accept: application/graphql-response+json, application/json;q=0.9; variables serialized as JSON values, never templated as text.
  • Documents as String or graphql.language.Document (printed with AstPrinter).
  • Optional setSchema(GraphQLSchema): parse and validate locally, return errors without a network call. The extension never fetches a schema itself.
  • A 4xx with a GraphQL body becomes an ExecutionResult with errors; connection failures, timeouts and non-GraphQL responses throw GraphqlTransportException with the status and a bounded body excerpt.
  • maxResponseBytes (10 MiB) enforced, never truncated silently.
  • start()/stop() lifecycle; the borrowed Client is never stopped. Request customizer for API-key headers.
  • Round trip against the G1 server and against a third-party GraphQL server in test scope.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions