create

fun create(context: Context, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Default creator that uses a predefined gson configuration

Parameters

context

A valid application context

level

Minimum log level


fun create(context: Context, gson: Gson, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Allows you to provide your own Gson configuration which will be used when serialize or deserialize response and request bodies.

Parameters

context

A valid application context

gson

Custom gson implementation

level

Minimum log level


fun create(context: Context, registry: GraphQLDocumentRegistry, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Creates a GraphConverter with a build-time generated GraphQLDocumentRegistry.

When a registry is provided, the converter will resolve operation documents from the registry before falling back to asset-based file discovery.

Parameters

context

A valid application context

registry

A build-time generated registry of GraphQL operations

level

Minimum log level


fun create(context: Context, gson: Gson, registry: GraphQLDocumentRegistry, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Creates a GraphConverter with a custom Gson configuration and a build-time generated GraphQLDocumentRegistry.

Parameters

context

A valid application context

gson

Custom gson implementation

registry

A build-time generated registry of GraphQL operations

level

Minimum log level


fun create(registry: GraphQLDocumentRegistry, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Creates a GraphConverter that resolves operation documents from a build-time generated GraphQLDocumentRegistry without requiring an Android Context.

If a requested GraphQuery operation is not registered, request conversion fails fast with IllegalStateException because no asset fallback is available in this mode.

Parameters

registry

A build-time generated registry of GraphQL operations.

level

Minimum log level.


fun create(gson: Gson, registry: GraphQLDocumentRegistry, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Creates a registry-first GraphConverter with a custom Gson instance and without requiring an Android Context.

If a requested GraphQuery operation is not registered, request conversion fails fast with IllegalStateException because no asset fallback is available in this mode.

Parameters

gson

Custom gson implementation.

registry

A build-time generated registry of GraphQL operations.

level

Minimum log level.