bug: Defer metadata extension generated incorrectly for module types embeddedInTarget
and other
#3503
Labels
codegen
Issues related to or arising from code generation
Milestone
I discovered this while working on the selection set initializers for defer.
To support
@defer
the GraphQL executor needs to know paths and identifiers associated with the operation selection sets. This is generated into the operation file as an extension on the operation type. This works great for theswiftPackage
module type but results in a build error forembeddedInTarget
andother
.The problem is that for the
embeddedInTarget
andother
module types the operation file content is wrapped in an extension on the caseless enum which is used for namespacing. The resulting build error is because the defer metadata extension is then placed within the enum extension, which is a Swift build error.I think there are two possible solutions:
embeddedInTarget
module type. I think this will be more complicated than it seems because the operation definition template only contains operation related scopes; the code to wrap it in the enum extension is done external to it.The text was updated successfully, but these errors were encountered: