Open alecrobertson1 opened 5 months ago
Hi @alecrobertson1 ,
Unfortunately, we to alias resolvers with its "location" (in this case Query_*
) so it's uniquely named in the file. Otherwise, there could be a rare scenario where a query and a mutation may have the same name e.g.
extend type Query {
book(id: ID!): BookPayload!
}
extend type Mutation {
book(id: ID!): BookPayload!
}
This does not happen in every GraphQL schema. But the current implementation avoids it in the simplest way possible, making the codegen implementation easy to manage. 🙂
Is it causing issues in your codebase or is it just a stylistic concern?
The resolvers fill imports the queries and mutations with aliases
but this seems redundant as they just get assigned with the original names again:
Can this feature be customised or removed?