ApolloSchemaDownloadConfiguration
STRUCT
ApolloSchemaDownloadConfiguration
1public struct ApolloSchemaDownloadConfigurationA configuration object that defines behavior for schema download.
Properties
downloadMethod
1public let downloadMethod: DownloadMethodHow to download your schema. Supports the Apollo Registry and GraphQL Introspection methods.
downloadTimeout
1public let downloadTimeout: DoubleThe maximum time to wait before indicating that the download timed out, in seconds. Defaults to 30 seconds.
headers
1public let headers: [HTTPHeader]Any additional headers to include when retrieving your schema. Defaults to nil.
outputURL
1public let outputURL: URLThe URL of the folder in which the downloaded schema should be written.
Methods
init(using:timeout:headers:outputFolderURL:schemaFilename:)
1public init(using downloadMethod: DownloadMethod,
2 timeout downloadTimeout: Double = 30.0,
3 headers: [HTTPHeader] = [],
4 outputFolderURL: URL,
5 schemaFilename: String = "schema")Designated Initializer
Parameters:
downloadMethod: How to download your schema.
downloadTimeout: The maximum time to wait before indicating that the download timed out, in seconds. Defaults to 30 seconds.
headers: [optional] Any additional headers to include when retrieving your schema. Defaults to nil
outputFolderURL: The URL of the folder in which the downloaded schema should be written
schemaFilename: The name, without an extension, for your schema file. Defaults to `"schema"
Parameters
| Name | Description |
|---|---|
| downloadMethod | How to download your schema. |
| downloadTimeout | The maximum time to wait before indicating that the download timed out, in seconds. Defaults to 30 seconds. |
| headers | [optional] Any additional headers to include when retrieving your schema. Defaults to nil |
| outputFolderURL | The URL of the folder in which the downloaded schema should be written |
| schemaFilename | The name, without an extension, for your schema file. Defaults to `“schema” |