Socket
Socket
Sign inDemoInstall

@graphql-codegen/visitor-plugin-common

Package Overview
Dependencies
Maintainers
5
Versions
5966
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.5-alpha-55065faf.0 to 1.0.5-alpha-ba454b83.0

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.5-alpha-55065faf.0+55065faf",
"version": "1.0.5-alpha-ba454b83.0+ba454b83",
"license": "MIT",

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

"dependencies": {
"@graphql-codegen/plugin-helpers": "1.0.5-alpha-55065faf.0+55065faf",
"@graphql-codegen/plugin-helpers": "1.0.5-alpha-ba454b83.0+ba454b83",
"auto-bind": "2.0.0",

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

"devDependencies": {
"@graphql-codegen/testing": "1.0.5-alpha-55065faf.0+55065faf",
"@graphql-codegen/testing": "1.0.5-alpha-ba454b83.0+ba454b83",
"@types/graphql": "14.0.7",

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

},
"gitHead": "55065fafb9bca86768320c079bb0298b7eccb2ec"
"gitHead": "ba454b834039cfaa1c1e209bb57df8e2dc28fc4c"
}

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