@bhooai/nexus-graphql
v0.1.5
Published
GraphQL on `graphql` (graphql-js) with a **custom federation/gateway layer built from scratch** — no Apollo, no `@graphql-tools/federation`.
Readme
@bhooai/nexus-graphql
GraphQL on graphql (graphql-js) with a custom federation/gateway layer built
from scratch — no Apollo, no @graphql-tools/federation.
Exports
- subgraph —
defineSubgraph(SDL + resolvers, auto-wires_service/_entities), federation directives,parseKeys. - gateway —
createGateway({ subgraph })(single-subgraph, in-process) andcreateFederatedGateway(multi-subgraph).graphqlHttpHandler({ gateway, introspection, context })for HTTP/graphql. - subscriptions —
PubSub(async iterators),SubscriptionServerover WebSocket (graphql-transport-ws) with auth. - federation —
composeSupergraph(field ownership,@keycollection,@provides/@requiresrecords → supergraph SDL), the query planner (FetchNode DAG: root + entity fetches,@requirestwo-step), andexecutor(batched_entitiesby__typename+keyFields,@providesshort-circuit, error remap).
Subset supported (v1)
@key (single + composite), @external, @requires, @provides, @extends,
_entities, _service { sdl }. Skipped: @shareable arbitration, @override,
@inaccessible enforcement, subscription federation. See docs/ARCHITECTURE.md.
Subscribe note
gateway.subscribe({ document, contextValue }) needs a parsed DocumentNode
(parse(query)) and the param is contextValue (HTTP execute uses context).
