diff --git a/apollo-ios-codegen/Sources/ApolloCodegenLib/Constants.swift b/apollo-ios-codegen/Sources/ApolloCodegenLib/Constants.swift index 67a76308b..10961f1c9 100644 --- a/apollo-ios-codegen/Sources/ApolloCodegenLib/Constants.swift +++ b/apollo-ios-codegen/Sources/ApolloCodegenLib/Constants.swift @@ -1,5 +1,5 @@ import Foundation public enum Constants { - public static let CodegenVersion: String = "1.16.1" + public static let CodegenVersion: String = "1.17.0" } diff --git a/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift b/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift index e07648ea0..5158f5e0e 100644 --- a/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift +++ b/apollo-ios-codegen/Sources/CodegenCLI/Constants.swift @@ -1,6 +1,6 @@ import Foundation public enum Constants { - public static let CLIVersion: String = "1.16.1" + public static let CLIVersion: String = "1.17.0" static let defaultFilePath: String = "./apollo-codegen-config.json" } diff --git a/apollo-ios/CHANGELOG.md b/apollo-ios/CHANGELOG.md index f957fe2b4..2349d0062 100644 --- a/apollo-ios/CHANGELOG.md +++ b/apollo-ios/CHANGELOG.md @@ -1,6 +1,21 @@ # Change Log +## v1.17.0 + +### New +- **Add suffix to schema type filenames ([#2598](https://github.com/apollographql/apollo-ios/issues/2598)):** When fragments were named the same as schema types code generation would produce two files with the same name, but at different paths, for each respective type. This would cause a build error in Xcode. There is a new codegen configuration option (`appendSchemaTypeFilenameSuffix`) to add a suffix to schema generated filenames and prevent the build error. See PR [#580](https://github.com/apollographql/apollo-ios-dev/pull/580). +- **Specify caching fields with `typePolicy` directive ([#554](https://github.com/apollographql/apollo-ios-dev/pull/554)):** The `@typePolicy` directive lets you specify an object's cache ID using key fields of the response object. See the [documentation](https://www.apollographql.com/docs/ios/caching/cache-key-resolution#the-typepolicy-directive) for full details. _Thank you to [@x-sheep](https://github.com/x-sheep) for the contribution._ +- **Emit `Identifiable` conformance on `SelectionSet` ([#584](https://github.com/apollographql/apollo-ios-dev/pull/584)):** If the `@typePolicy` of a type uses a `keyField` of `id` the selection set will emit conformance to Swifts [`Identifiable` protocol](https://developer.apple.com/documentation/swift/identifiable). _Thank you to [@x-sheep](https://github.com/x-sheep) for the contribution._ + +### Improvement +- **Improved performance of code generation on operations with many nested fragments ([#3434](https://github.com/apollographql/apollo-ios/issues/3434)):** When fragment field merging is disabled the fragment selection trees are no longer merged into the `EntitySelectionSet` while building operations. See PR [#571](https://github.com/apollographql/apollo-ios-dev/pull/571). + +### Fixed +- **Defer metadata extension ([#3505](https://github.com/apollographql/apollo-ios/issues/3503)):** Metadata extensions for deferred selection sets were incorrectly generated inside the namespace extension for `embeddedInTarget` and `other` module types. See PR [#581](https://github.com/apollographql/apollo-ios-dev/pull/581). +- **`DataDict` initialization of `deferredFragments` for named fragments ([#587](https://github.com/apollographql/apollo-ios-dev/pull/587)):** When deferred fragments are named fragments the deferred type should be the fragment generated definition name. + ## v1.16.1 + ### Fixed - **Web socket data race crash fixed ([#578](https://github.com/apollographql/apollo-ios-dev/pull/578)):** A data race in the web socket layer was causing crashes in some rare circumstances. diff --git a/apollo-ios/CLI/apollo-ios-cli.tar.gz b/apollo-ios/CLI/apollo-ios-cli.tar.gz index 4130293e2..30f213ab5 100644 Binary files a/apollo-ios/CLI/apollo-ios-cli.tar.gz and b/apollo-ios/CLI/apollo-ios-cli.tar.gz differ diff --git a/apollo-ios/Sources/Apollo/Constants.swift b/apollo-ios/Sources/Apollo/Constants.swift index f096efee6..de3ef6ae9 100644 --- a/apollo-ios/Sources/Apollo/Constants.swift +++ b/apollo-ios/Sources/Apollo/Constants.swift @@ -1,5 +1,5 @@ import Foundation public enum Constants { - public static let ApolloVersion: String = "1.16.1" + public static let ApolloVersion: String = "1.17.0" } diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/anyhashableconvertible.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/anyhashableconvertible.json index 744edcd45..c71c5d847 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/anyhashableconvertible.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/anyhashableconvertible.json @@ -703,11 +703,11 @@ "type" : "codeVoice" }, { - "text" : " is ", + "text" : " conforms to ", "type" : "text" }, { - "code" : "String", + "code" : "Hashable", "type" : "codeVoice" }, { @@ -719,11 +719,11 @@ "type" : "codeVoice" }, { - "text" : " is ", + "text" : " conforms to ", "type" : "text" }, { - "code" : "AnyHashable", + "code" : "Hashable", "type" : "codeVoice" }, { @@ -801,14 +801,6 @@ "text" : " conforms to ", "type" : "text" }, - { - "code" : "AnyScalarType", - "type" : "codeVoice" - }, - { - "text" : " and ", - "type" : "text" - }, { "code" : "Hashable", "type" : "codeVoice" diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface.json index 8d9deb0cc..cd996ec8d 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface.json @@ -175,12 +175,13 @@ "topicSections" : [ { "identifiers" : [ - "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:)" + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:keyFields:)" ], "title" : "Initializers" }, { "identifiers" : [ + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/keyFields", "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/name" ], "title" : "Instance Properties" @@ -402,7 +403,7 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/interface\/parenttype-implementations" }, -"doc://ApolloAPI/documentation/ApolloAPI/Interface/init(name:)": { +"doc://ApolloAPI/documentation/ApolloAPI/Interface/init(name:keyFields:)": { "abstract" : [ { "text" : "Designated Initializer", @@ -433,15 +434,73 @@ }, { "kind" : "text", - "text" : ")" + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?)" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:keyFields:)", + "kind" : "symbol", + "role" : "symbol", + "title" : "init(name:keyFields:)", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/interface\/init(name:keyfields:)" +}, +"doc://ApolloAPI/documentation/ApolloAPI/Interface/keyFields": { + "abstract" : [ + { + "text" : "A list of fields used to uniquely identify an instance of an object implementing this interface.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:)", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/keyFields", "kind" : "symbol", "role" : "symbol", - "title" : "init(name:)", + "title" : "keyFields", "type" : "topic", - "url" : "\/documentation\/apolloapi\/interface\/init(name:)" + "url" : "\/documentation\/apolloapi\/interface\/keyfields" }, "doc://ApolloAPI/documentation/ApolloAPI/Interface/name": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/init(name:).json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/init(name:keyfields:).json similarity index 78% rename from docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/init(name:).json rename to docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/init(name:keyfields:).json index d8e2b750f..02ef78a84 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/init(name:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/init(name:keyfields:).json @@ -15,11 +15,11 @@ }, "identifier" : { "interfaceLanguage" : "swift", - "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:)" + "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:keyFields:)" }, "kind" : "symbol", "metadata" : { - "externalID" : "s:9ApolloAPI9InterfaceV4nameACSS_tcfc", + "externalID" : "s:9ApolloAPI9InterfaceV4name9keyFieldsACSS_SaySSGSgtcfc", "fragments" : [ { "kind" : "identifier", @@ -44,7 +44,24 @@ }, { "kind" : "text", - "text" : ")" + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?)" } ], "modules" : [ @@ -55,7 +72,7 @@ "role" : "symbol", "roleHeading" : "Initializer", "symbolKind" : "init", - "title" : "init(name:)" + "title" : "init(name:keyFields:)" }, "primaryContentSections" : [ { @@ -91,7 +108,24 @@ }, { "kind" : "text", - "text" : ")" + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]? = nil)" } ] } @@ -138,7 +172,7 @@ "variants" : [ { "paths" : [ - "\/documentation\/apolloapi\/interface\/init(name:)" + "\/documentation\/apolloapi\/interface\/init(name:keyfields:)" ], "traits" : [ { @@ -243,7 +277,7 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/interface" }, -"doc://ApolloAPI/documentation/ApolloAPI/Interface/init(name:)": { +"doc://ApolloAPI/documentation/ApolloAPI/Interface/init(name:keyFields:)": { "abstract" : [ { "text" : "Designated Initializer", @@ -274,15 +308,32 @@ }, { "kind" : "text", - "text" : ")" + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?)" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:)", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/init(name:keyFields:)", "kind" : "symbol", "role" : "symbol", - "title" : "init(name:)", + "title" : "init(name:keyFields:)", "type" : "topic", - "url" : "\/documentation\/apolloapi\/interface\/init(name:)" + "url" : "\/documentation\/apolloapi\/interface\/init(name:keyfields:)" } } } \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/keyfields.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/keyfields.json new file mode 100644 index 000000000..fb9d0c931 --- /dev/null +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/interface/keyfields.json @@ -0,0 +1,288 @@ +{ + "abstract" : [ + { + "text" : "A list of fields used to uniquely identify an instance of an object implementing this interface.", + "type" : "text" + } + ], + "hierarchy" : { + "paths" : [ + [ + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI", + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface" + ] + ] + }, + "identifier" : { + "interfaceLanguage" : "swift", + "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/keyFields" + }, + "kind" : "symbol", + "metadata" : { + "externalID" : "s:9ApolloAPI9InterfaceV9keyFieldsSaySSGSgvp", + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" + } + ], + "modules" : [ + { + "name" : "ApolloAPI" + } + ], + "role" : "symbol", + "roleHeading" : "Instance Property", + "symbolKind" : "property", + "title" : "keyFields" + }, + "primaryContentSections" : [ + { + "declarations" : [ + { + "languages" : [ + "swift" + ], + "platforms" : [ + "macOS" + ], + "tokens" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" + } + ] + } + ], + "kind" : "declarations" + }, + { + "content" : [ + { + "anchor" : "discussion", + "level" : 2, + "text" : "Discussion", + "type" : "heading" + }, + { + "inlineContent" : [ + { + "text" : "This is set by adding a ", + "type" : "text" + }, + { + "code" : "@typePolicy", + "type" : "codeVoice" + }, + { + "text" : " directive to the schema.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ], + "kind" : "content" + } + ], + "schemaVersion" : { + "major" : 0, + "minor" : 3, + "patch" : 0 + }, + "sections" : [ + + ], + "variants" : [ + { + "paths" : [ + "\/documentation\/apolloapi\/interface\/keyfields" + ], + "traits" : [ + { + "interfaceLanguage" : "swift" + } + ] + } + ] +, +"references": { +"/documentation/apollo": { + "identifier" : "\/documentation\/apollo", + "title" : "Apollo", + "titleInlineContent" : [ + { + "code" : "Apollo", + "type" : "codeVoice" + } + ], + "type" : "link", + "url" : "\/documentation\/apollo" +}, +"/documentation/apollocodegenlib": { + "identifier" : "\/documentation\/apollocodegenlib", + "title" : "ApolloCodegenLib", + "titleInlineContent" : [ + { + "code" : "ApolloCodegenLib", + "type" : "codeVoice" + } + ], + "type" : "link", + "url" : "\/documentation\/apollocodegenlib" +}, +"doc://ApolloAPI/documentation/ApolloAPI": { + "abstract" : [ + { + "text" : "The internal models shared by the ", + "type" : "text" + }, + { + "identifier" : "\/documentation\/apollo", + "isActive" : true, + "type" : "reference" + }, + { + "text" : " client and the models generated by ", + "type" : "text" + }, + { + "identifier" : "\/documentation\/apollocodegenlib", + "isActive" : true, + "type" : "reference" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI", + "kind" : "symbol", + "role" : "collection", + "title" : "ApolloAPI", + "type" : "topic", + "url" : "\/documentation\/apolloapi" +}, +"doc://ApolloAPI/documentation/ApolloAPI/Interface": { + "abstract" : [ + { + "text" : "Represents an ", + "type" : "text" + }, + { + "code" : "interface", + "type" : "codeVoice" + }, + { + "text" : " type in a generated GraphQL schema.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "Interface" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "Interface" + } + ], + "role" : "symbol", + "title" : "Interface", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/interface" +}, +"doc://ApolloAPI/documentation/ApolloAPI/Interface/keyFields": { + "abstract" : [ + { + "text" : "A list of fields used to uniquely identify an instance of an object implementing this interface.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface\/keyFields", + "kind" : "symbol", + "role" : "symbol", + "title" : "keyFields", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/interface\/keyfields" +} +} +} \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object.json index d1a778b8e..c69072ab7 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object.json @@ -175,13 +175,14 @@ "topicSections" : [ { "identifiers" : [ - "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:)" + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:keyFields:)" ], "title" : "Initializers" }, { "identifiers" : [ "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/implementedInterfaces", + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/keyFields", "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/typename" ], "title" : "Instance Properties" @@ -547,7 +548,7 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/object\/implements(_:)" }, -"doc://ApolloAPI/documentation/ApolloAPI/Object/init(typename:implementedInterfaces:)": { +"doc://ApolloAPI/documentation/ApolloAPI/Object/init(typename:implementedInterfaces:keyFields:)": { "abstract" : [ { "text" : "Designated Initializer", @@ -595,15 +596,73 @@ }, { "kind" : "text", - "text" : "])" + "text" : "], " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?)" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:keyFields:)", + "kind" : "symbol", + "role" : "symbol", + "title" : "init(typename:implementedInterfaces:keyFields:)", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/object\/init(typename:implementedinterfaces:keyfields:)" +}, +"doc://ApolloAPI/documentation/ApolloAPI/Object/keyFields": { + "abstract" : [ + { + "text" : "A list of fields used to uniquely identify an instance of this object.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:)", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/keyFields", "kind" : "symbol", "role" : "symbol", - "title" : "init(typename:implementedInterfaces:)", + "title" : "keyFields", "type" : "topic", - "url" : "\/documentation\/apolloapi\/object\/init(typename:implementedinterfaces:)" + "url" : "\/documentation\/apolloapi\/object\/keyfields" }, "doc://ApolloAPI/documentation/ApolloAPI/Object/typename": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/init(typename:implementedinterfaces:).json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/init(typename:implementedinterfaces:keyfields:).json similarity index 80% rename from docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/init(typename:implementedinterfaces:).json rename to docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/init(typename:implementedinterfaces:keyfields:).json index c87f77311..a847095e3 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/init(typename:implementedinterfaces:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/init(typename:implementedinterfaces:keyfields:).json @@ -15,11 +15,11 @@ }, "identifier" : { "interfaceLanguage" : "swift", - "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:)" + "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:keyFields:)" }, "kind" : "symbol", "metadata" : { - "externalID" : "s:9ApolloAPI6ObjectV8typename21implementedInterfacesACSS_SayAA9InterfaceVGtcfc", + "externalID" : "s:9ApolloAPI6ObjectV8typename21implementedInterfaces9keyFieldsACSS_SayAA9InterfaceVGSaySSGSgtcfc", "fragments" : [ { "kind" : "identifier", @@ -61,7 +61,24 @@ }, { "kind" : "text", - "text" : "])" + "text" : "], " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?)" } ], "modules" : [ @@ -72,7 +89,7 @@ "role" : "symbol", "roleHeading" : "Initializer", "symbolKind" : "init", - "title" : "init(typename:implementedInterfaces:)" + "title" : "init(typename:implementedInterfaces:keyFields:)" }, "primaryContentSections" : [ { @@ -126,7 +143,24 @@ }, { "kind" : "text", - "text" : "])" + "text" : "], " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]? = nil)" } ] } @@ -163,6 +197,20 @@ } ], "name" : "implementedInterfaces" + }, + { + "content" : [ + { + "inlineContent" : [ + { + "text" : "A list of field names that are used to uniquely identify an instance of this type.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ], + "name" : "keyFields" } ] } @@ -178,7 +226,7 @@ "variants" : [ { "paths" : [ - "\/documentation\/apolloapi\/object\/init(typename:implementedinterfaces:)" + "\/documentation\/apolloapi\/object\/init(typename:implementedinterfaces:keyfields:)" ], "traits" : [ { @@ -325,7 +373,7 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/object" }, -"doc://ApolloAPI/documentation/ApolloAPI/Object/init(typename:implementedInterfaces:)": { +"doc://ApolloAPI/documentation/ApolloAPI/Object/init(typename:implementedInterfaces:keyFields:)": { "abstract" : [ { "text" : "Designated Initializer", @@ -373,15 +421,32 @@ }, { "kind" : "text", - "text" : "])" + "text" : "], " + }, + { + "kind" : "externalParam", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?)" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:)", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/init(typename:implementedInterfaces:keyFields:)", "kind" : "symbol", "role" : "symbol", - "title" : "init(typename:implementedInterfaces:)", + "title" : "init(typename:implementedInterfaces:keyFields:)", "type" : "topic", - "url" : "\/documentation\/apolloapi\/object\/init(typename:implementedinterfaces:)" + "url" : "\/documentation\/apolloapi\/object\/init(typename:implementedinterfaces:keyfields:)" } } } \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/keyfields.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/keyfields.json new file mode 100644 index 000000000..9d6e3d040 --- /dev/null +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/object/keyfields.json @@ -0,0 +1,288 @@ +{ + "abstract" : [ + { + "text" : "A list of fields used to uniquely identify an instance of this object.", + "type" : "text" + } + ], + "hierarchy" : { + "paths" : [ + [ + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI", + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object" + ] + ] + }, + "identifier" : { + "interfaceLanguage" : "swift", + "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/keyFields" + }, + "kind" : "symbol", + "metadata" : { + "externalID" : "s:9ApolloAPI6ObjectV9keyFieldsSaySSGSgvp", + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" + } + ], + "modules" : [ + { + "name" : "ApolloAPI" + } + ], + "role" : "symbol", + "roleHeading" : "Instance Property", + "symbolKind" : "property", + "title" : "keyFields" + }, + "primaryContentSections" : [ + { + "declarations" : [ + { + "languages" : [ + "swift" + ], + "platforms" : [ + "macOS" + ], + "tokens" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" + } + ] + } + ], + "kind" : "declarations" + }, + { + "content" : [ + { + "anchor" : "discussion", + "level" : 2, + "text" : "Discussion", + "type" : "heading" + }, + { + "inlineContent" : [ + { + "text" : "This is set by adding a ", + "type" : "text" + }, + { + "code" : "@typePolicy", + "type" : "codeVoice" + }, + { + "text" : " directive to the schema.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ], + "kind" : "content" + } + ], + "schemaVersion" : { + "major" : 0, + "minor" : 3, + "patch" : 0 + }, + "sections" : [ + + ], + "variants" : [ + { + "paths" : [ + "\/documentation\/apolloapi\/object\/keyfields" + ], + "traits" : [ + { + "interfaceLanguage" : "swift" + } + ] + } + ] +, +"references": { +"/documentation/apollo": { + "identifier" : "\/documentation\/apollo", + "title" : "Apollo", + "titleInlineContent" : [ + { + "code" : "Apollo", + "type" : "codeVoice" + } + ], + "type" : "link", + "url" : "\/documentation\/apollo" +}, +"/documentation/apollocodegenlib": { + "identifier" : "\/documentation\/apollocodegenlib", + "title" : "ApolloCodegenLib", + "titleInlineContent" : [ + { + "code" : "ApolloCodegenLib", + "type" : "codeVoice" + } + ], + "type" : "link", + "url" : "\/documentation\/apollocodegenlib" +}, +"doc://ApolloAPI/documentation/ApolloAPI": { + "abstract" : [ + { + "text" : "The internal models shared by the ", + "type" : "text" + }, + { + "identifier" : "\/documentation\/apollo", + "isActive" : true, + "type" : "reference" + }, + { + "text" : " client and the models generated by ", + "type" : "text" + }, + { + "identifier" : "\/documentation\/apollocodegenlib", + "isActive" : true, + "type" : "reference" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI", + "kind" : "symbol", + "role" : "collection", + "title" : "ApolloAPI", + "type" : "topic", + "url" : "\/documentation\/apolloapi" +}, +"doc://ApolloAPI/documentation/ApolloAPI/Object": { + "abstract" : [ + { + "text" : "Represents an object ", + "type" : "text" + }, + { + "code" : "type", + "type" : "codeVoice" + }, + { + "text" : " in a generated GraphQL schema.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "Object" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "Object" + } + ], + "role" : "symbol", + "title" : "Object", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/object" +}, +"doc://ApolloAPI/documentation/ApolloAPI/Object/keyFields": { + "abstract" : [ + { + "text" : "A list of fields used to uniquely identify an instance of this object.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "keyFields" + }, + { + "kind" : "text", + "text" : ": [" + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : "]?" + } + ], + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Object\/keyFields", + "kind" : "symbol", + "role" : "symbol", + "title" : "keyFields", + "type" : "topic", + "url" : "\/documentation\/apolloapi\/object\/keyfields" +} +} +} \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata.json index 390ab1f6d..b68426308 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata.json @@ -148,7 +148,7 @@ }, { "identifiers" : [ - "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:)", + "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:inferredToImplementInterface:)", "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/graphQLType(for:)", "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/objectType(forTypename:)" ], @@ -331,7 +331,7 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/schemametadata" }, -"doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata/cacheKey(for:)": { +"doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata/cacheKey(for:inferredToImplementInterface:)": { "abstract" : [ { "text" : "Resolves the cache key for an object in a GraphQL response to be used by", @@ -390,7 +390,24 @@ }, { "kind" : "text", - "text" : ") -> " + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "inferredToImplementInterface" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:9ApolloAPI9InterfaceV", + "text" : "Interface" + }, + { + "kind" : "text", + "text" : "?) -> " }, { "kind" : "typeIdentifier", @@ -402,12 +419,12 @@ "text" : "?" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:)", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:inferredToImplementInterface:)", "kind" : "symbol", "role" : "symbol", - "title" : "cacheKey(for:)", + "title" : "cacheKey(for:inferredToImplementInterface:)", "type" : "topic", - "url" : "\/documentation\/apolloapi\/schemametadata\/cachekey(for:)" + "url" : "\/documentation\/apolloapi\/schemametadata\/cachekey(for:inferredtoimplementinterface:)" }, "doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata/configuration": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata/cachekey(for:).json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata/cachekey(for:inferredtoimplementinterface:).json similarity index 58% rename from docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata/cachekey(for:).json rename to docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata/cachekey(for:inferredtoimplementinterface:).json index e98c83f78..c17712b8f 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata/cachekey(for:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/schemametadata/cachekey(for:inferredtoimplementinterface:).json @@ -27,12 +27,12 @@ }, "identifier" : { "interfaceLanguage" : "swift", - "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:)" + "url" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:inferredToImplementInterface:)" }, "kind" : "symbol", "metadata" : { "extendedModule" : "ApolloAPI", - "externalID" : "s:9ApolloAPI14SchemaMetadataPAAE8cacheKey3forSSSgAA10ObjectDataV_tFZ", + "externalID" : "s:9ApolloAPI14SchemaMetadataPAAE8cacheKey3for28inferredToImplementInterfaceSSSgAA10ObjectDataV_AA0K0VSgtFZ", "fragments" : [ { "kind" : "keyword", @@ -73,7 +73,24 @@ }, { "kind" : "text", - "text" : ") -> " + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "inferredToImplementInterface" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:9ApolloAPI9InterfaceV", + "text" : "Interface" + }, + { + "kind" : "text", + "text" : "?) -> " }, { "kind" : "typeIdentifier", @@ -93,7 +110,7 @@ "role" : "symbol", "roleHeading" : "Type Method", "symbolKind" : "method", - "title" : "cacheKey(for:)" + "title" : "cacheKey(for:inferredToImplementInterface:)" }, "primaryContentSections" : [ { @@ -154,7 +171,33 @@ }, { "kind" : "text", - "text" : ") -> " + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "inferredToImplementInterface" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "internalParam", + "text" : "implementedInterface" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface", + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:9ApolloAPI9InterfaceV", + "text" : "Interface" + }, + { + "kind" : "text", + "text" : "? = nil) -> " }, { "kind" : "typeIdentifier", @@ -195,6 +238,61 @@ } ], "name" : "object" + }, + { + "content" : [ + { + "inlineContent" : [ + { + "text" : "An optional ", + "type" : "text" + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface", + "isActive" : true, + "type" : "reference" + }, + { + "text" : " that the object is", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "inferred to implement. If the cache key is being resolved for a selection set with an", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "interface as it’s ", + "type" : "text" + }, + { + "code" : "__parentType", + "type" : "codeVoice" + }, + { + "text" : ", you can infer the object must implement that interface.", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "You should provide that interface to this parameter.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ], + "name" : "implementedInterface" } ] }, @@ -257,100 +355,218 @@ { "inlineContent" : [ { - "text" : "Maps the type of the ", - "type" : "text" - }, - { - "code" : "object", - "type" : "codeVoice" - }, - { - "text" : " using the ", - "type" : "text" - }, - { - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/graphQLType(for:)", - "isActive" : true, - "type" : "reference" - }, - { - "text" : " function, then gets the", - "type" : "text" - }, - { - "text" : " ", - "type" : "text" - }, - { - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/CacheKeyInfo", - "isActive" : true, - "type" : "reference" - }, - { - "text" : " for the ", - "type" : "text" - }, - { - "code" : "object", - "type" : "codeVoice" - }, - { - "text" : " using the ", + "text" : "The algorithm for resolving the objects cache key:", "type" : "text" - }, - { - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaConfiguration\/cacheKeyInfo(for:object:)", - "isActive" : true, - "type" : "reference" - }, - { - "text" : " ", - "type" : "text" - }, - { - "text" : "function.", - "type" : "text" - }, - { - "text" : " ", - "type" : "text" - }, - { - "text" : "Finally, this function transforms the ", - "type" : "text" - }, - { - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/CacheKeyInfo", - "isActive" : true, - "type" : "reference" - }, - { - "text" : " into the correct ", - "type" : "text" - }, - { - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/CacheReference", - "isActive" : true, - "type" : "reference" - }, + } + ], + "type" : "paragraph" + }, + { + "items" : [ { - "text" : " ", - "type" : "text" + "content" : [ + { + "inlineContent" : [ + { + "text" : "Map the type of the ", + "type" : "text" + }, + { + "code" : "object", + "type" : "codeVoice" + }, + { + "text" : " using the ", + "type" : "text" + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/graphQLType(for:)", + "isActive" : true, + "type" : "reference" + }, + { + "text" : " function.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ] }, { - "text" : "for the ", - "type" : "text" + "content" : [ + { + "inlineContent" : [ + { + "text" : "Attempt to gets the ", + "type" : "text" + }, + { + "code" : "CacheKeyInfo`` using programmatic cache key configuration. 2a. Call the ``SchemaConfiguration\/cacheKeyInfo(for:object:)`` function. 2b. If ", + "type" : "codeVoice" + }, + { + "text" : "CacheKeyInfo", + "type" : "text" + }, + { + "code" : "is found, transforms the ``CacheKeyInfo`` into the correct ``CacheReference`` for the", + "type" : "codeVoice" + }, + { + "text" : "NormalizedCache` and return it.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ] }, { - "code" : "NormalizedCache", - "type" : "codeVoice" + "content" : [ + { + "inlineContent" : [ + { + "text" : "If no programmatic cache key is returned, attempt to resolve the ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : " for the object", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "3a. Check if the object’s type has ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : ".", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "3b. If the type of the object is unknown (ie. it cannot be found by ", + "type" : "text" + }, + { + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/graphQLType(for:)", + "isActive" : true, + "type" : "reference" + }, + { + "text" : "),", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "or the type does not have ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : ", check if the inferred interface for the type has", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : ".", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "3c. If ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : " are found, resolve the cache key by escaping and joining the values of", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "the ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : " on the object. Return the resolved cache key.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ] }, { - "text" : ".", - "type" : "text" + "content" : [ + { + "inlineContent" : [ + { + "text" : "If a cache key is not resolved programmatically or using ", + "type" : "text" + }, + { + "code" : "keyFields", + "type" : "codeVoice" + }, + { + "text" : ", return ", + "type" : "text" + }, + { + "code" : "nil", + "type" : "codeVoice" + }, + { + "text" : ".", + "type" : "text" + } + ], + "type" : "paragraph" + } + ] } ], - "type" : "paragraph" + "type" : "orderedList" } ], "kind" : "content" @@ -367,7 +583,7 @@ "variants" : [ { "paths" : [ - "\/documentation\/apolloapi\/schemametadata\/cachekey(for:)" + "\/documentation\/apolloapi\/schemametadata\/cachekey(for:inferredtoimplementinterface:)" ], "traits" : [ { @@ -430,61 +646,18 @@ "type" : "topic", "url" : "\/documentation\/apolloapi" }, -"doc://ApolloAPI/documentation/ApolloAPI/CacheKeyInfo": { +"doc://ApolloAPI/documentation/ApolloAPI/Interface": { "abstract" : [ { - "text" : "Contains the information needed to resolve a ", - "type" : "text" - }, - { - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/CacheReference", - "isActive" : true, - "type" : "reference" - }, - { - "text" : " in a ", + "text" : "Represents an ", "type" : "text" }, { - "code" : "NormalizedCache", + "code" : "interface", "type" : "codeVoice" }, { - "text" : ".", - "type" : "text" - } - ], - "fragments" : [ - { - "kind" : "keyword", - "text" : "struct" - }, - { - "kind" : "text", - "text" : " " - }, - { - "kind" : "identifier", - "text" : "CacheKeyInfo" - } - ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/CacheKeyInfo", - "kind" : "symbol", - "navigatorTitle" : [ - { - "kind" : "identifier", - "text" : "CacheKeyInfo" - } - ], - "role" : "symbol", - "title" : "CacheKeyInfo", - "type" : "topic", - "url" : "\/documentation\/apolloapi\/cachekeyinfo" -}, -"doc://ApolloAPI/documentation/ApolloAPI/CacheReference": { - "abstract" : [ - { - "text" : "Represents a reference to a record for a GraphQL object in the cache.", + "text" : " type in a generated GraphQL schema.", "type" : "text" } ], @@ -499,21 +672,21 @@ }, { "kind" : "identifier", - "text" : "CacheReference" + "text" : "Interface" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/CacheReference", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/Interface", "kind" : "symbol", "navigatorTitle" : [ { "kind" : "identifier", - "text" : "CacheReference" + "text" : "Interface" } ], "role" : "symbol", - "title" : "CacheReference", + "title" : "Interface", "type" : "topic", - "url" : "\/documentation\/apolloapi\/cachereference" + "url" : "\/documentation\/apolloapi\/interface" }, "doc://ApolloAPI/documentation/ApolloAPI/JSONObject": { "abstract" : [ @@ -649,106 +822,6 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/objectdata" }, -"doc://ApolloAPI/documentation/ApolloAPI/SchemaConfiguration/cacheKeyInfo(for:object:)": { - "abstract" : [ - { - "text" : "The entry point for configuring the cache key resolution", - "type" : "text" - }, - { - "text" : " ", - "type" : "text" - }, - { - "text" : "for the types in the schema, which is used by ", - "type" : "text" - }, - { - "code" : "NormalizedCache", - "type" : "codeVoice" - }, - { - "text" : " mechanisms.", - "type" : "text" - } - ], - "fragments" : [ - { - "kind" : "keyword", - "text" : "static" - }, - { - "kind" : "text", - "text" : " " - }, - { - "kind" : "keyword", - "text" : "func" - }, - { - "kind" : "text", - "text" : " " - }, - { - "kind" : "identifier", - "text" : "cacheKeyInfo" - }, - { - "kind" : "text", - "text" : "(" - }, - { - "kind" : "externalParam", - "text" : "for" - }, - { - "kind" : "text", - "text" : ": " - }, - { - "kind" : "typeIdentifier", - "preciseIdentifier" : "s:9ApolloAPI6ObjectV", - "text" : "Object" - }, - { - "kind" : "text", - "text" : ", " - }, - { - "kind" : "externalParam", - "text" : "object" - }, - { - "kind" : "text", - "text" : ": " - }, - { - "kind" : "typeIdentifier", - "preciseIdentifier" : "s:9ApolloAPI10ObjectDataV", - "text" : "ObjectData" - }, - { - "kind" : "text", - "text" : ") -> " - }, - { - "kind" : "typeIdentifier", - "preciseIdentifier" : "s:9ApolloAPI12CacheKeyInfoV", - "text" : "CacheKeyInfo" - }, - { - "kind" : "text", - "text" : "?" - } - ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaConfiguration\/cacheKeyInfo(for:object:)", - "kind" : "symbol", - "required" : true, - "role" : "symbol", - "title" : "cacheKeyInfo(for:object:)", - "type" : "topic", - "url" : "\/documentation\/apolloapi\/schemaconfiguration\/cachekeyinfo(for:object:)" -}, "doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata": { "abstract" : [ { @@ -783,7 +856,7 @@ "type" : "topic", "url" : "\/documentation\/apolloapi\/schemametadata" }, -"doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata/cacheKey(for:)": { +"doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata/cacheKey(for:inferredToImplementInterface:)": { "abstract" : [ { "text" : "Resolves the cache key for an object in a GraphQL response to be used by", @@ -842,7 +915,24 @@ }, { "kind" : "text", - "text" : ") -> " + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "inferredToImplementInterface" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:9ApolloAPI9InterfaceV", + "text" : "Interface" + }, + { + "kind" : "text", + "text" : "?) -> " }, { "kind" : "typeIdentifier", @@ -854,12 +944,12 @@ "text" : "?" } ], - "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:)", + "identifier" : "doc:\/\/ApolloAPI\/documentation\/ApolloAPI\/SchemaMetadata\/cacheKey(for:inferredToImplementInterface:)", "kind" : "symbol", "role" : "symbol", - "title" : "cacheKey(for:)", + "title" : "cacheKey(for:inferredToImplementInterface:)", "type" : "topic", - "url" : "\/documentation\/apolloapi\/schemametadata\/cachekey(for:)" + "url" : "\/documentation\/apolloapi\/schemametadata\/cachekey(for:inferredtoimplementinterface:)" }, "doc://ApolloAPI/documentation/ApolloAPI/SchemaMetadata/graphQLType(for:)": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/dictionary.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/dictionary.json index 107c845d7..913751ea8 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/dictionary.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/dictionary.json @@ -222,11 +222,11 @@ "type" : "codeVoice" }, { - "text" : " is ", + "text" : " conforms to ", "type" : "text" }, { - "code" : "String", + "code" : "Hashable", "type" : "codeVoice" }, { @@ -238,11 +238,11 @@ "type" : "codeVoice" }, { - "text" : " is ", + "text" : " conforms to ", "type" : "text" }, { - "code" : "AnyHashable", + "code" : "Hashable", "type" : "codeVoice" }, { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/optional.json b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/optional.json index 2e52d4bab..d3cad4b2c 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/optional.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apolloapi/swift/optional.json @@ -225,14 +225,6 @@ "text" : " conforms to ", "type" : "text" }, - { - "code" : "AnyScalarType", - "type" : "codeVoice" - }, - { - "text" : " and ", - "type" : "text" - }, { "code" : "Hashable", "type" : "codeVoice" diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions.json index 00b883cec..ded377f1a 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions.json @@ -102,7 +102,7 @@ }, { "identifiers" : [ - "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:apqs:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(from:)" @@ -112,6 +112,7 @@ { "identifiers" : [ "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/additionalInflectionRules", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/appendSchemaTypeFilenameSuffix", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/apqs", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/cocoapodsCompatibleImportStatements", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/conversionStrategies", @@ -375,6 +376,63 @@ "type" : "topic", "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/additionalinflectionrules" }, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/appendSchemaTypeFilenameSuffix": { + "abstract" : [ + { + "code" : "true", + "type" : "codeVoice" + }, + { + "text" : " will add a filename suffix matching the schema type, the default is ", + "type" : "text" + }, + { + "code" : "false", + "type" : "codeVoice" + }, + { + "text" : ". This can be used to", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "avoid filename conflicts when operation type names match schema type names.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/appendSchemaTypeFilenameSuffix", + "kind" : "symbol", + "role" : "symbol", + "title" : "appendSchemaTypeFilenameSuffix", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/appendschematypefilenamesuffix" +}, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/apqs": { "abstract" : [ { @@ -609,7 +667,7 @@ "type" : "topic", "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/encode(to:)" }, -"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)": { +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)": { "abstract" : [ { "text" : "Designated initializer.", @@ -871,17 +929,34 @@ "preciseIdentifier" : "s:Sb", "text" : "Bool" }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + }, { "kind" : "text", "text" : ")" } ], - "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)", "kind" : "symbol", "role" : "symbol", - "title" : "init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", + "title" : "init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)", "type" : "topic", - "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-9a4pv" + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-140ri" }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:queryStringLiteralFormat:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:apqs:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/appendschematypefilenamesuffix.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/appendschematypefilenamesuffix.json new file mode 100644 index 000000000..079a28d55 --- /dev/null +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/appendschematypefilenamesuffix.json @@ -0,0 +1,274 @@ +{ + "abstract" : [ + { + "code" : "true", + "type" : "codeVoice" + }, + { + "text" : " will add a filename suffix matching the schema type, the default is ", + "type" : "text" + }, + { + "code" : "false", + "type" : "codeVoice" + }, + { + "text" : ". This can be used to", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "avoid filename conflicts when operation type names match schema type names.", + "type" : "text" + } + ], + "hierarchy" : { + "paths" : [ + [ + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions" + ] + ] + }, + "identifier" : { + "interfaceLanguage" : "swift", + "url" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/appendSchemaTypeFilenameSuffix" + }, + "kind" : "symbol", + "metadata" : { + "externalID" : "s:16ApolloCodegenLib0aB13ConfigurationV13OutputOptionsV30appendSchemaTypeFilenameSuffixSbvp", + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ], + "modules" : [ + { + "name" : "ApolloCodegenLib" + } + ], + "role" : "symbol", + "roleHeading" : "Instance Property", + "symbolKind" : "property", + "title" : "appendSchemaTypeFilenameSuffix" + }, + "primaryContentSections" : [ + { + "declarations" : [ + { + "languages" : [ + "swift" + ], + "platforms" : [ + "macOS" + ], + "tokens" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ] + } + ], + "kind" : "declarations" + } + ], + "schemaVersion" : { + "major" : 0, + "minor" : 3, + "patch" : 0 + }, + "sections" : [ + + ], + "variants" : [ + { + "paths" : [ + "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/appendschematypefilenamesuffix" + ], + "traits" : [ + { + "interfaceLanguage" : "swift" + } + ] + } + ] +, +"references": { +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib": { + "abstract" : [ + { + "text" : "A robust code generation engine for GraphQL operations.", + "type" : "text" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib", + "kind" : "symbol", + "role" : "collection", + "title" : "ApolloCodegenLib", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration": { + "abstract" : [ + { + "text" : "A configuration object that defines behavior for code generation.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "ApolloCodegenConfiguration" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "ApolloCodegenConfiguration" + } + ], + "role" : "symbol", + "title" : "ApolloCodegenConfiguration", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "OutputOptions" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "OutputOptions" + } + ], + "role" : "symbol", + "title" : "ApolloCodegenConfiguration.OutputOptions", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/appendSchemaTypeFilenameSuffix": { + "abstract" : [ + { + "code" : "true", + "type" : "codeVoice" + }, + { + "text" : " will add a filename suffix matching the schema type, the default is ", + "type" : "text" + }, + { + "code" : "false", + "type" : "codeVoice" + }, + { + "text" : ". This can be used to", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "avoid filename conflicts when operation type names match schema type names.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/appendSchemaTypeFilenameSuffix", + "kind" : "symbol", + "role" : "symbol", + "title" : "appendSchemaTypeFilenameSuffix", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/appendschematypefilenamesuffix" +} +} +} \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default.json index bf498ae87..58f94b9ca 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default.json @@ -92,6 +92,7 @@ { "identifiers" : [ "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/additionalInflectionRules", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/appendSchemaTypeFilenameSuffix", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/cocoapodsCompatibleImportStatements", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/conversionStrategies", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/deprecatedEnumCases", @@ -280,6 +281,48 @@ "type" : "topic", "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/default\/additionalinflectionrules" }, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/Default/appendSchemaTypeFilenameSuffix": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "static" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/appendSchemaTypeFilenameSuffix", + "kind" : "symbol", + "role" : "symbol", + "title" : "appendSchemaTypeFilenameSuffix", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/default\/appendschematypefilenamesuffix" +}, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/Default/cocoapodsCompatibleImportStatements": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default/appendschematypefilenamesuffix.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default/appendschematypefilenamesuffix.json new file mode 100644 index 000000000..4af84ed2f --- /dev/null +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/default/appendschematypefilenamesuffix.json @@ -0,0 +1,284 @@ +{ + "hierarchy" : { + "paths" : [ + [ + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default" + ] + ] + }, + "identifier" : { + "interfaceLanguage" : "swift", + "url" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/appendSchemaTypeFilenameSuffix" + }, + "kind" : "symbol", + "metadata" : { + "externalID" : "s:16ApolloCodegenLib0aB13ConfigurationV13OutputOptionsV7DefaultV30appendSchemaTypeFilenameSuffixSbvpZ", + "fragments" : [ + { + "kind" : "keyword", + "text" : "static" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ], + "modules" : [ + { + "name" : "ApolloCodegenLib" + } + ], + "role" : "symbol", + "roleHeading" : "Type Property", + "symbolKind" : "property", + "title" : "appendSchemaTypeFilenameSuffix" + }, + "primaryContentSections" : [ + { + "declarations" : [ + { + "languages" : [ + "swift" + ], + "platforms" : [ + "macOS" + ], + "tokens" : [ + { + "kind" : "keyword", + "text" : "static" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ] + } + ], + "kind" : "declarations" + } + ], + "schemaVersion" : { + "major" : 0, + "minor" : 3, + "patch" : 0 + }, + "sections" : [ + + ], + "variants" : [ + { + "paths" : [ + "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/default\/appendschematypefilenamesuffix" + ], + "traits" : [ + { + "interfaceLanguage" : "swift" + } + ] + } + ] +, +"references": { +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib": { + "abstract" : [ + { + "text" : "A robust code generation engine for GraphQL operations.", + "type" : "text" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib", + "kind" : "symbol", + "role" : "collection", + "title" : "ApolloCodegenLib", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration": { + "abstract" : [ + { + "text" : "A configuration object that defines behavior for code generation.", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "ApolloCodegenConfiguration" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "ApolloCodegenConfiguration" + } + ], + "role" : "symbol", + "title" : "ApolloCodegenConfiguration", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "OutputOptions" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "OutputOptions" + } + ], + "role" : "symbol", + "title" : "ApolloCodegenConfiguration.OutputOptions", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/Default": { + "abstract" : [ + { + "text" : "Default property values", + "type" : "text" + } + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "struct" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "Default" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "Default" + } + ], + "role" : "symbol", + "title" : "ApolloCodegenConfiguration.OutputOptions.Default", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/default" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/Default/appendSchemaTypeFilenameSuffix": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "static" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "let" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/Default\/appendSchemaTypeFilenameSuffix", + "kind" : "symbol", + "role" : "symbol", + "title" : "appendSchemaTypeFilenameSuffix", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/default\/appendschematypefilenamesuffix" +} +} +} \ No newline at end of file diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-9a4pv.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-140ri.json similarity index 92% rename from docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-9a4pv.json rename to docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-140ri.json index b2b558950..8baba0da9 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-9a4pv.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollocodegenconfiguration/outputoptions/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-140ri.json @@ -16,11 +16,11 @@ }, "identifier" : { "interfaceLanguage" : "swift", - "url" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)" + "url" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)" }, "kind" : "symbol", "metadata" : { - "externalID" : "s:16ApolloCodegenLib0aB13ConfigurationV13OutputOptionsV25additionalInflectionRules19deprecatedEnumCases19schemaDocumentation24selectionSetInitializers23operationDocumentFormat0M13Customization35cocoapodsCompatibleImportStatements25warningsOnDeprecatedUsage20conversionStrategies19pruneGeneratedFiles31markOperationDefinitionsAsFinalAESayAA0H4RuleOG_AC11CompositionOAuC09SelectionpQ0VAC09OperationsT0VAC06SchemaU0VSbAuC20ConversionStrategiesVS2btcfc", + "externalID" : "s:16ApolloCodegenLib0aB13ConfigurationV13OutputOptionsV25additionalInflectionRules19deprecatedEnumCases19schemaDocumentation24selectionSetInitializers23operationDocumentFormat0M13Customization35cocoapodsCompatibleImportStatements25warningsOnDeprecatedUsage20conversionStrategies19pruneGeneratedFiles31markOperationDefinitionsAsFinal30appendSchemaTypeFilenameSuffixAESayAA0H4RuleOG_AC11CompositionOAvC09SelectionpQ0VAC09OperationsT0VAC06SchemaU0VSbAvC20ConversionStrategiesVS3btcfc", "fragments" : [ { "kind" : "identifier", @@ -276,6 +276,23 @@ "preciseIdentifier" : "s:Sb", "text" : "Bool" }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + }, { "kind" : "text", "text" : ")" @@ -289,7 +306,7 @@ "role" : "symbol", "roleHeading" : "Initializer", "symbolKind" : "init", - "title" : "init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)" + "title" : "init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)" }, "primaryContentSections" : [ { @@ -573,7 +590,24 @@ }, { "kind" : "text", - "text" : " = Default.markOperationDefinitionsAsFinal)" + "text" : " = Default.markOperationDefinitionsAsFinal, " + }, + { + "kind" : "externalParam", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + }, + { + "kind" : "text", + "text" : " = Default.appendSchemaTypeFilenameSuffix)" } ] } @@ -790,7 +824,15 @@ { "inlineContent" : [ { - "text" : "Whether generated GraphQL operation and local cache mutation class types will be marked as ", + "text" : "Whether generated GraphQL operation and local cache mutation", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "class types will be marked as ", "type" : "text" }, { @@ -806,6 +848,52 @@ } ], "name" : "markOperationDefinitionsAsFinal" + }, + { + "content" : [ + { + "inlineContent" : [ + { + "text" : "", + "type" : "text" + }, + { + "code" : "true", + "type" : "codeVoice" + }, + { + "text" : " will add a filename suffix matching the schema type, the", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "default is ", + "type" : "text" + }, + { + "code" : "false", + "type" : "codeVoice" + }, + { + "text" : ". This can be used to avoid filename conflicts when operation type names match", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "schema type names.", + "type" : "text" + } + ], + "type" : "paragraph" + } + ], + "name" : "appendSchemaTypeFilenameSuffix" } ] } @@ -821,7 +909,7 @@ "variants" : [ { "paths" : [ - "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-9a4pv" + "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-140ri" ], "traits" : [ { @@ -1051,7 +1139,7 @@ "type" : "topic", "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions" }, -"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)": { +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/OutputOptions/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)": { "abstract" : [ { "text" : "Designated initializer.", @@ -1313,17 +1401,34 @@ "preciseIdentifier" : "s:Sb", "text" : "Bool" }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "appendSchemaTypeFilenameSuffix" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:Sb", + "text" : "Bool" + }, { "kind" : "text", "text" : ")" } ], - "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloCodegenConfiguration\/OutputOptions\/init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)", "kind" : "symbol", "role" : "symbol", - "title" : "init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:)", + "title" : "init(additionalInflectionRules:deprecatedEnumCases:schemaDocumentation:selectionSetInitializers:operationDocumentFormat:schemaCustomization:cocoapodsCompatibleImportStatements:warningsOnDeprecatedUsage:conversionStrategies:pruneGeneratedFiles:markOperationDefinitionsAsFinal:appendSchemaTypeFilenameSuffix:)", "type" : "topic", - "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-9a4pv" + "url" : "\/documentation\/apollocodegenlib\/apollocodegenconfiguration\/outputoptions\/init(additionalinflectionrules:deprecatedenumcases:schemadocumentation:selectionsetinitializers:operationdocumentformat:schemacustomization:cocoapodscompatibleimportstatements:warningsondeprecatedusage:conversionstrategies:prunegeneratedfil-140ri" }, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloCodegenConfiguration/SchemaCustomization": { "abstract" : [ diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager.json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager.json index b6be074f0..5f595111d 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager.json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager.json @@ -96,7 +96,8 @@ "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/deleteDirectory(atPath:)", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/deleteFile(atPath:)", "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/doesDirectoryExist(atPath:)", - "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/doesFileExist(atPath:)" + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/doesFileExist(atPath:)", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/renameFile(atPath:toPath:)" ], "title" : "Instance Methods" }, @@ -203,7 +204,7 @@ "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/createContainingDirectoryIfNeeded(forPath:)": { "abstract" : [ { - "text" : "Creates the containing directory (including all intermediate directories) for the given file URL if necessary. This method will not", + "text" : "Creates the containing directory (including all intermediate directories) for the given file URL if necessary.", "type" : "text" }, { @@ -211,7 +212,7 @@ "type" : "text" }, { - "text" : "overwrite any existing directory.", + "text" : "This method will not overwrite any existing directory.", "type" : "text" } ], @@ -264,7 +265,7 @@ "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/createDirectoryIfNeeded(atPath:)": { "abstract" : [ { - "text" : "Creates the directory (including all intermediate directories) for the given URL if necessary. This method will not overwrite any", + "text" : "Creates the directory (including all intermediate directories) for the given URL if necessary. This method will", "type" : "text" }, { @@ -272,7 +273,7 @@ "type" : "text" }, { - "text" : "existing directory.", + "text" : "not overwrite any existing directory.", "type" : "text" } ], @@ -333,7 +334,7 @@ "type" : "codeVoice" }, { - "text" : ", this method overwrites the", + "text" : " this", "type" : "text" }, { @@ -341,7 +342,15 @@ "type" : "text" }, { - "text" : "contents of that file if the current process has the appropriate privileges to do so.", + "text" : "method can be configured to overwrite the contents of that file, if the current process has the appropriate", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "privileges to do so.", "type" : "text" } ], @@ -689,6 +698,81 @@ "type" : "topic", "url" : "\/documentation\/apollocodegenlib\/apollofilemanager\/doesfileexist(atpath:)" }, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/renameFile(atPath:toPath:)": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "func" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "renameFile" + }, + { + "kind" : "text", + "text" : "(" + }, + { + "kind" : "externalParam", + "text" : "atPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "toPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ") " + }, + { + "kind" : "keyword", + "text" : "async" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "throws" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/renameFile(atPath:toPath:)", + "kind" : "symbol", + "role" : "symbol", + "title" : "renameFile(atPath:toPath:)", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollofilemanager\/renamefile(atpath:topath:)" +}, "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/writtenFiles": { "abstract" : [ { diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createcontainingdirectoryifneeded(forpath:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createcontainingdirectoryifneeded(forpath:).json index eef0ae1ec..d461bbf02 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createcontainingdirectoryifneeded(forpath:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createcontainingdirectoryifneeded(forpath:).json @@ -1,7 +1,7 @@ { "abstract" : [ { - "text" : "Creates the containing directory (including all intermediate directories) for the given file URL if necessary. This method will not", + "text" : "Creates the containing directory (including all intermediate directories) for the given file URL if necessary.", "type" : "text" }, { @@ -9,7 +9,7 @@ "type" : "text" }, { - "text" : "overwrite any existing directory.", + "text" : "This method will not overwrite any existing directory.", "type" : "text" } ], @@ -228,7 +228,7 @@ "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/createContainingDirectoryIfNeeded(forPath:)": { "abstract" : [ { - "text" : "Creates the containing directory (including all intermediate directories) for the given file URL if necessary. This method will not", + "text" : "Creates the containing directory (including all intermediate directories) for the given file URL if necessary.", "type" : "text" }, { @@ -236,7 +236,7 @@ "type" : "text" }, { - "text" : "overwrite any existing directory.", + "text" : "This method will not overwrite any existing directory.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createdirectoryifneeded(atpath:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createdirectoryifneeded(atpath:).json index e35b08d10..8a3612039 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createdirectoryifneeded(atpath:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createdirectoryifneeded(atpath:).json @@ -1,7 +1,7 @@ { "abstract" : [ { - "text" : "Creates the directory (including all intermediate directories) for the given URL if necessary. This method will not overwrite any", + "text" : "Creates the directory (including all intermediate directories) for the given URL if necessary. This method will", "type" : "text" }, { @@ -9,7 +9,7 @@ "type" : "text" }, { - "text" : "existing directory.", + "text" : "not overwrite any existing directory.", "type" : "text" } ], @@ -228,7 +228,7 @@ "doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/createDirectoryIfNeeded(atPath:)": { "abstract" : [ { - "text" : "Creates the directory (including all intermediate directories) for the given URL if necessary. This method will not overwrite any", + "text" : "Creates the directory (including all intermediate directories) for the given URL if necessary. This method will", "type" : "text" }, { @@ -236,7 +236,7 @@ "type" : "text" }, { - "text" : "existing directory.", + "text" : "not overwrite any existing directory.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createfile(atpath:data:overwrite:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createfile(atpath:data:overwrite:).json index 33e56b5af..250589d6c 100644 --- a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createfile(atpath:data:overwrite:).json +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/createfile(atpath:data:overwrite:).json @@ -9,7 +9,7 @@ "type" : "codeVoice" }, { - "text" : ", this method overwrites the", + "text" : " this", "type" : "text" }, { @@ -17,7 +17,15 @@ "type" : "text" }, { - "text" : "contents of that file if the current process has the appropriate privileges to do so.", + "text" : "method can be configured to overwrite the contents of that file, if the current process has the appropriate", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "privileges to do so.", "type" : "text" } ], @@ -388,7 +396,15 @@ "type" : "codeVoice" }, { - "text" : ", this method overwrites the", + "text" : " this", + "type" : "text" + }, + { + "text" : " ", + "type" : "text" + }, + { + "text" : "method can be configured to overwrite the contents of that file, if the current process has the appropriate", "type" : "text" }, { @@ -396,7 +412,7 @@ "type" : "text" }, { - "text" : "contents of that file if the current process has the appropriate privileges to do so.", + "text" : "privileges to do so.", "type" : "text" } ], diff --git a/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/renamefile(atpath:topath:).json b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/renamefile(atpath:topath:).json new file mode 100644 index 000000000..8a0ff2f55 --- /dev/null +++ b/docs/docc/Apollo.doccarchive/data/documentation/apollocodegenlib/apollofilemanager/renamefile(atpath:topath:).json @@ -0,0 +1,329 @@ +{ + "hierarchy" : { + "paths" : [ + [ + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib", + "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager" + ] + ] + }, + "identifier" : { + "interfaceLanguage" : "swift", + "url" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/renameFile(atPath:toPath:)" + }, + "kind" : "symbol", + "metadata" : { + "externalID" : "s:16ApolloCodegenLib0A11FileManagerC06renameD06atPath02toH0ySS_SStYaKF", + "fragments" : [ + { + "kind" : "keyword", + "text" : "func" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "renameFile" + }, + { + "kind" : "text", + "text" : "(" + }, + { + "kind" : "externalParam", + "text" : "atPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "toPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ") " + }, + { + "kind" : "keyword", + "text" : "async" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "throws" + } + ], + "modules" : [ + { + "name" : "ApolloCodegenLib" + } + ], + "role" : "symbol", + "roleHeading" : "Instance Method", + "symbolKind" : "method", + "title" : "renameFile(atPath:toPath:)" + }, + "primaryContentSections" : [ + { + "declarations" : [ + { + "languages" : [ + "swift" + ], + "platforms" : [ + "macOS" + ], + "tokens" : [ + { + "kind" : "keyword", + "text" : "func" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "renameFile" + }, + { + "kind" : "text", + "text" : "(" + }, + { + "kind" : "externalParam", + "text" : "atPath" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "internalParam", + "text" : "oldPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "toPath" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "internalParam", + "text" : "newPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ") " + }, + { + "kind" : "keyword", + "text" : "async" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "throws" + } + ] + } + ], + "kind" : "declarations" + } + ], + "schemaVersion" : { + "major" : 0, + "minor" : 3, + "patch" : 0 + }, + "sections" : [ + + ], + "variants" : [ + { + "paths" : [ + "\/documentation\/apollocodegenlib\/apollofilemanager\/renamefile(atpath:topath:)" + ], + "traits" : [ + { + "interfaceLanguage" : "swift" + } + ] + } + ] +, +"references": { +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib": { + "abstract" : [ + { + "text" : "A robust code generation engine for GraphQL operations.", + "type" : "text" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib", + "kind" : "symbol", + "role" : "collection", + "title" : "ApolloCodegenLib", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "class" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "ApolloFileManager" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager", + "kind" : "symbol", + "navigatorTitle" : [ + { + "kind" : "identifier", + "text" : "ApolloFileManager" + } + ], + "role" : "symbol", + "title" : "ApolloFileManager", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollofilemanager" +}, +"doc://ApolloCodegenLib/documentation/ApolloCodegenLib/ApolloFileManager/renameFile(atPath:toPath:)": { + "abstract" : [ + + ], + "fragments" : [ + { + "kind" : "keyword", + "text" : "func" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "identifier", + "text" : "renameFile" + }, + { + "kind" : "text", + "text" : "(" + }, + { + "kind" : "externalParam", + "text" : "atPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ", " + }, + { + "kind" : "externalParam", + "text" : "toPath" + }, + { + "kind" : "text", + "text" : ": " + }, + { + "kind" : "typeIdentifier", + "preciseIdentifier" : "s:SS", + "text" : "String" + }, + { + "kind" : "text", + "text" : ") " + }, + { + "kind" : "keyword", + "text" : "async" + }, + { + "kind" : "text", + "text" : " " + }, + { + "kind" : "keyword", + "text" : "throws" + } + ], + "identifier" : "doc:\/\/ApolloCodegenLib\/documentation\/ApolloCodegenLib\/ApolloFileManager\/renameFile(atPath:toPath:)", + "kind" : "symbol", + "role" : "symbol", + "title" : "renameFile(atPath:toPath:)", + "type" : "topic", + "url" : "\/documentation\/apollocodegenlib\/apollofilemanager\/renamefile(atpath:topath:)" +} +} +} \ No newline at end of file