
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@nexus_js/graphql
Advanced tools
Nexus GraphQL adapter — complexity Shield, field masking, Vault-backed JWT rotation, DataLoader, CORS-safe handler
Security-first GraphQL adapter for Nexus.js.
Provides a Web-standard (Request, NexusContext) => Promise<Response> handler that integrates seamlessly with Nexus mounts, plus production-grade Shield (complexity/depth analysis), field masking, Vault-backed JWT, DataLoader, and legacy-bridge tools.
import { createGraphQLHandler, createBatchLoader, createJwtService } from '@nexus_js/graphql';
import { nexusVault } from '@nexus_js/security';
import { schema } from './graphql/schema.js';
const jwtSvc = createJwtService(nexusVault, { vaultKey: 'JWT_SECRET', issuer: 'my-app' });
const handler = createGraphQLHandler({
schema,
dev: process.env.NODE_ENV !== 'production',
shield: { maxCost: 500, maxDepth: 8, allowIntrospection: false },
mask: { 'User.passwordHash': null },
context: (req, ctx) => ({
...ctx,
user: jwtSvc.verify(req.headers.get('authorization')?.replace('Bearer ', '') ?? ''),
loaders: { user: createBatchLoader(ids => db.users.findMany(ids)) },
}),
});
// In your Nexus server config or route
export default {
server: {
mounts: [{ path: '/graphql', handler }],
},
};
createGraphQLHandler + types (GraphQLHandlerOptions, CORS, rate limit, etc.)analyseComplexity, maskResult, allowWhen, redactUnlesscreateJwtService, signJwt, verifyJwtcreateBatchLoader, BatchLoader, createLoaderRegistrycreateRemoteExecutor — robust proxy with batching, retry, transforms, auth forwardingcreateRemoteExecutorWithSchema — introspection + real buildClientSchema resultstitchSchemas — local schema merge + basic remote delegation via executorscreateGatewayResolver — simple multi-service routingSee the root README.md Legacy Bridge section and the package source for detailed examples.
createRemoteExecutor (with batching) and the handler + Shield layers are production-ready.
createRemoteExecutorWithSchema now returns a usable schema.
stitchSchemas provides practical merging for the common "add Nexus fields/security on top of legacy" use case. For very advanced type merging, custom transforms, or federation, we recommend using the executors we provide together with @graphql-tools/stitch (or Apollo Federation) in your own code — our primitives are designed to be compatible.
packages/graphql/)MIT © Nexus contributors
FAQs
Nexus GraphQL adapter — complexity Shield, field masking, Vault-backed JWT rotation, DataLoader, CORS-safe handler
The npm package @nexus_js/graphql receives a total of 39 weekly downloads. As such, @nexus_js/graphql popularity was classified as not popular.
We found that @nexus_js/graphql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.