You are viewing documentation for a previous version of this software.

Switch to the latest stable version.

ApolloSchemaDownloadConfiguration


STRUCT

ApolloSchemaDownloadConfiguration

Swift
1public struct ApolloSchemaDownloadConfiguration

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 to wait before indicating that the download timed out, in seconds. Defaults to 30 seconds.

headers

Swift
1public let headers: [HTTPHeader]

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

outputURL

Swift
1public let outputURL: URL

The URL of the folder in which the downloaded schema should be written.

Methods

init(using:timeout:headers:outputFolderURL:schemaFilename:)

Swift
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

NameDescription
downloadMethodHow to download your schema.
downloadTimeoutThe 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
outputFolderURLThe URL of the folder in which the downloaded schema should be written
schemaFilenameThe name, without an extension, for your schema file. Defaults to `“schema”
Feedback

Edit on GitHub

Forums