Skip to content

feat: add GraphQL gateway with cursor pagination - #135

Merged
memplethee-lab merged 3 commits into
SourceXXL:mainfrom
playmaker410:feat/graphql-gateway-cursor-pagination
Aug 20, 2026
Merged

feat: add GraphQL gateway with cursor pagination#135
memplethee-lab merged 3 commits into
SourceXXL:mainfrom
playmaker410:feat/graphql-gateway-cursor-pagination

Conversation

@playmaker410

@playmaker410 playmaker410 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a typed GraphQL gateway at POST /api/v1/graphql over the existing NestJS services.

The gateway provides:

  • approved agent reviews with opaque, versioned cursor pagination
  • stable createdAt DESC and id DESC keyset ordering
  • request-local DataLoader batching for review authors
  • typed rating aggregation queries
  • generated TypeScript operation/result types and TypedDocumentNode values
  • reusable typed frontend client helpers and pagination example
  • production introspection protection and authenticated HTTP contract coverage
  • CI checks for generated SDK freshness, gateway tests, pagination tests, type checking, and builds

Business logic remains in the existing AgentReviewsService and UserService instead of being duplicated in GraphQL resolvers.

Closes #130

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Performance improvement
  • Code refactoring

How Has This Been Tested?

  • Unit tests added/updated
  • E2E/HTTP contract tests added/updated
  • Manual generation and build verification performed
  • Tested in staging environment

Commands run:

  • npm run graphql:codegen
  • npm test -- --runInBand src/graphql src/discovery/reviews/agent-reviews.service.spec.ts src/common/pagination/cursor-pagination.service.spec.ts (39 tests passed)
  • npm run build
  • ESLint on the changed GraphQL TypeScript files

The complete repository suite reports 816 passing tests and 2 unrelated pre-existing failures in challenge.service.spec.ts and websocket.stress.spec.ts. The scoped GraphQL and pagination suites are green and are now enforced in CI.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented hard-to-understand areas
  • I have made corresponding documentation changes
  • My changes generate no new warnings
  • I have added tests that prove the feature works
  • New feature tests pass locally
  • Any dependent changes have been merged and published in downstream modules (not applicable)

Screenshots

Not applicable; this contribution adds an API and generated TypeScript SDK surface.

Additional Notes

The schema is packaged as a Nest build asset and can be loaded independently of the process working directory. Frontends can import generated documents, operation types, and helpers from src/graphql/client/index.ts.

@memplethee-lab
memplethee-lab merged commit e78c5bf into SourceXXL:main Aug 20, 2026
2 checks passed
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.

Module: GraphQL Gateway & Cursor Pagination

2 participants