Repository navigation
feat(graphql): add read-only GraphQL endpoint for keys, holders and t… - #1258
Jubilee-001 wants to merge 3 commits into
Conversation
…rades (accesslayerorg#1248) Mount graphql-yoga at POST /api/v1/graphql exposing a read-only schema with Key, Holder and Trade types plus Relay-style cursor connections (key(id), keys(first,after), trades(keyId,first,after)). - src/graphql/schema.ts: typeDefs with read-only Query root (no mutations) - src/graphql/resolvers.ts: cursor pagination reusing paginateQuery and DataLoaders for batched holder/creator lookups - src/graphql/loaders.ts: per-request DataLoaders (creator, holder, holdersByKey) batching lookups to one query per request level - src/graphql/validation.ts: max depth 6, max cost 1000, introspection disabled in production unless a valid x-api-key is supplied - src/graphql/router.ts: Express handler executing graphql() with custom validation rules and per-request loader context - src/app.ts: mount the router under /api/v1/graphql Tests cover nested resolution, pagination, depth/cost limit enforcement, DataLoader batching, and that mutations are not exposed.
|
@Jubilee-001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
✅ PR Ready for ReviewDue to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging. This PR has passed all automated checks:
Next step: Please share this PR link in our Telegram group so a maintainer can review and merge it: https://t.me/c/accesslayerorg/8514 |
|
PR accesslayerorg#1258 imported graphqlRouter but never mounted it, causing the 'eslint @typescript-eslint/no-unused-vars' CI failure ('graphqlRouter is defined but never used' at src/app.ts:19). Mount the router under /api/v1/graphql so the read-only GraphQL endpoint is exposed and the import is used.
✅ PR Ready for ReviewDue to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging. This PR has passed all automated checks:
Next step: Please share this PR link in our Telegram group so a maintainer can review and merge it: https://t.me/c/accesslayerorg/8514 |
Mount graphql-yoga at POST /api/v1/graphql exposing a read-only schema with Key, Holder and Trade types plus Relay-style cursor connections (key(id), keys(first,after), trades(keyId,first,after)).
Tests cover nested resolution, pagination, depth/cost limit enforcement, DataLoader batching, and that mutations are not exposed.
Closes #1248