feat(search-api-server): serve the search API as a bootable process and Docker image#646
Open
ddeboer wants to merge 2 commits into
Open
feat(search-api-server): serve the search API as a bootable process and Docker image#646ddeboer wants to merge 2 commits into
ddeboer wants to merge 2 commits into
Conversation
- validateSearchType silently accepted a kind outside the FieldKind union: every kind-dependent rule passed vacuously, deferring the failure to whatever consumer read the declaration first - guards the plain-JS declaration path (a mounted schema module, a SHACL generator) that the runtime validation exists for - adds the 'unknown-kind' issue reason
ddeboer
force-pushed
the
feat/search-graphql-docker
branch
from
July 23, 2026 14:01
9fa0a8e to
1a3a7af
Compare
…nd Docker image - new composition package binding the engine-agnostic search-api-graphql handler to a Typesense engine: environment config, a mounted plain-data schema-declaration module (validated at boot), and a node:http server answering /graphql, /health and a root redirect - the search-api-server bin boots from environment variables alone and reports every configuration problem in one error - Dockerfile installs the published package from npm, so each image corresponds to a provenance-attested version; the Docker workflow builds and pushes ghcr.io/ldelements/search-api-server on each release tag, waiting for the npm publish the release run does after tagging - recorded as ADR 15
ddeboer
force-pushed
the
feat/search-graphql-docker
branch
from
July 23, 2026 14:06
1a3a7af to
41e2650
Compare
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.
Part of #600 (layer 3 of 3: the prebuilt Docker image; the handler, layer 2, shipped in #637).
Adds
@lde/search-api-server: the served search API as a bootable process and prebuilt Docker image (ghcr.io/ldelements/search-api-server) – mount a schema-declaration module, setTYPESENSE_*env vars, get/graphql(POST execution, self-contained playground,?sdl) plus/health, with CORS and depth/cost limits on by default. The composition layer that binds the deliberately engine-agnostic@lde/search-api-graphqlhandler to@lde/search-typesense.Design (ADR 15)
search:definitions, but that generator is GraphQL search API #495’s still-open scope. The mount is instead an.mjsdefault-exportingSearchTypedeclarations (validated at boot bysearchSchema()– the “declarations built outside TypeScript” path the runtime validation exists for), because a mounted module cannot resolve bare imports anyway. When GraphQL search API #495 lands, mounted SHACL becomes a second source for the same schema.@lde/search-api-graphqlwithout breaking its engine-agnosticism.docker.ymlworkflow triggers on the package’s release tag, waits for the npm publish (the release run tags before it publishes), then pushes:<version>and:latestto ghcr.Also
feat(search):validateSearchTypenow rejects an unknown fieldkind(newunknown-kindissue reason). Previously a typo’d kind in a plain-JS declaration passed every kind-dependent rule vacuously – exactly the path the mounted schema module relies on.Acceptance criteria covered (of #600)
/graphql+ playground from mounted definitions and engine config+server.ts– downstream (Replace the hand-rolled /graphql endpoint with the LDE search GraphQL handler netwerk-digitaal-erfgoed/dataset-register#2282)After merge
@lde/search-api-serveris new on npm: the first version needs the manual Trusted-Publishing bootstrap before the release run and the Docker workflow can succeed.