-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EntityResolver input type fix (#2594)
* EntityResolver input type fix fixes #2326 - when using `@entityResolver(multi: true)` the InputType of the entity resolver may be in a different package (usually `model`). The fix is to pull the types.Type of the resolver input, and use templates.CurrentImports.LookupType in order to render it correctly (possibly adding another import) * entityResolver input type fix: update tests change testdata/entityresolver/gqlgen.yml to use a dedicated package for the model (as in the default sample yml), and run go generate. before the input type fix, generation fails with errors like - plugin/federation/testdata/entityresolver/generated/federation.go:338:17: undeclared name: MultiHelloByNamesInput plugin/federation/testdata/entityresolver/generated/federation.go:354:21: undeclared name: MultiHelloMultipleRequiresByNamesInput plugin/federation/testdata/entityresolver/generated/federation.go:362:17: undeclared name: MultiHelloMultipleRequiresByNamesInput
- Loading branch information
Showing
8 changed files
with
315 additions
and
286 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
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
73 changes: 37 additions & 36 deletions
73
plugin/federation/testdata/entityresolver/entity.resolvers.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.