Skip to content

Seanaye/feat/non null soup realtime - #6282

Merged
seanaye merged 6 commits into
mainfrom
seanaye/feat/non-null-soup-realtime
Sep 9, 2026
Merged

Seanaye/feat/non null soup realtime#6282
seanaye merged 6 commits into
mainfrom
seanaye/feat/non-null-soup-realtime

Conversation

@seanaye

@seanaye seanaye commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This PR removes the nullability of items returned from soup realtime, and logs the error if the item cannot be found


Note

Low Risk
Build-time codegen and config only; tighter validation reduces accidental type generation with no runtime API changes in the shown diff.

Overview
GraphQL cache-only projection codegen is now opt-in instead of emitting a *Result type for every operation that uses @cacheOnly. The codegen plugin accepts cacheOnlyResultOperations; web codegen lists SoupBackfill as the sole consumer (hydration paths that need types with cache-only fields stripped).

The plugin fails fast on unknown operation names and on listed operations that have no @cacheOnly fields. Tests were updated for empty config, validation errors, and projection only for named operations.

Cargo.lock bumps cache-wasm to 0.6.6 and adds tracing to the complete_graph dev dependency graph (lockfile only in this diff).

Reviewed by Cursor Bugbot for commit fcaddfb. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: df28529e-4f64-4a8a-b712-23c7afc074a6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a1cc097c-202d-445f-863e-b82a40ee292b

📥 Commits

Reviewing files that changed from the base of the PR and between ab4bd7a and e24f571.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock, !**/Cargo.lock
  • apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts is excluded by !**/generated/**, !apps/web/src/lib/service-clients/**/generated/**
📒 Files selected for processing (15)
  • apps/web/codegen.ts
  • apps/web/scripts/graphql-cache-only-projection-codegen.test.ts
  • apps/web/scripts/graphql-cache-only-projection-codegen.ts
  • crates/client/cache-wasm/Cargo.toml
  • crates/complete_graph/AGENTS.md
  • crates/complete_graph/Cargo.toml
  • crates/complete_graph/src/schema/test.rs
  • crates/complete_graph/src/schema/test/soup_patches.rs
  • crates/complete_graph/src/sdl_test.rs
  • crates/graphql_entity_mutation/src/mutations.rs
  • crates/graphql_favorite/src/mutations/test.rs
  • crates/graphql_soup/src/objects.rs
  • crates/graphql_soup/src/resolvers.rs
  • docs/AGENT_GUIDE/surfaces.md
  • static_assets/schema.graphql

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features

    • Realtime Soup updates now provide hydrated, non-null entity data.
    • Updates are deduplicated within each batch, preserving the latest operation per entity.
    • Missing viewer-visible entities are safely omitted, while explicit deletion events continue to remove records.
    • Mutation results now include hydrated entity updates when available.
  • Bug Fixes

    • Improved handling of batched updates, hydration failures, and deleted entities.
  • Documentation

    • Clarified realtime update behavior, hydration, batching, and deletion semantics.

Walkthrough

The GraphQL cache-only projection plugin now requires explicit operation opt-in and validates configured names and fields. Web codegen opts in SoupBackfill. Soup realtime updates now deduplicate patches, hydrate visible entities before response construction, omit missing entities, and propagate hydration errors. Mutation effects use the same hydration path. SoupUpdated.item is now non-null, with complete-schema tests and documentation updated accordingly.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to e24f5

The updated Soup hydration and cache-projection behavior is consistently implemented and tested, with no actionable merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is related to the Soup realtime nullability change and is under 72 characters, but it does not follow Conventional Commits format because it lacks a valid prefix such as feat: or fix:. Rename the title to a Conventional Commits format title, such as "fix: make Soup realtime items non-null".
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately covers the main Soup realtime changes, including non-null items and logging when hydration cannot find an item.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

@seanaye
seanaye merged commit 1bcde83 into main Sep 9, 2026
33 checks passed
@seanaye
seanaye deleted the seanaye/feat/non-null-soup-realtime branch September 9, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant