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 the default GraphQLJson and a build-time generated GraphQLDocumentRegistry.

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(context: Context, json: GraphQLJson, registry: GraphQLDocumentRegistry, level: ILogger.Level = ILogger.Level.INFO): GraphConverter(source)

Creates a GraphConverter with a custom GraphQLJson instance and a build-time generated GraphQLDocumentRegistry.

Parameters

context

A valid application context

json

A GraphQLJson implementation for serialization

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.


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

Creates a registry-first GraphConverter with a custom GraphQLJson 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

json

A GraphQLJson implementation for serialization.

registry

A build-time generated registry of GraphQL operations.

level

Minimum log level.