New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

graphql-validate-directive

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-validate-directive - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

7

dist/esm/GraphQLValidateDirective.js

@@ -1,7 +0,6 @@

import { isInputObjectType, isScalarType, GraphQLInt, GraphQLFloat, GraphQLString, isListType, isNonNullType, isObjectType, } from 'graphql';
import { getDirective } from '@graphql-tools/utils';
import Ajv from 'ajv';
import { getDirective } from '@graphql-tools/utils';
import { GraphQLFloat, GraphQLInt, GraphQLString, isInputObjectType, isListType, isNonNullType, isObjectType, isScalarType, } from 'graphql';
import pick from 'lodash/pick';
import { DefaultValidateDirectiveName } from './constants';
import { KeywordsForArray, KeywordsForNumber, KeywordsForString, } from './constants';
import { DefaultValidateDirectiveName, KeywordsForArray, KeywordsForNumber, KeywordsForString, } from './constants';
export class GraphQLValidateDirective {

@@ -8,0 +7,0 @@ schema;

{
"name": "graphql-validate-directive",
"description": "A GraphQL directive for input validation",
"version": "0.1.7",
"version": "0.1.8",
"main": "dist/cjs/index.js",

@@ -42,3 +42,3 @@ "module": "dist/esm/index.js",

"@graphql-tools/utils": "^8.6.5",
"ajv": "^8.11.0",
"ajv": "^8.14.0",
"apollo-server-plugin-base": "^3.5.2",

@@ -45,0 +45,0 @@ "lodash": "^4.17.21"

@@ -0,27 +1,26 @@

import { getDirective } from '@graphql-tools/utils'
import type { AsyncSchema, JSONSchemaType } from 'ajv'
import Ajv from 'ajv'
import {
GraphQLSchema,
GraphQLArgument,
GraphQLField,
GraphQLFloat,
GraphQLInputType,
GraphQLInt,
GraphQLList,
GraphQLNamedType,
isInputObjectType,
isScalarType,
GraphQLInputType,
GraphQLObjectType,
GraphQLScalarType,
GraphQLInt,
GraphQLFloat,
GraphQLSchema,
GraphQLString,
isInputObjectType,
isListType,
GraphQLList,
isNonNullType,
GraphQLObjectType,
GraphQLField,
GraphQLArgument,
isObjectType,
isScalarType,
} from 'graphql'
import Ajv from 'ajv'
import type { JSONSchemaType } from 'ajv'
import { getDirective } from '@graphql-tools/utils'
import type { Maybe } from 'graphql/jsutils/Maybe'
import pick from 'lodash/pick'
import type { Maybe } from 'graphql/jsutils/Maybe'
import { DefaultValidateDirectiveName } from './constants'
import type { ValidateOptions } from './type'
import {
DefaultValidateDirectiveName,
KeywordsForArray,

@@ -31,2 +30,3 @@ KeywordsForNumber,

} from './constants'
import type { ValidateOptions } from './type'

@@ -133,7 +133,5 @@ export class GraphQLValidateDirective {

public getArgsSchema(
args: readonly GraphQLArgument[],
): JSONSchemaType<Record<string, any>> {
public getArgsSchema(args: readonly GraphQLArgument[]) {
const properties: Record<string, any> = {}
const jsonSchema: JSONSchemaType<Record<string, any>> = {
const jsonSchema: AsyncSchema = {
$async: true,

@@ -140,0 +138,0 @@ type: 'object',

@@ -1,4 +0,4 @@

import { GraphQLSchema, GraphQLNamedType, GraphQLInputType, GraphQLScalarType, GraphQLList, GraphQLObjectType, GraphQLField, GraphQLArgument } from 'graphql';
import type { AsyncSchema, JSONSchemaType } from 'ajv';
import Ajv from 'ajv';
import type { JSONSchemaType } from 'ajv';
import { GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLList, GraphQLNamedType, GraphQLObjectType, GraphQLScalarType, GraphQLSchema } from 'graphql';
import type { Maybe } from 'graphql/jsutils/Maybe';

@@ -17,4 +17,4 @@ import type { ValidateOptions } from './type';

registerTypeSchemas(typeMap: Record<string, GraphQLNamedType>): void;
getArgsSchema(args: readonly GraphQLArgument[]): JSONSchemaType<Record<string, any>>;
createValidator(args: readonly GraphQLArgument[]): import("ajv").ValidateFunction<Record<string, any>>;
getArgsSchema(args: readonly GraphQLArgument[]): AsyncSchema;
createValidator(args: readonly GraphQLArgument[]): import("ajv").AsyncValidateFunction<unknown>;
composeResolverForField(field: GraphQLField<any, any>): void;

@@ -21,0 +21,0 @@ composeResolver(type: Maybe<GraphQLObjectType>): void;

Sorry, the diff of this file is not supported yet

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