Socket
Socket
Sign inDemoInstall

graphql-constraint-directive

Package Overview
Dependencies
8
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.3.0 to 5.4.0

test/id.test.js

6

apollo4.d.ts

@@ -1,2 +0,2 @@

import {DocumentNode, GraphQLSchema} from "graphql";
import {DocumentNode} from "graphql";
import {ApolloServerPlugin} from '@apollo/server';

@@ -17,4 +17,4 @@

*
* @param options to setup plugin. `schema` is deprecated now, not used, as plugins gets schema from the Apollo Server.
* @param options to setup plugin.
*/
export function createApollo4QueryValidationPlugin ( options: { schema?: GraphQLSchema } ) : ApolloServerPlugin;
export function createApollo4QueryValidationPlugin ( options?: {} ) : ApolloServerPlugin;

@@ -67,3 +67,3 @@ import {GraphQLSchema, GraphQLError, DocumentNode, ValidationContext} from "graphql";

*/
export function validateQuery () : (schema: GraphQLSchema, query: DocumentNode, variables: Record<string, any>, operationName?: string) => Array<GraphQLError>;
export function validateQuery () : (schema: GraphQLSchema, query: DocumentNode, variables: Record<string, any>, operationName?: string, pluginOptions?: {}) => Array<GraphQLError>;

@@ -70,0 +70,0 @@ /**

@@ -7,3 +7,4 @@ const {

isScalarType,
isListType
isListType,
GraphQLID
} = require('graphql')

@@ -14,3 +15,3 @@ const { ConstraintStringType, validate: validateStringFn } = require('../scalars/string')

function getConstraintTypeObject (fieldName, type, uniqueTypeName, directiveArgumentMap) {
if (type === GraphQLString) {
if (type === GraphQLString || type === GraphQLID) {
return new ConstraintStringType(

@@ -35,3 +36,3 @@ fieldName,

function getConstraintValidateFn (type) {
if (type === GraphQLString) {
if (type === GraphQLString || type === GraphQLID) {
return validateStringFn

@@ -38,0 +39,0 @@ } else if (type === GraphQLFloat || type === GraphQLInt) {

{
"name": "graphql-constraint-directive",
"version": "5.3.0",
"version": "5.4.0",
"description": "Validate GraphQL fields",

@@ -37,4 +37,4 @@ "main": "index.js",

"devDependencies": {
"apollo-server-express": "3.12.1",
"@apollo/server": "4.9.3",
"apollo-server-express": "3.13.0",
"@apollo/server": "4.9.5",
"coveralls": "3.1.1",

@@ -46,3 +46,3 @@ "express": "4.18.2",

"standard": "16.0.4",
"supertest": "6.3.3",
"supertest": "6.3.4",
"@graphql-yoga/node": "2.13.13"

@@ -49,0 +49,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc