-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5c0ec2
commit 5853543
Showing
4 changed files
with
55 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/tests/fixtures/arguments/MultipleParamsTypedAsTypeLiteral.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @gqlType */ | ||
export default class SomeType { | ||
/** @gqlField */ | ||
hello(args: { greeting: string }, alsoArgs: { farewell: string }): string { | ||
return "Hello world!"; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/tests/fixtures/arguments/MultipleParamsTypedAsTypeLiteral.ts.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
----------------- | ||
INPUT | ||
----------------- | ||
/** @gqlType */ | ||
export default class SomeType { | ||
/** @gqlField */ | ||
hello(args: { greeting: string }, alsoArgs: { farewell: string }): string { | ||
return "Hello world!"; | ||
} | ||
} | ||
|
||
----------------- | ||
OUTPUT | ||
----------------- | ||
src/tests/fixtures/arguments/MultipleParamsTypedAsTypeLiteral.ts:4:37 - error: Unexpected multiple resolver parameters typed with an object literal. Grats assumes a resolver parameter typed with object literals describes the GraphQL arguments. Therefore only one such parameter is permitted. | ||
|
||
4 hello(args: { greeting: string }, alsoArgs: { farewell: string }): string { | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
src/tests/fixtures/arguments/MultipleParamsTypedAsTypeLiteral.ts:4:9 | ||
4 hello(args: { greeting: string }, alsoArgs: { farewell: string }): string { | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Previous type literal |