I have the following GraphQL Schema:
type User {
id: ID
name: String
}
type Mutation {
createUser(name: String): User
}
And I want to create the signature and the resolver in typescript
type createUser = (name: string) => User; // <- signature
const createUserResolver: createUser = (name) => {} as User; // <- resolver
But if I define the createUser signature by hand and then the schema changes, I will need to update the signature.
Is there any way to auto-generate the signature when the schema changes?