-
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
5853543
commit dcfad60
Showing
5 changed files
with
24 additions
and
24 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...olver_context/ContextValueTypedAsNever.ts → ...ntext/ContextValueTypedAsNever.invalid.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** @gqlType */ | ||
export class SomeType { | ||
/** @gqlField */ | ||
greeting(args: unknown, ctx: never): string { | ||
greeting(ctx: never): string { | ||
return ctx.greeting; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/tests/fixtures/resolver_context/ContextValueTypedAsNever.invalid.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,18 @@ | ||
----------------- | ||
INPUT | ||
----------------- | ||
/** @gqlType */ | ||
export class SomeType { | ||
/** @gqlField */ | ||
greeting(ctx: never): string { | ||
return ctx.greeting; | ||
} | ||
} | ||
|
||
----------------- | ||
OUTPUT | ||
----------------- | ||
src/tests/fixtures/resolver_context/ContextValueTypedAsNever.invalid.ts:4:17 - error: Unexpected `never` type for resolver argument. If a resolver argument is not needed by the resolver, it may be omitted. | ||
|
||
4 greeting(ctx: never): string { | ||
~~~~~ |
18 changes: 0 additions & 18 deletions
18
src/tests/fixtures/resolver_context/ContextValueTypedAsNever.ts.expected
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/tests/fixtures/resolver_context/ContextValueTypedAsString.invalid.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** @gqlType */ | ||
export class SomeType { | ||
/** @gqlField */ | ||
greeting(args: unknown, ctx: string): string { | ||
greeting(ctx: string): string { | ||
return ctx; | ||
} | ||
} |
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