Login __generated__ file with mutation defined in lowercase is causing errors
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- graphql, javascript, typescript
- Domain
- documentation
Research direction
Review the mutation section linked in the issue, the generated pages/generated/login.ts file, and server/src/tests/integration.js. Check that the mutation naming and generated type references use the same casing throughout; the tutorial code and integration test should be consistent and no longer produce the reported errors.
Written by the indexing model from the issue text.
Description
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)
}
`;
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 808
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apollographql/fullstack-tutorial
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
investigate
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
documentation
apollographql/fullstack-tutorial#285 · 3 comments · 1 assignee ·
-
investigate
Difficulty 3/5 1-2 days Newbie friendliness 35/100
apollographql/fullstack-tutorial#255 · 2 reactions ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 25/100
apollographql/fullstack-tutorial#254 · 2 comments ·
All issues in apollographql/fullstack-tutorial
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100