/
Launch Apollo Studio


CLASS

LegacyInterceptorProvider

open class LegacyInterceptorProvider: InterceptorProvider

The default interceptor provider for typescript-generated code

Methods

init(client:shouldInvalidateClientOnDeinit:store:)

public init(client: URLSessionClient = URLSessionClient(),
            shouldInvalidateClientOnDeinit: Bool = true,
            store: ApolloStore = ApolloStore())

Designated initializer

  • Parameters:

    • client: The URLSessionClient to use. Defaults to the default setup.
    • shouldInvalidateClientOnDeinit: If the passed-in client should be invalidated when this interceptor provider is deinitialized. If you are recreating the URLSessionClient every time you create a new provider, you should do this to prevent memory leaks. Defaults to true, since by default we provide a URLSessionClient to new instances.
    • store: The ApolloStore to use when reading from or writing to the cache. Defaults to the default initializer for ApolloStore.

Parameters

NameDescription
clientThe URLSessionClient to use. Defaults to the default setup.
shouldInvalidateClientOnDeinitIf the passed-in client should be invalidated when this interceptor provider is deinitialized. If you are recreating the URLSessionClient every time you create a new provider, you should do this to prevent memory leaks. Defaults to true, since by default we provide a URLSessionClient to new instances.
storeThe ApolloStore to use when reading from or writing to the cache. Defaults to the default initializer for ApolloStore.

deinit

deinit

interceptors(for:)

open func interceptors<Operation: GraphQLOperation>(for operation: Operation) -> [ApolloInterceptor]

Parameters

NameDescription
operationThe operation to provide interceptors for
Edit on GitHub