I'm using graphql-codegen with apollo to consume graphql api from typescript. Right now I have to duplicate a lot of graphql operations exactly 1:1 to have some code generated. Example:
mutation CreateAccount($name: String!, $email: String!, $password: String!) {
signUp(name: $name, email: $email, password: $password, initialAdminAccount: $initialAdminAccount) {
...UserProfile
}
}
So is it possible to somehow invoke signUp
directly instead of wrapping it in custom mutation? I know graphql requires me to specify fields I want in return but codegen could automatically put all known fields there.