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

@graphql-codegen/visitor-plugin-common

Package Overview
Dependencies
Maintainers
5
Versions
6021
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/visitor-plugin-common - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5-alpha-4bc4c4b5.1

5

dist/commonjs/base-resolvers-visitor.d.ts

@@ -111,5 +111,9 @@ import { ParsedConfig, RawConfig, BaseVisitor } from './base-visitor';

protected _variablesTransfomer: OperationVariablesToObject;
protected _usedMappers: {
[key: string]: boolean;
};
constructor(rawConfig: TRawConfig, additionalConfig: TPluginConfig, _schema: GraphQLSchema, defaultScalars?: ScalarsMap);
readonly schema: GraphQLSchema;
readonly defaultMapperType: string;
readonly unusedMappers: string[];
readonly mappersImports: string[];

@@ -127,2 +131,3 @@ protected buildMapperImport(source: string, types: string[]): string;

NonNullType(node: NonNullTypeNode): string;
protected markMapperAsUsed(name: string): void;
protected getTypeToUse(name: string, node: {

@@ -129,0 +134,0 @@ name: any;

@@ -17,2 +17,3 @@ "use strict";

this._collectedDirectiveResolvers = {};
this._usedMappers = {};
autoBind(this);

@@ -27,2 +28,5 @@ this._variablesTransfomer = new variables_to_object_1.OperationVariablesToObject(this.scalars, this.convertName);

}
get unusedMappers() {
return Object.keys(this.config.mappers).filter(name => !this._usedMappers[name]);
}
get mappersImports() {

@@ -145,4 +149,8 @@ const groupedMappers = {};

}
markMapperAsUsed(name) {
this._usedMappers[name] = true;
}
getTypeToUse(name, node) {
if (this.config.mappers[name]) {
this.markMapperAsUsed(name);
return this.config.mappers[name].type;

@@ -149,0 +157,0 @@ }

@@ -111,5 +111,9 @@ import { ParsedConfig, RawConfig, BaseVisitor } from './base-visitor';

protected _variablesTransfomer: OperationVariablesToObject;
protected _usedMappers: {
[key: string]: boolean;
};
constructor(rawConfig: TRawConfig, additionalConfig: TPluginConfig, _schema: GraphQLSchema, defaultScalars?: ScalarsMap);
readonly schema: GraphQLSchema;
readonly defaultMapperType: string;
readonly unusedMappers: string[];
readonly mappersImports: string[];

@@ -127,2 +131,3 @@ protected buildMapperImport(source: string, types: string[]): string;

NonNullType(node: NonNullTypeNode): string;
protected markMapperAsUsed(name: string): void;
protected getTypeToUse(name: string, node: {

@@ -129,0 +134,0 @@ name: any;

@@ -15,2 +15,3 @@ import { BaseVisitor } from './base-visitor';

this._collectedDirectiveResolvers = {};
this._usedMappers = {};
autoBind(this);

@@ -25,2 +26,5 @@ this._variablesTransfomer = new OperationVariablesToObject(this.scalars, this.convertName);

}
get unusedMappers() {
return Object.keys(this.config.mappers).filter(name => !this._usedMappers[name]);
}
get mappersImports() {

@@ -143,4 +147,8 @@ const groupedMappers = {};

}
markMapperAsUsed(name) {
this._usedMappers[name] = true;
}
getTypeToUse(name, node) {
if (this.config.mappers[name]) {
this.markMapperAsUsed(name);
return this.config.mappers[name].type;

@@ -147,0 +155,0 @@ }

8

package.json
{
"name": "@graphql-codegen/visitor-plugin-common",
"version": "1.0.4",
"version": "1.0.5-alpha-4bc4c4b5.1+4bc4c4b5",
"license": "MIT",

@@ -9,3 +9,3 @@ "scripts": {

"dependencies": {
"@graphql-codegen/plugin-helpers": "1.0.4",
"@graphql-codegen/plugin-helpers": "1.0.5-alpha-4bc4c4b5.1+4bc4c4b5",
"auto-bind": "2.0.0",

@@ -20,3 +20,3 @@ "dependency-graph": "0.8.0",

"devDependencies": {
"@graphql-codegen/testing": "1.0.4",
"@graphql-codegen/testing": "1.0.5-alpha-4bc4c4b5.1+4bc4c4b5",
"@types/graphql": "14.0.7",

@@ -36,3 +36,3 @@ "graphql": "14.1.1",

},
"gitHead": "55065fafb9bca86768320c079bb0298b7eccb2ec"
"gitHead": "4bc4c4b5df1c86ffae5f52db41d143e8e59161d8"
}

Sorry, the diff of this file is not supported yet

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