GraphQLRequestConverter
Backend-neutral GraphQL request body converter.
GraphQLRequestConverter is the neutral counterpart of the legacy GraphRequestConverter. It accepts only GraphQLOperationRequest bodies and delegates serialization entirely to a GraphQLTransportCodec; it never references a JSON backend, a document registry, or asset discovery.
Type forwarding
The complete Java Type of the body parameter as declared by the Retrofit method (for example GraphQLOperationRequest<GetUserVariables>) is forwarded to GraphQLTransportCodec.encodeRequest so the codec can resolve the typed variables serializer without reflection on the runtime class.
Failure behavior
Unsupported body types fail with IllegalArgumentException naming both the actual runtime type and the expected neutral type.
Codec failures propagate as co.anitrend.retrofit.graphql.serialization.GraphQLRequestEncodingException, which already carries the operation name and request type context.
Parameters
The explicit GraphQLTransportCodec used to serialize bodies.
The complete Java reflection Type of the request body parameter, including generic arguments, as provided by Retrofit.
See also
Functions
Converts a GraphQLOperationRequest into a JSON request body.