Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mercurius-validation

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mercurius-validation - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

8

index.js

@@ -19,5 +19,7 @@ 'use strict'

// Add hook to regenerate the resolvers when the schema is refreshed
app.graphql.addHook('onGatewayReplaceSchema', async (instance, schema) => {
validation.registerValidationSchema(schema)
})
if (app.graphqlGateway) {
app.graphqlGateway.addHook('onGatewayReplaceSchema', async (instance, schema) => {
validation.registerValidationSchema(schema)
})
}
},

@@ -24,0 +26,0 @@ {

{
"name": "mercurius-validation",
"version": "3.0.0",
"version": "4.0.0",
"description": "Mercurius Validation Plugin adds configurable Validation support to Mercurius.",

@@ -37,3 +37,5 @@ "main": "index.js",

"devDependencies": {
"@sinonjs/fake-timers": "^9.1.2",
"@mercuriusjs/federation": "^1.0.0",
"@mercuriusjs/gateway": "^1.0.0",
"@sinonjs/fake-timers": "^10.0.2",
"@types/node": "^18.0.0",

@@ -46,3 +48,3 @@ "@types/ws": "^8.5.3",

"fastify": "^4.2.0",
"mercurius": "^10.0.0",
"mercurius": "^12.0.0",
"pre-commit": "^1.2.2",

@@ -52,5 +54,5 @@ "snazzy": "^9.0.0",

"tap": "^16.3.0",
"tsd": "^0.22.0",
"tsd": "^0.25.0",
"typescript": "^4.7.4",
"wait-on": "^6.0.1"
"wait-on": "^7.0.1"
},

@@ -62,3 +64,3 @@ "dependencies": {

"ajv-formats": "^2.1.1",
"fastify-plugin": "^3.0.0",
"fastify-plugin": "^4.0.0",
"graphql": "^16.2.0"

@@ -65,0 +67,0 @@ },

@@ -5,3 +5,4 @@ 'use strict'

const Fastify = require('fastify')
const mercurius = require('mercurius')
const { mercuriusFederationPlugin } = require('@mercuriusjs/federation')
const mercuriusGateway = require('@mercuriusjs/gateway')
const mercuriusValidation = require('..')

@@ -11,6 +12,5 @@

const service = Fastify()
service.register(mercurius, {
service.register(mercuriusFederationPlugin, {
schema,
resolvers,
federationMetadata: true
resolvers
})

@@ -140,3 +140,3 @@ await service.listen({ port: 0 })

})
gateway.register(mercurius, {
gateway.register(mercuriusGateway, {
gateway: {

@@ -143,0 +143,0 @@ services: [{

@@ -7,3 +7,4 @@ 'use strict'

const Fastify = require('fastify')
const mercurius = require('mercurius')
const { mercuriusFederationPlugin, buildFederationSchema } = require('@mercuriusjs/federation')
const mercuriusGateway = require('@mercuriusjs/gateway')
const mercuriusValidation = require('..')

@@ -81,6 +82,5 @@

messageService.register(mercurius, {
messageService.register(mercuriusFederationPlugin, {
schema,
resolvers,
federationMetadata: true
resolvers
})

@@ -92,3 +92,3 @@

await gateway.register(mercurius, {
await gateway.register(mercuriusGateway, {
gateway: {

@@ -202,3 +202,3 @@ services: [

`
messageService.graphql.replaceSchema(mercurius.buildFederationSchema(newSchema))
messageService.graphql.replaceSchema(buildFederationSchema(newSchema))
messageService.graphql.defineResolvers(resolvers)

@@ -205,0 +205,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc