Following the official documentation and the rest of the tutorial, queries and mutations are defined with the first letter in uppercase (PascalCase). However, in this part of the tutorial the mutation Login is defined lowercase (I see that in the final version of the tutorial this is corrected):
export const LOGIN_USER = gql`
mutation login($email: String!) {
login(email: $email)
}
`;
The corresponding generated file (pages/__generated__/login.ts), Login type appears as well in lowercase but the related code is assuming they are in uppercase, throwing errors:
const [login, { loading, error }] = useMutation<
LoginTypes.Login,
LoginTypes.LoginVariables
>(LOGIN_USER);
The mutation Login in the integration tests (server/src/__tests__/integration.js) is also defined in lowercase:
const LOGIN = gql`
mutation login($email: String!) {
login(email: $email)
}
`;