-
Notifications
You must be signed in to change notification settings - Fork 749
Open
Labels
codegenIssues related to or arising from code generationIssues related to or arising from code generationfeatureNew addition or enhancement to existing solutionsNew addition or enhancement to existing solutionsv1.x
Milestone
Description
To be clearer about my proposal, I mean something like this:
/// You define this protocol
protocol CharacterName {
var name: String { get }
}
/// You define this extension
extension CharacterName {
var nameAllCaps: String { self.name.uppercased() }
}In your graphql query:
query {
hero @extends("CharacterName") {
id
name
}
}
/// The directive would make the generated code add this extension for the generated type.
extension HeroDetailsQuery.Data.Hero: CharacterName {}Would that be adequate for you @Mordil? It's not totally automatic, but it is cleaner and easier than the status quo.
Metadata
Metadata
Assignees
Labels
codegenIssues related to or arising from code generationIssues related to or arising from code generationfeatureNew addition or enhancement to existing solutionsNew addition or enhancement to existing solutionsv1.x