Phase 2b — schema: port Graphene → Strawberry at byte-identical SDL parity#91
Closed
chrisbc wants to merge 1 commit into
Closed
Phase 2b — schema: port Graphene → Strawberry at byte-identical SDL parity#91chrisbc wants to merge 1 commit into
chrisbc wants to merge 1 commit into
Conversation
…rity - strawberry_schema.py: full 29-type schema; tools/schema_parity.py gate confirms byte-identical vs schema.legacy.graphql - custom Node interface (id: ID!, not strawberry.relay/GlobalID); QueryRoot root type; auto_camel_case=False; relay PageInfo camelCase via name= - nullability (X|None for nullable-with-default), UNSET vs =null args, and the partial 3-key style-arg default all matched - resolvers reuse the graphene-free compute helpers; light query-root resolvers verified vs legacy output - corpus replay re-pointed at the Strawberry schema (15 pass); add strawberry mypy plugin (new code mypy-clean) - archive-dependent runtime resolvers stubbed -> Phase 3 (need fixtures + tests) Refs #86
This was referenced Jun 24, 2026
Member
Author
|
Landed via the combined PR #95 (one merge → one test-stage deploy, per runbook G7). Per-phase detail preserved here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked migration — PR 4 of N. Base =
migrate/strawberry-p2-data(Phase 2a, #90).Epic: GNS-Science/nshm-toshi-api#359 · Tracking: #86 · Log:
docs/MIGRATION_LOG.mdThe schema port — the largest piece.
strawberry_schema.pyreproduces all 29 types;tools/schema_parity.pyproves it byte-identical toschema.legacy.graphql.What's here
Nodeinterface (id: ID!, notstrawberry.relay/GlobalID— Model C1); root typeQueryRoot;auto_camel_case=Falsewith relayPageInfofields kept camelCase.X | None),strawberry.UNSETvs= nullargs (Model T3), and the legacy partial 3-key style-arg default reproduced via an input instance withfill_*UNSET.cached.*,color_scale,apply_geojson_style,get_location_detail_list). Light query-root resolvers verified against legacy output (about, locations, radii, colour-scale, location lists).tools/schema_parity.pygate + corpus replay re-pointed at the Strawberry schema.strawberry.ext.mypy_plugin; new code is mypy-clean.Scope boundary
Archive-dependent runtime resolvers (rupture field computes, pagination, sections geojson/MFD/colour,
node()dispatch) are stubbed → Phase 3, where they're implemented with the tiny-archive fixtures + the converted test suite that verify them. The schema shape is complete and parity-locked now.Verification
schema_parity→ byte-identical to the legacy SDLcli/cli_ab_teststill import (graphene path untouched)Note: 29 mypy errors remain in the legacy graphene modules (pre-existing
follow_untyped_importsconfig; deleted at cutover) — not from this PR, and mypy isn't the PR test gate.