Skip to content

feat(nestjs-gateway): migrate express gateway to apollo server#417

Merged
TorinAsakura merged 18 commits into
masterfrom
feat/nestjs-gateway-apollo-runtime
Jul 1, 2026
Merged

feat(nestjs-gateway): migrate express gateway to apollo server#417
TorinAsakura merged 18 commits into
masterfrom
feat/nestjs-gateway-apollo-runtime

Conversation

@TorinAsakura

@TorinAsakura TorinAsakura commented Jun 29, 2026

Copy link
Copy Markdown
Member

Task

How to verify

Main scenario

  1. Context: @atls/nestjs-gateway Express gateway runtime after Apollo Server 5 and GraphQL Mesh runtime upgrade
    Action: boot a real Nest HTTP gateway with a gRPC microservice, then execute GraphQL POST requests, GET / with Accept: text/html, and GET /.well-known/apollo/server-health
    Expected result: gateway starts, gRPC query returns data, request metadata reaches gRPC, gRPC errors are exposed as INVALID_ARGUMENT exception data, the Apollo landing page returns HTML 200, and the Apollo health endpoint returns pass

Additional scenario

  1. Context: @atls/nestjs-gateway dependency graph after Apollo Server 5 and GraphQL Mesh runtime upgrade
    Action: run package lint, typecheck, focused unit tests, package build, and git whitespace check under the repo-managed Node runtime
    Expected result: validation finishes without errors; existing peer warnings remain warnings

Architecture scenario

  1. Context: gateway transport boundaries after Apollo runtime migration
    Action: inspect gateway handler, runtime, and HTTP boundaries
    Expected result: handler selects the Nest HTTP adapter boundary, Express middleware lives only in the Express boundary, Fastify has an explicit boundary, and shared Mesh/Apollo/subscription/gRPC error formatting lives outside the HTTP boundary

Proofs

  • package validation
mise x node@22.22.3 -- yarn format packages/nestjs-gateway/src/mesh/graphql-mesh.config.ts packages/nestjs-gateway/src/mesh/graphql-mesh.handler.ts packages/nestjs-gateway/src/mesh/interfaces.ts packages/nestjs-gateway/src/mesh/runtime.ts packages/nestjs-gateway/src/mesh/http/fastify.gateway.ts packages/nestjs-gateway/src/mesh/http/express.gateway.ts
mise x node@22.22.3 -- yarn lint packages/nestjs-gateway
mise x node@22.22.3 -- yarn typecheck packages/nestjs-gateway
mise x node@22.22.3 -- yarn test unit packages/nestjs-gateway/src/mesh/http/tests/express.gateway.test.ts packages/nestjs-gateway/src/mesh/http/tests/fastify.gateway.test.ts packages/nestjs-gateway/src/mesh/tests/config.test.ts
mise x node@22.22.3 -- yarn workspace @atls/nestjs-gateway build
git diff --check HEAD
  • unit-runner note
mise x node@22.22.3 -- yarn test unit packages/nestjs-gateway reached 5 pass / 0 fail / 5 files, then did not exit after 90s and was stopped manually. A direct single-file error test is still blocked by the existing Raijin path-duplication bug: ENOENT .../src/mesh/errors/packages/nestjs-gateway/src/mesh/errors/tests/format.test.ts.
  • runtime smoke
manual Node smoke from packages/nestjs-gateway with built dist:
gateway-smoke=passed url=http://127.0.0.1:52674 playground=200 health=200

covered:
- Nest HTTP app and gRPC microservice boot
- Movies query returns Mission: Impossible Rogue Nation
- Metadata query forwards Authorization as test
- Error query exposes extensions.exception as INVALID_ARGUMENT / 3 / Test
- GET / with Accept: text/html returns 200 text/html Apollo landing page
- GET /.well-known/apollo/server-health returns 200 application/health+json {"status":"pass"}
  • integration-suite note
packages/nestjs-gateway/integration/test/gateway.test.ts is still describe.skip, so the proof above is the real manual boot smoke for this PR. Issue #410 owns restoring the package integration suite.
  • compatibility note
The playground option now enables Apollo Server's local landing page plugin. When it is false or absent, the landing page stays disabled. It still drives the default introspection fallback when introspection is not set explicitly.

@TorinAsakura TorinAsakura self-assigned this Jun 29, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97d411c51d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.handler.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.handler.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.handler.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.handler.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.handler.ts Outdated
@TorinAsakura
TorinAsakura force-pushed the feat/nestjs-gateway-apollo-runtime branch from c1ba413 to f5b142e Compare June 29, 2026 22:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5b142e0fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/nestjs-gateway/src/mesh/runtime.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/http/express.gateway.ts
Comment thread packages/nestjs-gateway/src/mesh/http/express.gateway.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 532d769ebb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/nestjs-gateway/src/mesh/errors/format.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/runtime.ts Outdated
Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.config.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1256c0f5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/nestjs-gateway/src/mesh/graphql-mesh.config.ts Outdated
Comment thread packages/nestjs-gateway/package.json
Comment thread packages/nestjs-gateway/src/module/gateway.providers.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3506ef575a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/nestjs-gateway/package.json
@TorinAsakura
TorinAsakura merged commit 7483dcd into master Jul 1, 2026
6 checks passed
@TorinAsakura
TorinAsakura deleted the feat/nestjs-gateway-apollo-runtime branch July 1, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant