Skip to content

Commit

Permalink
fix(router): GraphQlParser typeString formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kon14 committed Dec 10, 2021
1 parent 51813a2 commit bef87ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/router/src/controllers/GraphQl/GraphQlParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class GraphQlParser extends ConduitParser<ParseResult, ProcessingObject>
processingObject.typeString +=
`${name}: ${isArray ? '[' : ''}` +
this.getType(value) +
`${isArray ? `] ${isRequired ? '!' : ''}` : ''} `;
`${isArray ? `${isRequired ? '!' : ''}]` : ''} `;
}

protected getResultFromObject(
Expand All @@ -105,9 +105,9 @@ export class GraphQlParser extends ConduitParser<ParseResult, ProcessingObject>
processingObject.typeString +=
fieldName +
': ' +
` ${isArray ? '[' : ''}` +
`${isArray ? '[' : ''}` +
nestedName +
`${isArray ? `] ${isRequired ? '!' : ''}` : ''} `;
`${isArray ? `${isRequired ? '!' : ''}]` : ''} `;
processingObject.finalString +=
' ' + this.extractTypesInternal(input, nestedName, value).finalString + ' ';
}
Expand Down Expand Up @@ -147,9 +147,9 @@ export class GraphQlParser extends ConduitParser<ParseResult, ProcessingObject>
processingObject.typeString +=
name +
': ' +
` ${isArray ? '[' : ''}` +
`${isArray ? '[' : ''}` +
(input ? 'ID' : value) +
` ${isArray ? ']' : ''}` +
`${isArray ? ']' : ''}` +
(isRequired ? '!' : '') +
' ';
}
Expand Down

0 comments on commit bef87ed

Please sign in to comment.