feat(server): default the scoped routing plane to logical routing_public - #1466
Merged
Conversation
The platform database now publishes the routing plane under its logical name (routing_public) rather than the constructive_-prefixed staging name. The server default, the X-Api-Name lookup, the flush domain query, and the express-context loaders all honor the configured scopedRoutingSchema (threaded through LoaderContext.routingSchema) instead of hardcoding constructive_routing_public. Integration suites that seed the pre-rename published fixture modules pin the legacy schema explicitly.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…chema scopedRouting -> useRouting, scopedRoutingSchema -> routingSchema, API_SCOPED_ROUTING_SCHEMA -> API_ROUTING_SCHEMA, plus the matching helper/constant names and docs.
1.0.1 was unpublished from npm; CI fixture installs fail with ETARGET.
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.
Summary
Server-side wiring for constructive-io/constructive-planning#1268 / #1264 items 3–4: constructive-db#2516 renamed the published routing plane to its logical name, so the platform DB now carries
routing_public— but the server still hardcodedconstructive_routing_publicin places that ignored the configurable routing-schema option.apiDefaults.routingSchema(and themetaSchemasdefault entry) →routing_public.API_ROUTING_SCHEMAstill overrides.graphql/serverno longer hardcodes the schema: the X-Api-Name lookup (queryByApiName) and the/flushdomain query now build their SQL fromgetRoutingSchema(opts)(new helper inmiddleware/routing.ts, identifier-validated, interpolated as a quoted identifier).express-contextloaders (rls/cors/database-settings/pubkey/webauthn) previously hardcodedconstructive_routing_public.*;LoaderContextgainsroutingSchema?(defaultrouting_publicviaroutingSchemaOf(ctx)), threaded frombuildLoaderContextandcreateContextMiddleware({ routingSchema }).scopedRouting→useRouting,scopedRoutingSchema→routingSchema,API_SCOPED_ROUTING_SCHEMA→API_ROUTING_SCHEMA, and matching helper/constant names — "scoped routing" naming no longer leaks into config surfaces.Integration fixtures (
@constructive-db/routing@1.0.1inpgpm.json) still publish the pre-rename prefixed schema, so the server-test suites pinroutingSchema: 'constructive_routing_public'explicitly — they can drop that once the renamed plane packages are published.Tests: graphql/server 120/120, express-context 4/4, graphql/env 9/9 (snapshot updated), server-test scoped suites 86/86 locally (upload/S3 suite requires MinIO, absent locally — verified on CI).
Link to Devin session: https://app.devin.ai/sessions/ef854ab8e37e4fedbb21bfd777608edd
Requested by: @pyramation