ApolloSchemaDownloadConfiguration


STRUCT

ApolloSchemaDownloadConfiguration

Swift
1public struct ApolloSchemaDownloadConfiguration: Equatable, Codable

A configuration object that defines behavior for schema download.

Properties

downloadMethod

Swift
1public let downloadMethod: DownloadMethod

How to download your schema. Supports the Apollo Registry and GraphQL Introspection methods.

downloadTimeout

Swift
1public let downloadTimeout: Double

The maximum time (in seconds) to wait before indicating that the download timed out. Defaults to 30 seconds.

headers

Swift
1public let headers: [HTTPHeader]

Any additional headers to include when retrieving your schema. Defaults to nil.

outputPath

Swift
1public let outputPath: String

The local path where the downloaded schema should be written to.

outputFormat

Swift
1public var outputFormat: DownloadMethod.OutputFormat

Methods

init(using:timeout:headers:outputPath:)

Swift
1public init(
2  using downloadMethod: DownloadMethod,
3  timeout downloadTimeout: Double = 30.0,
4  headers: [HTTPHeader] = [],
5  outputPath: String
6)

Designated Initializer

  • Parameters:

    • downloadMethod: How to download your schema.

    • downloadTimeout: The maximum time (in seconds) to wait before indicating that the download timed out. Defaults to 30 seconds.

    • headers: [optional] Any additional headers to include when retrieving your schema. Defaults to nil

    • outputPath: The local path where the downloaded schema should be written to.

Parameters

NameDescription
downloadMethodHow to download your schema.
downloadTimeoutThe maximum time (in seconds) to wait before indicating that the download timed out. Defaults to 30 seconds.
headers[optional] Any additional headers to include when retrieving your schema. Defaults to nil
outputPathThe local path where the downloaded schema should be written to.
Feedback

Edit on GitHub

Forums