New
- Add suffix to schema type filenames (#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. - Specify caching fields with
typePolicy
directive (#554): The@typePolicy
directive lets you specify an object's cache ID using key fields of the response object. See the documentation for full details. Thank you to @x-sheep for the contribution. - Emit
Identifiable
conformance onSelectionSet
(#584): If the@typePolicy
of a type uses akeyField
ofid
the selection set will emit conformance to SwiftsIdentifiable
protocol. Thank you to @x-sheep for the contribution.
Improvement
- Improved performance of code generation on operations with many nested fragments (#3434): When fragment field merging is disabled the fragment selection trees are no longer merged into the
EntitySelectionSet
while building operations. See PR #571.
Fixed
- Defer metadata extension (#3505): Metadata extensions for deferred selection sets were incorrectly generated inside the namespace extension for
embeddedInTarget
andother
module types. See PR #581. DataDict
initialization ofdeferredFragments
for named fragments (#587): When deferred fragments are named fragments the deferred type should be the fragment generated definition name.