Skip to content

[BP] Add create reservation mutation#1979

Draft
StockerMC wants to merge 21 commits intomainfrom
bp-create-reservation-query
Draft

[BP] Add create reservation mutation#1979
StockerMC wants to merge 21 commits intomainfrom
bp-create-reservation-query

Conversation

@StockerMC
Copy link
Copy Markdown
Contributor

@StockerMC StockerMC commented Mar 19, 2026

This PR is based off #1960 (bp-client-model-updated), and will remain a draft until #1960 is merged into main.

Merge Bot and others added 20 commits March 15, 2026 19:21
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve conflicts in test_mutations.py and generated schema.ts.
Keep new client model fields, adopt main's profilePhoto url format.
Fix duplicate profilePhoto query fragment in test utils.
Add GraphQL mutation to create reservations with client associations.
Updates bed, room, and client statuses to RESERVED atomically.
Validates bed/room availability, client uniqueness, and org access.
Uses select_for_update to prevent double-booking race conditions.
14 tests covering happy paths (bed, room, both, multiple clients),
validation errors (empty clients, duplicates, multiple primaries,
missing bed/room, already reserved), cross-org rejection,
nonexistent client, and database persistence.
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @StockerMC, your pull request is larger than the review limit of 150000 diff characters

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 19, 2026

🚀 Expo continuous deployment is ready for betterangels!

  • Project → betterangels
  • Environment → Preview
  • Platforms → android, ios
  • Scheme → betterangels
  🤖 Android 🍎 iOS
Runtime Version 9568dc0a67d5cab1cea1b962ed7b1161b27696be 9568dc0a67d5cab1cea1b962ed7b1161b27696be
Build Details Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview
Runtime version: 9568dc0a67d5cab1cea1b962ed7b1161b27696be
App version: 1.0.61
Git commit: c81d2203ac488abe36d611832c03c1fdb60e253a
Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview
Runtime version: 9568dc0a67d5cab1cea1b962ed7b1161b27696be
App version: 1.0.61
Git commit: c81d2203ac488abe36d611832c03c1fdb60e253a
Update Details Update Permalink
DetailsBranch: bp-create-reservation-query
Runtime version: 9568dc0a67d5cab1cea1b962ed7b1161b27696be
Git commit: 86dab308a45a78bd0fd5cacd1a42e6ecee213ad7
Update Permalink
DetailsBranch: bp-create-reservation-query
Runtime version: 9568dc0a67d5cab1cea1b962ed7b1161b27696be
Git commit: 86dab308a45a78bd0fd5cacd1a42e6ecee213ad7
Update QR

iOS Simulator Build: Simulator Build Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants