Skip to content

Conversation

@obs-gh-christiannester
Copy link
Collaborator

… in the resolver plugin

gqlgen's resolver plugin does not handle input types with resolvers correctly when generating
only a single output file. This change fixes that.
It was doing it correctly in the follow-schema mode.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@coveralls
Copy link

coveralls commented Sep 17, 2025

Pull Request Test Coverage Report for Build 17831957868

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 17802562860: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@obs-gh-christiannester obs-gh-christiannester changed the title OB-49662 Fix support for resolvers on input types in single file mode… Fix support for resolvers on input types in single file mode… Sep 18, 2025
}

for _, o := range data.Objects {
objects := make(codegen.Objects, len(data.Objects)+len(data.Inputs))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to copy?
Doesn't the following work?

for _, o := range append(data.Objects, data.Inputs...) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works as well. Changed it.

@georgios-observeinc georgios-observeinc merged commit 83cf73d into observeinc:master Sep 18, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants