supergraphql/graphql-cli-prepare

View on GitHub

Showing 4 of 111 total issues

Function determineInputSchema has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

private determineInputSchema(schemaPath: string | undefined): string {
const bundleDefined = has(this.project.config, 'extensions.prepare-bundle.output')
const oldBundleDefined = has(this.project.config, 'extensions.bundle.output')
// schemaPath is only set when bundle ran
if (!schemaPath) {
Severity: Minor
Found in src/prepare.ts - About 1 hr to fix

Function determineBindingOutputPath has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

private determineBindingOutputPath(extension: string) {
let outputPath: string
if (this.argv.output) {
outputPath = path.join(this.argv.output, `${this.projectName}.${extension}`)
} else if (has(this.project.config, `extensions.binding.output`)) {
Severity: Minor
Found in src/prepare.ts - About 25 mins to fix

Function determineBundleOutputPath has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

private determineBundleOutputPath() {
let outputPath: string
if (this.argv.output) {
outputPath = path.join(this.argv.output, `${this.projectName}.graphql`)
} else if (has(this.project.config, `extensions.bundle`)) {
Severity: Minor
Found in src/prepare.ts - About 25 mins to fix

Function getProjectConfig has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

private getProjectConfig(): { [name: string]: GraphQLProjectConfig } {
let projects: { [name: string]: GraphQLProjectConfig } | undefined
if (this.argv.project) {
if (Array.isArray(this.argv.project)) {
projects = {}
Severity: Minor
Found in src/prepare.ts - About 25 mins to fix
Severity
Category
Status
Source
Language