Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
nexus-federation-plugin
Advanced tools
A [Nexus](https://nexusjs.org/) plugin to integrate [Apollo Federation](https://www.apollographql.com/docs/federation/) with [Nexus Schema](https://nexusjs.org/docs/guides/schema).
A Nexus plugin to integrate Apollo Federation with Nexus Schema.
yarn add nexus-federation-plugin
or
npm i nexus-federation-plugin
import { makeSchema } from 'nexus'
import { nexusPluginFederation } from 'nexus-federation-plugin'
export const nexusSchema = makeSchema({
types,
plugins: [nexusPluginFederation], // add plugin here
outputs: {
schema: __dirname + '/generated/schema.graphql',
typegen: __dirname + '/generated/nexus.ts',
},
contextType: {
module: join(__dirname, 'context.ts'),
export: 'Context',
},
})
import { ApolloServer } from 'apollo-server'
import {
transformSchemaFederation,
printTransformedSchema,
} from 'nexus-federation-plugin'
import { createContext } from './context'
import { nexusSchema } from './nexusSchema'
const server = new ApolloServer({
// warp nexus schema with our function
schema: transformSchemaFederation(nexusSchema),
context: createContext,
})
server.listen().then(({ url }) => {
// you can print Transformed Schema with our function
// it's take two args
// 1- server instance
// 2- create file path default `src/generated`
printTransformedSchema(server)
console.log(`🚀 Server ready at ${url}`)
})
Like graphql-transform-federation you can pass configration to nexus objectType
import { objectType } from 'nexus'
export const User = objectType({
name: 'User',
keyFields: ['id'],
fieldDirectives: {
id: {
external: true,
requires: 'email name',
},
email: {
external: true,
},
},
resolveReference: (parent, ctx) => {},
definition(t) {
t.nonNull.int('id')
t.nonNull.string('email')
t.string('name')
},
})
FAQs
A [Nexus](https://nexusjs.org/) plugin to integrate [Apollo Federation](https://www.apollographql.com/docs/federation/) with [Nexus Schema](https://nexusjs.org/docs/guides/schema).
We found that nexus-federation-plugin demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.