-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GraphQLScalarType always being imported when post-processing file…
…s, even if it's not used (#290) * Convert generalResolver -> specific resolver types * Implement logic to avoid importing GraphQLScalarType when postProcessing if the default variable statement is not added * Set up e2e test * Add changeset * Fix unit test
- Loading branch information
Showing
14 changed files
with
405 additions
and
303 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@eddeee888/gcg-typescript-resolver-files': patch | ||
--- | ||
|
||
Fix issue where GraphQLScalarType is imported all the time, regardless of whether it's used |
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 |
---|---|---|
|
@@ -30,3 +30,4 @@ type PaginationResult { | |
|
||
scalar DateTime | ||
scalar SomeRandomScalar | ||
scalar CustomLogicScalar |
3 changes: 3 additions & 0 deletions
3
...olver-files-e2e/src/test-resolvers-auto-wireup/schema/base/resolvers/CustomLogicScalar.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,3 @@ | ||
import { DateResolver } from 'graphql-scalars'; | ||
DateResolver.description = undefined; | ||
export const CustomLogicScalar = DateResolver; |
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
Oops, something went wrong.