diff --git a/CHANGELOG.md b/CHANGELOG.md index 509f72b0f3..1561f3d2a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +## v1.0.7 + +### Fixed +- **Couldn't build when using some reserved words in a schema ([#2765](https://github.com/apollographql/apollo-ios/issues/2765)):** `for` has been added to the list of reserved keywords that are escaped with backticks when used in schema types and operations. [#2772](https://github.com/apollographql/apollo-ios/pull/2772) - _Thank you to [@torycons](https://github.com/torycons) for raising the issue._ +- **Subscript GraphQL variable from dictionary crash when Swift modifier used as key ([#2759](https://github.com/apollographql/apollo-ios/issues/2759)):** Backticks have been removed from subscript keys of input objects. [#2773](https://github.com/apollographql/apollo-ios/pull/2773) - _Thank you to [@SzymonMatysik](https://github.com/SzymonMatysik) for raising the issue._ +- **Unnamed fields in schema results in broken generated Swift code ([#2753](https://github.com/apollographql/apollo-ios/issues/2753)):** The `_` character can be used as a GraphQL field name. [#2769](https://github.com/apollographql/apollo-ios/pull/2769) - _Thank you to [@neakor](https://github.com/neakor) for raising the issue._ +- **LocalCacheMutation with an enum field fails ([#2775](https://github.com/apollographql/apollo-ios/issues/2775)):** When writing selection set data back into the cache, custom scalars are now re-encoded back into their `_jsonValue`. [#2778](https://github.com/apollographql/apollo-ios/pull/2778) - _Thank you to [@dabby-wombo](https://github.com/dabby-wombo) for raising the issue._ +- **DataDict subscript function crashes on iOS 14.4 and under ([#2668](https://github.com/apollographql/apollo-ios/issues/2668)):** `AnyHashable` conversions when accessing `DataDict` properties now perform checks on the base type. [#2784](https://github.com/apollographql/apollo-ios/pull/2784) - _Thank you to [@bdunay3](https://github.com/bdunay3) for raising the issue._ +- **`@include` directive based on variable with default value drops the included data ([#2690](https://github.com/apollographql/apollo-ios/issues/2690)):** The GraphQL executor will now correctly evaluate `GraphQLNullable` conditional variables. [#2794](https://github.com/apollographql/apollo-ios/pull/2794) - _Thank you to [@klanchman](https://github.com/klanchman) for raising the issue._ +- **Interfaces implemented by schema root are not generated ([#2756](https://github.com/apollographql/apollo-ios/issues/2756)):** Interfaces references on the root type Query, Mutation or Subscription are now included in the schema module. [#2816](https://github.com/apollographql/apollo-ios/pull/2816) - _Thank you to [@litso](https://github.com/litso) for raising the issue._ + +### Changed +- **HTTP headers format in schema download configuration JSON ([#2661](https://github.com/apollographql/apollo-ios/issues/2661)):** `HTTPHeaders` in the `ApolloSchemaDownloadConfiguration` section of the codegen configuration JSON file can now be specified using the more intuitive format `{ "Authorization": ""}`. [#2811](https://github.com/apollographql/apollo-ios/pull/2811) - _Thank you to [@nikitrivedii](https://github.com/nikitrivedii) for raising the issue._ + ## v1.0.6 ### Fixed diff --git a/Configuration/Shared/Project-Version.xcconfig b/Configuration/Shared/Project-Version.xcconfig index 14ffb264de..e833801e82 100644 --- a/Configuration/Shared/Project-Version.xcconfig +++ b/Configuration/Shared/Project-Version.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 1.0.6 +CURRENT_PROJECT_VERSION = 1.0.7 diff --git a/Sources/CodegenCLI/Constants.swift b/Sources/CodegenCLI/Constants.swift index eced349bb7..3697344dfe 100644 --- a/Sources/CodegenCLI/Constants.swift +++ b/Sources/CodegenCLI/Constants.swift @@ -1,6 +1,6 @@ import Foundation public enum Constants { - public static let CLIVersion: String = "1.0.6" + public static let CLIVersion: String = "1.0.7" static let defaultFilePath: String = "./apollo-codegen-config.json" } diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic.json b/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic.json index f36cd20a6e..aef6c9c7f0 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic.json @@ -209,15 +209,7 @@ "type" : "codeVoice" }, { - "text" : " atomically, adding +1 to the ", - "type" : "text" - }, - { - "code" : "value", - "type" : "codeVoice" - }, - { - "text" : ".", + "text" : " atomically, adding +1 to the value.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic/increment().json b/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic/increment().json index bee01460c8..790fcc3a42 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic/increment().json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollo/atomic/increment().json @@ -9,15 +9,7 @@ "type" : "codeVoice" }, { - "text" : " atomically, adding +1 to the ", - "type" : "text" - }, - { - "code" : "value", - "type" : "codeVoice" - }, - { - "text" : ".", + "text" : " atomically, adding +1 to the value.", "type" : "text" } ], @@ -231,15 +223,7 @@ "type" : "codeVoice" }, { - "text" : " atomically, adding +1 to the ", - "type" : "text" - }, - { - "code" : "value", - "type" : "codeVoice" - }, - { - "text" : ".", + "text" : " atomically, adding +1 to the value.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue.json index 31b671bb73..a2a14b91e6 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue.json @@ -256,6 +256,37 @@ "type" : "topic", "url" : "\/documentation\/apolloapi" }, +"doc://ApolloAPI/documentation/ApolloAPI/GraphQLOperation": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "protocol" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "GraphQLOperation" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/GraphQLOperation", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "GraphQLOperation" + } + ], + "role" : "symbol", + "title" : "GraphQLOperation", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/graphqloperation" +}, "doc://ApolloAPI/documentation/ApolloAPI/InputValue": { "abstract" : [ { @@ -653,7 +684,7 @@ "doc://ApolloAPI/documentation/ApolloAPI/InputValue/variable(_:)": { "abstract" : [ { - "text" : "A variable input value to be evaluated using the operation’s", + "text" : "A variable input value to be evaluated using the operation’s variables dictionary at runtime.", "type" : "text" }, { @@ -661,11 +692,16 @@ "type" : "text" }, { - "code" : "GraphQLOperation\/variables-swift.property-4o32c", - "type" : "codeVoice" + "text" : "See ", + "type" : "text" }, { - "text" : " dictionary at runtime.", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/GraphQLOperation", + "isActive" : true, + "type" : "reference" + }, + { + "text" : ".", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue/variable(_:).json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue/variable(_:).json index 7cabe58d2b..34f48bae0b 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue/variable(_:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/inputvalue/variable(_:).json @@ -1,7 +1,7 @@ { "abstract" : [ { - "text" : "A variable input value to be evaluated using the operation’s", + "text" : "A variable input value to be evaluated using the operation’s variables dictionary at runtime.", "type" : "text" }, { @@ -9,11 +9,16 @@ "type" : "text" }, { - "code" : "GraphQLOperation\/variables-swift.property-4o32c", - "type" : "codeVoice" + "text" : "See ", + "type" : "text" + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/GraphQLOperation", + "isActive" : true, + "type" : "reference" }, { - "text" : " dictionary at runtime.", + "text" : ".", "type" : "text" } ], @@ -150,7 +155,7 @@ "type" : "codeVoice" }, { - "text" : " value should not be included in an operation’s", + "text" : " value should not be included in an operation’s variables dictionary. See", "type" : "text" }, { @@ -158,11 +163,12 @@ "type" : "text" }, { - "code" : "GraphQLOperation\/variables-swift.property-4o32c", - "type" : "codeVoice" + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/GraphQLOperation", + "isActive" : true, + "type" : "reference" }, { - "text" : " dictionary.", + "text" : ".", "type" : "text" } ], @@ -246,6 +252,37 @@ "type" : "topic", "url" : "\/documentation\/apolloapi" }, +"doc://ApolloAPI/documentation/ApolloAPI/GraphQLOperation": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "protocol" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "GraphQLOperation" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/GraphQLOperation", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "GraphQLOperation" + } + ], + "role" : "symbol", + "title" : "GraphQLOperation", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/graphqloperation" +}, "doc://ApolloAPI/documentation/ApolloAPI/InputValue": { "abstract" : [ { @@ -301,7 +338,7 @@ "doc://ApolloAPI/documentation/ApolloAPI/InputValue/variable(_:)": { "abstract" : [ { - "text" : "A variable input value to be evaluated using the operation’s", + "text" : "A variable input value to be evaluated using the operation’s variables dictionary at runtime.", "type" : "text" }, { @@ -309,11 +346,16 @@ "type" : "text" }, { - "code" : "GraphQLOperation\/variables-swift.property-4o32c", - "type" : "codeVoice" + "text" : "See ", + "type" : "text" }, { - "text" : " dictionary at runtime.", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/GraphQLOperation", + "isActive" : true, + "type" : "reference" + }, + { + "text" : ".", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror.json index bbe0035796..978af8f9af 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror.json @@ -100,11 +100,12 @@ "type" : "text" }, { - "code" : "JSONDecodable\/init(jsonValue:)", - "type" : "codeVoice" + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/JSONDecodable", + "isActive" : true, + "type" : "reference" }, { - "text" : " fails.", + "text" : " initialization fails.", "type" : "text" }, { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror/couldnotconvert(value:to:).json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror/couldnotconvert(value:to:).json index 2d245b86d7..96b01124af 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror/couldnotconvert(value:to:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/jsondecodingerror/couldnotconvert(value:to:).json @@ -165,15 +165,16 @@ { "inlineContent" : [ { - "text" : "This error is thrown when the ", + "text" : "This error is thrown when a ", "type" : "text" }, { - "code" : "JSONDecodable\/init(jsonValue:)", - "type" : "codeVoice" + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/JSONDecodable", + "isActive" : true, + "type" : "reference" }, { - "text" : " fails for the expected type.", + "text" : " initialization fails for the expected type.", "type" : "text" } ], @@ -257,6 +258,49 @@ "type" : "topic", "url" : "\/documentation\/apolloapi" }, +"doc://ApolloAPI/documentation/ApolloAPI/JSONDecodable": { + "abstract" : [ + { + "text" : "A protocol for a type that can be initialized from a ", + "type" : "text" + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/JSONValue", + "isActive" : true, + "type" : "reference" + }, + { + "text" : ".", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "protocol" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "JSONDecodable" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/JSONDecodable", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "JSONDecodable" + } + ], + "role" : "symbol", + "title" : "JSONDecodable", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/jsondecodable" +}, "doc://ApolloAPI/documentation/ApolloAPI/JSONDecodingError": { "abstract" : [ { @@ -371,6 +415,45 @@ "title" : "JSONDecodingError.couldNotConvert(value:to:)", "type" : "topic", "url" : "\/documentation\/apolloapi\/jsondecodingerror\/couldnotconvert(value:to:)" +}, +"doc://ApolloAPI/documentation/ApolloAPI/JSONValue": { + "abstract" : [ + { + "text" : "Represents a value in a ", + "type" : "text" + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/JSONObject", + "isActive" : true, + "type" : "reference" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "typealias" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "JSONValue" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/JSONValue", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "JSONValue" + } + ], + "role" : "symbol", + "title" : "JSONValue", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/jsonvalue" } } } \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration.json index 327274709f..db01df0429 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration.json @@ -305,7 +305,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { @@ -428,7 +431,7 @@ "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/headers": { "abstract" : [ { - "text" : "Any additional headers to include when retrieving your schema. Defaults to nil.", + "text" : "Any additional HTTP headers to include when retrieving your schema. Defaults to nil.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/default/headers.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/default/headers.json index 1663ddd868..e7925b1581 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/default/headers.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/default/headers.json @@ -288,7 +288,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/headers.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/headers.json index f37178f57b..06fb0c86ae 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/headers.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/headers.json @@ -1,7 +1,7 @@ { "abstract" : [ { - "text" : "Any additional headers to include when retrieving your schema. Defaults to nil.", + "text" : "Any additional HTTP headers to include when retrieving your schema. Defaults to nil.", "type" : "text" } ], @@ -191,7 +191,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { @@ -223,7 +226,7 @@ "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/headers": { "abstract" : [ { - "text" : "Any additional headers to include when retrieving your schema. Defaults to nil.", + "text" : "Any additional HTTP headers to include when retrieving your schema. Defaults to nil.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader.json index 4fb4853eb6..ff96d94ae8 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader.json @@ -1,4 +1,10 @@ { + "abstract" : [ + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } + ], "hierarchy" : { "paths" : [ [ @@ -195,7 +201,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/!=(_:_:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/!=(_:_:).json index 324de5fbfc..46ca004d9b 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/!=(_:_:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/!=(_:_:).json @@ -246,7 +246,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/debugdescription.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/debugdescription.json index 2131c21cea..99a1a77f2b 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/debugdescription.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/debugdescription.json @@ -184,7 +184,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/equatable-implementations.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/equatable-implementations.json index dba9afa822..bee262e130 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/equatable-implementations.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/equatable-implementations.json @@ -103,7 +103,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(from:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(from:).json index 3d783ea7b0..85a0df89db 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(from:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(from:).json @@ -196,7 +196,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(key:value:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(key:value:).json index 4d95542b35..5a8122df70 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(key:value:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/httpheader/init(key:value:).json @@ -200,7 +200,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/init(using:timeout:headers:outputpath:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/init(using:timeout:headers:outputpath:).json index 82c817739e..d74bda0617 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/init(using:timeout:headers:outputpath:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apolloschemadownloadconfiguration/init(using:timeout:headers:outputpath:).json @@ -300,7 +300,7 @@ { "inlineContent" : [ { - "text" : "[optional] Any additional headers to include when retrieving your schema.", + "text" : "[optional] Any additional HTTP headers to include when retrieving your schema.", "type" : "text" }, { @@ -440,7 +440,10 @@ }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloSchemaDownloadConfiguration/HTTPHeader": { "abstract" : [ - + { + "text" : "An HTTP header that will be sent in the schema download request.", + "type" : "text" + } ], "fragments" : [ { diff --git a/docs/source/code-generation/codegen-configuration.mdx b/docs/source/code-generation/codegen-configuration.mdx index 5bc0818618..a758a78af2 100644 --- a/docs/source/code-generation/codegen-configuration.mdx +++ b/docs/source/code-generation/codegen-configuration.mdx @@ -556,7 +556,10 @@ The properties you will need to configure are: } }, "downloadTimeout": 60, - "headers": [], + "headers": { + "Accept-Encoding" : "gzip", + "Authorization" : "Bearer " + }, "outputPath": "./graphql/" } ``` @@ -570,7 +573,10 @@ let configuration = ApolloCodegenConfiguration( graphID: "your-graphid", variant: "current")), timeout: 60.0, - headers: [], + headers: [ + .init(key: "Accept-Encoding", value: "gzip"), + .init(key: "Authorization", value: "Bearer ") + ], outputPath: "./graphql/") ) ```