ApolloSchemaDownloadConfiguration
STRUCT
ApolloSchemaDownloadConfiguration
1public struct ApolloSchemaDownloadConfiguration: Equatable, Codable
A configuration object that defines behavior for schema download.
Properties
downloadMethod
1public let downloadMethod: DownloadMethod
How to download your schema. Supports the Apollo Registry and GraphQL Introspection methods.
downloadTimeout
1public let downloadTimeout: Double
The maximum time (in seconds) to wait before indicating that the download timed out. Defaults to 30 seconds.
headers
1public let headers: [HTTPHeader]
Any additional headers to include when retrieving your schema. Defaults to nil.
outputPath
1public let outputPath: String
The local path where the downloaded schema should be written to.
outputFormat
1public var outputFormat: DownloadMethod.OutputFormat
Methods
init(using:timeout:headers:outputPath:)
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
Name | Description |
---|---|
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. |