Skip to content

fix: Apply same viewer context subclass type mechanism to knexLoader and related methods#472

Merged
wschurman merged 1 commit intomainfrom
wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods
Feb 27, 2026
Merged

fix: Apply same viewer context subclass type mechanism to knexLoader and related methods#472
wschurman merged 1 commit intomainfrom
wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods

Conversation

@wschurman
Copy link
Member

@wschurman wschurman commented Feb 26, 2026

Why

When these were installed extension functions, we could get away without the TMViewerContext2 technique. But now that these are loader methods on the PostgresEntity subclass, we need this again (it's the same as Entity and ReadonlyEntity).

This type allows the typechecker to behave correctly when a subclass of ViewerContext is used.

How

Add generic the same as ReadonlyEntity/Entity.

Test Plan

yarn tsc in application that uses ViewerContext subclass and knexLoader.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c60f4cd) to head (fa3ac1e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #472   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          110       110           
  Lines        16036     16041    +5     
  Branches      1439      1439           
=========================================
+ Hits         16036     16041    +5     
Flag Coverage Δ
integration 23.42% <100.00%> (+0.02%) ⬆️
unittest 95.08% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wschurman wschurman changed the base branch from wschurman/02-25-feat_support_nullable_search_fields_with_postgres_transforms to graphite-base/472 February 26, 2026 19:51
@wschurman wschurman force-pushed the wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods branch from f8b382e to 83e68a2 Compare February 26, 2026 19:51
@wschurman wschurman changed the base branch from graphite-base/472 to main February 26, 2026 19:51
@wschurman wschurman force-pushed the wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods branch from 83e68a2 to fa3ac1e Compare February 26, 2026 22:10
@wschurman wschurman requested review from ide and quinlanj February 26, 2026 22:23
@wschurman wschurman marked this pull request as ready for review February 26, 2026 22:23
Copy link
Member Author

wschurman commented Feb 27, 2026

Merge activity

  • Feb 27, 2:15 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 27, 2:15 AM UTC: @wschurman merged this pull request with Graphite.

@wschurman wschurman merged commit 018a40b into main Feb 27, 2026
5 checks passed
@wschurman wschurman deleted the wschurman/02-26-fix_apply_same_viewer_context_subclass_type_mechanism_to_knexloader_and_related_methods branch February 27, 2026 02:15
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