Business-trip attendee mutations throw TypeError instead of a clear error when no row is affected
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- graphql, typescript
- Domain
- backend-api-design
Research direction
Read packages/server/src/modules/business-trips/resolvers/business-trip-attendees.resolver.ts and the provider query at providers/business-trips-attendees.provider.ts:48-52 to see the empty-result cases. Find the tests for these three mutations and add coverage for duplicate insertion and missing attendees on update and delete. Done means each empty result produces a clear GraphQLError and all three cases are tested.
Written by the indexing model from the issue text.
Description
In packages/server/src/modules/business-trips/resolvers/business-trip-attendees.resolver.ts, all three mutations end in .then(res => res[0].attendee_business_id):
insertBusinessTripAttendee: the SQL isINSERT … ON CONFLICT DO NOTHING RETURNING *(providers/business-trips-attendees.provider.ts:48-52). Adding an attendee who is already on the trip returns no rows, sores[0]isundefinedand the client getsTypeError: Cannot read properties of undefined.updateBusinessTripAttendee/deleteBusinessTripAttendee: these crash the same way when the attendee isn't on the trip.
Done when: each mutation checks for an empty result and throws a GraphQLError with a clear message (e.g. "Attendee is already part of this business trip" / "Attendee not found on this business trip"), with tests for each.
Generated by Claude Code
- Dominant language
- TypeScript
- Stars
- 30
- Forks
- 10
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 276
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 Urigo/accounter-fullstack
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Urigo/accounter-fullstack#5302 ·
Maintainers usually reply within 2 days
-
1214 annual-audit-workflow
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Urigo/accounter-fullstack#5257 ·
Maintainers usually reply within 2 days
-
1214 annual-audit-workflow
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Urigo/accounter-fullstack#5256 ·
Maintainers usually reply within 2 days
-
annual-audit-workflow
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
Urigo/accounter-fullstack#5252 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Urigo/accounter-fullstack#4919 ·
Maintainers usually reply within 2 days
All issues in Urigo/accounter-fullstack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:vscode bug has repro platform:macos platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
effort/l priority/p1 risk/high triage/core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
iflytek/skillhub#1188 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Fission-AI/OpenSpec#2337 ·
Maintainers usually reply within 1 day