Skip to content

fix(persisted-operations sample): demo a genuinely different hot-fix doc#56

Merged
Theauxm merged 1 commit into
mainfrom
fix/persisted-ops-hc-cache-invalidation
May 12, 2026
Merged

fix(persisted-operations sample): demo a genuinely different hot-fix doc#56
Theauxm merged 1 commit into
mainfrom
fix/persisted-ops-hc-cache-invalidation

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 12, 2026

Summary

The hot-fix demo re-uploaded the same document text from manifest.json, so it would have passed even if the underlying cache-invalidation path in Trax.Api.GraphQL.PersistedOperations had been silently broken — and in fact it was, see paired PR TraxSharp/Trax.Api#52. The client now re-uploads a shape-changed document (adds __typename with bypassShapeDiff) and asserts the new field appears in the response, so the sample fails loudly if HC's IDocumentCache / IPreparedOperationCache are not invalidated on upsert.

Also extends POSTGRES_MULTIPLE_DATABASES in docker-compose.yml with the trax_api_* databases the Trax.Api integration tests need. CI creates these out-of-band; local dev was the only place they were missing.

Test plan

  • dotnet run --project samples/PersistedOperations/Trax.Samples.PersistedOperations.Api then dotnet run --project samples/PersistedOperations/Trax.Samples.PersistedOperations.Client against the paired Trax.Api fix prints Hot-fix verified: __typename present in response.
  • Without the Trax.Api fix the sample throws Hot-fix did not take effect.
  • docker compose up -d on a clean volume creates every database the Trax.Api integration suite needs.

Related

The hot-fix demo re-uploaded the same document text from manifest.json,
so it would have passed even if the underlying cache-invalidation path
in Trax.Api.GraphQL.PersistedOperations had been silently broken (and
in fact it was — see the matching fix in Trax.Api). The client now
re-uploads a shape-changed document (adds __typename) with
bypassShapeDiff and asserts the new field appears in the response, so
the sample fails loudly if HC's IDocumentCache / IPreparedOperationCache
are not invalidated on upsert.

Also extend POSTGRES_MULTIPLE_DATABASES with the trax_api_* databases
the Trax.Api integration tests need; CI creates these out-of-band and
local dev was the only place they were missing.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Theauxm Theauxm reopened this May 12, 2026
@Theauxm Theauxm merged commit 1478fe4 into main May 12, 2026
3 checks passed
@Theauxm Theauxm deleted the fix/persisted-ops-hc-cache-invalidation branch May 12, 2026 17:09
@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented May 12, 2026

This PR is included in version 1.23.1

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.

1 participant