@graphql-codegen/visitor-plugin-common
Advanced tools
Comparing version 1.0.1-alpha-97161620.21 to 1.0.1-alpha-b0688770.19
@@ -71,12 +71,15 @@ "use strict"; | ||
getAllDirectiveResolvers() { | ||
return new utils_1.DeclarationBlock(this._declarationBlockConfig) | ||
.export() | ||
.asKind('type') | ||
.withName(this.convertName('IDirectiveResolvers'), `<Context = ${this.config.contextType.type}>`) | ||
.withBlock(Object.keys(this._collectedDirectiveResolvers) | ||
.map(schemaTypeName => { | ||
const resolverType = this._collectedDirectiveResolvers[schemaTypeName]; | ||
return utils_1.indent(this.formatRootResolver(schemaTypeName, resolverType)); | ||
}) | ||
.join('\n')).string; | ||
if (Object.keys(this._collectedDirectiveResolvers).length) { | ||
return new utils_1.DeclarationBlock(this._declarationBlockConfig) | ||
.export() | ||
.asKind('type') | ||
.withName(this.convertName('IDirectiveResolvers'), `<Context = ${this.config.contextType.type}>`) | ||
.withBlock(Object.keys(this._collectedDirectiveResolvers) | ||
.map(schemaTypeName => { | ||
const resolverType = this._collectedDirectiveResolvers[schemaTypeName]; | ||
return utils_1.indent(this.formatRootResolver(schemaTypeName, resolverType)); | ||
}) | ||
.join('\n')).string; | ||
} | ||
return ''; | ||
} | ||
@@ -83,0 +86,0 @@ Name(node) { |
@@ -69,12 +69,15 @@ import { BaseVisitor } from './base-visitor'; | ||
getAllDirectiveResolvers() { | ||
return new DeclarationBlock(this._declarationBlockConfig) | ||
.export() | ||
.asKind('type') | ||
.withName(this.convertName('IDirectiveResolvers'), `<Context = ${this.config.contextType.type}>`) | ||
.withBlock(Object.keys(this._collectedDirectiveResolvers) | ||
.map(schemaTypeName => { | ||
const resolverType = this._collectedDirectiveResolvers[schemaTypeName]; | ||
return indent(this.formatRootResolver(schemaTypeName, resolverType)); | ||
}) | ||
.join('\n')).string; | ||
if (Object.keys(this._collectedDirectiveResolvers).length) { | ||
return new DeclarationBlock(this._declarationBlockConfig) | ||
.export() | ||
.asKind('type') | ||
.withName(this.convertName('IDirectiveResolvers'), `<Context = ${this.config.contextType.type}>`) | ||
.withBlock(Object.keys(this._collectedDirectiveResolvers) | ||
.map(schemaTypeName => { | ||
const resolverType = this._collectedDirectiveResolvers[schemaTypeName]; | ||
return indent(this.formatRootResolver(schemaTypeName, resolverType)); | ||
}) | ||
.join('\n')).string; | ||
} | ||
return ''; | ||
} | ||
@@ -81,0 +84,0 @@ Name(node) { |
{ | ||
"name": "@graphql-codegen/visitor-plugin-common", | ||
"version": "1.0.1-alpha-97161620.21+97161620", | ||
"version": "1.0.1-alpha-b0688770.19+b0688770", | ||
"license": "MIT", | ||
@@ -9,3 +9,3 @@ "scripts": { | ||
"dependencies": { | ||
"@graphql-codegen/plugin-helpers": "1.0.1-alpha-97161620.21+97161620", | ||
"@graphql-codegen/plugin-helpers": "1.0.1-alpha-b0688770.19+b0688770", | ||
"auto-bind": "2.0.0", | ||
@@ -20,3 +20,3 @@ "dependency-graph": "0.8.0", | ||
"devDependencies": { | ||
"@graphql-codegen/testing": "1.0.1-alpha-97161620.21+97161620", | ||
"@graphql-codegen/testing": "1.0.1-alpha-b0688770.19+b0688770", | ||
"@types/graphql": "14.0.7", | ||
@@ -36,3 +36,3 @@ "graphql": "14.1.1", | ||
}, | ||
"gitHead": "971616200a2a0ab3c25903fd04cf31ac789284c5" | ||
"gitHead": "b0688770c3313a4593c33c60400a5c8943b03523" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
227759
3335