Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix implementation type generation for fragment on a union #310

Merged
merged 6 commits into from
Feb 16, 2024

Conversation

zzh8829
Copy link
Contributor

@zzh8829 zzh8829 commented Feb 14, 2024

I have:

  • Written a clear PR title and description (above)
  • Signed the Khan Academy CLA
  • Added tests covering my changes, if applicable
  • Included a link to the issue fixed, if applicable
  • Included documentation, for new features
  • Added an entry to the changelog

before the fix

=== RUN   TestGenerate/ComplexNamedFragments.graphql/Build
# command-line-arguments
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2008:8: cannot use new(TopicNewestContentNewestContentArticle) (value of type *TopicNewestContentNewestContentArticle) as type TopicNewestContentNewestContentLeafContent in assignment:
	*TopicNewestContentNewestContentArticle does not implement TopicNewestContentNewestContentLeafContent (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2011:8: cannot use new(TopicNewestContentNewestContentVideo) (value of type *TopicNewestContentNewestContentVideo) as type TopicNewestContentNewestContentLeafContent in assignment:
	*TopicNewestContentNewestContentVideo does not implement TopicNewestContentNewestContentLeafContent (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2026:7: impossible type switch case: *TopicNewestContentNewestContentArticle
	(*v) (variable of type TopicNewestContentNewestContentLeafContent) cannot have dynamic type *TopicNewestContentNewestContentArticle (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2034:7: impossible type switch case: *TopicNewestContentNewestContentVideo
	(*v) (variable of type TopicNewestContentNewestContentLeafContent) cannot have dynamic type *TopicNewestContentNewestContentVideo (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2177:8: cannot use new(UserLastContentLastContentArticle) (value of type *UserLastContentLastContentArticle) as type UserLastContentLastContentLeafContent in assignment:
	*UserLastContentLastContentArticle does not implement UserLastContentLastContentLeafContent (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2180:8: cannot use new(UserLastContentLastContentVideo) (value of type *UserLastContentLastContentVideo) as type UserLastContentLastContentLeafContent in assignment:
	*UserLastContentLastContentVideo does not implement UserLastContentLastContentLeafContent (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2195:7: impossible type switch case: *UserLastContentLastContentArticle
	(*v) (variable of type UserLastContentLastContentLeafContent) cannot have dynamic type *UserLastContentLastContentArticle (missing implementsGraphQLInterfaceSimpleLeafContent method)
/genqlient/generate/testdata/tmp/ComplexNamedFragments.graphql_727791265.go:2203:7: impossible type switch case: *UserLastContentLastContentVideo
	(*v) (variable of type UserLastContentLastContentLeafContent) cannot have dynamic type *UserLastContentLastContentVideo (missing implementsGraphQLInterfaceSimpleLeafContent method)
    /genqlient/generate/generate_test.go:120: generated code does not compile: exit status 2

after fix
https://github.com/Khan/genqlient/pull/310/files#diff-3eaa9f1b68120a67e7558f37dd5984e995a6df5d454656180befca84c2dbf53aR2164

I also took a look at #64 which is the real underlaying issue i wanted to fix but that seems to be extremely complicated and probably needs multiple weeks of work. the nested interface issues came up on a query with union spreading. this PR fixes the problem of spreading when the union is the same fragment, however if the spread contains different fragment we run into #64 .

@zzh8829 zzh8829 marked this pull request as ready for review February 14, 2024 21:36
@zzh8829
Copy link
Contributor Author

zzh8829 commented Feb 14, 2024

this seems affect the covariant test for some reason that might need your expertise

it appears that

func (v *ContentFieldsArticle) implementsGraphQLInterfaceNext()          {}
func (v *ContentFieldsArticle) implementsGraphQLInterfaceRelated()       {}

are extraneous for some unknown reason

but

func (v *CovariantInterfaceImplementationRandomItemContentRelatedVideo) implementsGraphQLInterfaceContentFields() {
}

correctly fixed another generation issue

@zzh8829
Copy link
Contributor Author

zzh8829 commented Feb 14, 2024

this seems affect the covariant test for some reason that might need your expertise

it appears that

func (v *ContentFieldsArticle) implementsGraphQLInterfaceNext()          {}
func (v *ContentFieldsArticle) implementsGraphQLInterfaceRelated()       {}

are extraneous for some unknown reason

but

func (v *CovariantInterfaceImplementationRandomItemContentRelatedVideo) implementsGraphQLInterfaceContentFields() {
}

correctly fixed another generation issue

nvm i figured it out! small issue with embedded type checking

@benjaminjkraft
Copy link
Collaborator

Hmm, I think I sort of understand what's going on here but I'm not sure if this is the right fix. Specifically, it seems a bit sketchy to me to be adding this as we add implementations -- couldn't we get duplicate methods or something? Shouldn't we be writing all implementations with the interface we are writing the implementations for?

I'm wondering if the actual problem is that, for example, TopicNewestContentNewestContentArticle is somehow ending up without a field SimpleLeafContent which would provide the method. Instead, it has only Typename. We can add the method, but using that fragment won't work since the field isn't there. That's what happens elsewhere in the test case, I think -- the added methods should be redundant.

But I may be misunderstanding -- this fragment stuff gets super confusing and it's been a year or two since I last thought it through. It's not a huge problem to add redundant methods if there's a reason, I'm just worried this doesn't actually suffice to fix the problem with this query.

@zzh8829
Copy link
Contributor Author

zzh8829 commented Feb 16, 2024

I think you are right I was mostly following the compile error. the real fix is we need to make TopicNewestContentNewestContentArticle embed SimpleLeafContent and unmarshal it correctly.

a good example of that would be InnerQueryFragmentRandomItemArticle
the difference in implementation is that the previous nested marshalling only works for struct reference, it failed here because the embedded field is a fragment of a union.

@zzh8829
Copy link
Contributor Author

zzh8829 commented Feb 16, 2024

okay i did some digging and found a better solution

  • addType for the fragment SimpleLeafContent is fine
  • convertSelectionSet for the interface TopicNewestContentNewestContentLeafContent is fine
  • convertSelectionSet for the type TopicNewestContentNewestContentArticle is problematic bcause fragmentMatches complains that Article does not match SimpleLeafContent which is technically somewhat correct but not good for our use case.

so I added a special check for union type matching and it seems to solve the root cause

@csilvers
Copy link
Member

I love how simple the new solution is! I'll leave it to @benjaminjkraft to do the actual reviewing, since I don't understand all the subtleties here, but I'm wondering if you want to change the title of this PR given what ended up being the actual problem.

@zzh8829 zzh8829 changed the title fix nested interface implementation fix implementation type generation for fragment on a union Feb 16, 2024
Copy link
Collaborator

@benjaminjkraft benjaminjkraft left a comment

Choose a reason for hiding this comment

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

Ahh, this makes more sense! Seems very natural to match the interface case. Thanks!

@benjaminjkraft benjaminjkraft merged commit c14574a into Khan:main Feb 16, 2024
5 checks passed
dmitryax pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Mar 12, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/Khan/genqlient](https://github.com/Khan/genqlient) |
`v0.6.0` -> `v0.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fKhan%2fgenqlient/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fKhan%2fgenqlient/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fKhan%2fgenqlient/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fKhan%2fgenqlient/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>Khan/genqlient (github.com/Khan/genqlient)</summary>

### [`v0.7.0`](https://github.com/Khan/genqlient/releases/tag/v0.7.0)

[Compare
Source](https://github.com/Khan/genqlient/compare/v0.6.0...v0.7.0)

In addition to several new features and bugfixes, along with this
release comes reorganized
[documentation](https://github.com/Khan/genqlient/blob/main/docs) for
genqlient. Note that genqlient now requires Go 1.20 or higher, and is
tested through Go 1.22.

#### What's Changed

- Add "generic" option to the "optional" configuration for handling
nullable types by
[@&#8203;DylanRJohnston](https://github.com/DylanRJohnston) in
[Khan/genqlient#252
- Documentation tweaks relating to releases by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#271
- Add some better tests for use_struct_references by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#273
- Add an option to handle enums with ugly casing by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#270
- Add some more tests for config validation, and fix some gaps by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#274
- Add consideration for pointer false directive when optional: pointer
configuration option is used by
[@&#8203;spencermurray](https://github.com/spencermurray) in
[Khan/genqlient#280
- Update gqlparser and gqlgen dependencies by
[@&#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#282
- Update gqlparser to omit comments by
[@&#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#284
- bugfix: local variable 'data' colliding with argument name by
[@&#8203;zholti](https://github.com/zholti) in
[Khan/genqlient#291
- Pin lint workflow's Go version by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#311
- Upgrade golangci-lint and which go we run it with by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#314
- fix implementation type generation for fragment on a union by
[@&#8203;zzh8829](https://github.com/zzh8829) in
[Khan/genqlient#310
- Support more valid graphql file extensions by
[@&#8203;zzh8829](https://github.com/zzh8829) in
[Khan/genqlient#309
- Add tests on Go 1.22, and upgrade x/tools to make them work by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#315
- Update gqlgen to latest by
[@&#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#317
- move genqlient Go module to 1.20 by
[@&#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#318
- Improve package-sniffing and bind correctly to types in the same
package by [@&#8203;benjaminjkraft](https://github.com/benjaminjkraft)
in
[Khan/genqlient#316
- Reorganize and improve documentation by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#322
- Fix non-deterministic generated code involving interfaces and
fragments. by [@&#8203;csilvers](https://github.com/csilvers) in
[Khan/genqlient#323
- Release v0.7.0 by
[@&#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#324

#### New Contributors

- [@&#8203;DylanRJohnston](https://github.com/DylanRJohnston) made
their first contribution in
[Khan/genqlient#252
- [@&#8203;spencermurray](https://github.com/spencermurray) made their
first contribution in
[Khan/genqlient#280
- [@&#8203;zholti](https://github.com/zholti) made their first
contribution in
[Khan/genqlient#291
- [@&#8203;zzh8829](https://github.com/zzh8829) made their first
contribution in
[Khan/genqlient#310

**Full Changelog**:
Khan/genqlient@v0.6.0...v0.7.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Andrzej Stencel <astencel@sumologic.com>
DougManton pushed a commit to DougManton/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/Khan/genqlient](https://github.com/Khan/genqlient) |
`v0.6.0` -> `v0.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fKhan%2fgenqlient/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fKhan%2fgenqlient/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fKhan%2fgenqlient/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fKhan%2fgenqlient/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>Khan/genqlient (github.com/Khan/genqlient)</summary>

### [`v0.7.0`](https://github.com/Khan/genqlient/releases/tag/v0.7.0)

[Compare
Source](https://github.com/Khan/genqlient/compare/v0.6.0...v0.7.0)

In addition to several new features and bugfixes, along with this
release comes reorganized
[documentation](https://github.com/Khan/genqlient/blob/main/docs) for
genqlient. Note that genqlient now requires Go 1.20 or higher, and is
tested through Go 1.22.

#### What's Changed

- Add "generic" option to the "optional" configuration for handling
nullable types by
[@&open-telemetry#8203;DylanRJohnston](https://github.com/DylanRJohnston) in
[Khan/genqlient#252
- Documentation tweaks relating to releases by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#271
- Add some better tests for use_struct_references by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#273
- Add an option to handle enums with ugly casing by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#270
- Add some more tests for config validation, and fix some gaps by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#274
- Add consideration for pointer false directive when optional: pointer
configuration option is used by
[@&open-telemetry#8203;spencermurray](https://github.com/spencermurray) in
[Khan/genqlient#280
- Update gqlparser and gqlgen dependencies by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#282
- Update gqlparser to omit comments by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#284
- bugfix: local variable 'data' colliding with argument name by
[@&open-telemetry#8203;zholti](https://github.com/zholti) in
[Khan/genqlient#291
- Pin lint workflow's Go version by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#311
- Upgrade golangci-lint and which go we run it with by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#314
- fix implementation type generation for fragment on a union by
[@&open-telemetry#8203;zzh8829](https://github.com/zzh8829) in
[Khan/genqlient#310
- Support more valid graphql file extensions by
[@&open-telemetry#8203;zzh8829](https://github.com/zzh8829) in
[Khan/genqlient#309
- Add tests on Go 1.22, and upgrade x/tools to make them work by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#315
- Update gqlgen to latest by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#317
- move genqlient Go module to 1.20 by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#318
- Improve package-sniffing and bind correctly to types in the same
package by [@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft)
in
[Khan/genqlient#316
- Reorganize and improve documentation by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#322
- Fix non-deterministic generated code involving interfaces and
fragments. by [@&open-telemetry#8203;csilvers](https://github.com/csilvers) in
[Khan/genqlient#323
- Release v0.7.0 by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#324

#### New Contributors

- [@&open-telemetry#8203;DylanRJohnston](https://github.com/DylanRJohnston) made
their first contribution in
[Khan/genqlient#252
- [@&open-telemetry#8203;spencermurray](https://github.com/spencermurray) made their
first contribution in
[Khan/genqlient#280
- [@&open-telemetry#8203;zholti](https://github.com/zholti) made their first
contribution in
[Khan/genqlient#291
- [@&open-telemetry#8203;zzh8829](https://github.com/zzh8829) made their first
contribution in
[Khan/genqlient#310

**Full Changelog**:
Khan/genqlient@v0.6.0...v0.7.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Andrzej Stencel <astencel@sumologic.com>
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/Khan/genqlient](https://github.com/Khan/genqlient) |
`v0.6.0` -> `v0.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fKhan%2fgenqlient/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fKhan%2fgenqlient/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fKhan%2fgenqlient/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fKhan%2fgenqlient/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>Khan/genqlient (github.com/Khan/genqlient)</summary>

### [`v0.7.0`](https://github.com/Khan/genqlient/releases/tag/v0.7.0)

[Compare
Source](https://github.com/Khan/genqlient/compare/v0.6.0...v0.7.0)

In addition to several new features and bugfixes, along with this
release comes reorganized
[documentation](https://github.com/Khan/genqlient/blob/main/docs) for
genqlient. Note that genqlient now requires Go 1.20 or higher, and is
tested through Go 1.22.

#### What's Changed

- Add "generic" option to the "optional" configuration for handling
nullable types by
[@&open-telemetry#8203;DylanRJohnston](https://github.com/DylanRJohnston) in
[Khan/genqlient#252
- Documentation tweaks relating to releases by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#271
- Add some better tests for use_struct_references by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#273
- Add an option to handle enums with ugly casing by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#270
- Add some more tests for config validation, and fix some gaps by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#274
- Add consideration for pointer false directive when optional: pointer
configuration option is used by
[@&open-telemetry#8203;spencermurray](https://github.com/spencermurray) in
[Khan/genqlient#280
- Update gqlparser and gqlgen dependencies by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#282
- Update gqlparser to omit comments by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#284
- bugfix: local variable 'data' colliding with argument name by
[@&open-telemetry#8203;zholti](https://github.com/zholti) in
[Khan/genqlient#291
- Pin lint workflow's Go version by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#311
- Upgrade golangci-lint and which go we run it with by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#314
- fix implementation type generation for fragment on a union by
[@&open-telemetry#8203;zzh8829](https://github.com/zzh8829) in
[Khan/genqlient#310
- Support more valid graphql file extensions by
[@&open-telemetry#8203;zzh8829](https://github.com/zzh8829) in
[Khan/genqlient#309
- Add tests on Go 1.22, and upgrade x/tools to make them work by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#315
- Update gqlgen to latest by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#317
- move genqlient Go module to 1.20 by
[@&open-telemetry#8203;StevenACoffman](https://github.com/StevenACoffman) in
[Khan/genqlient#318
- Improve package-sniffing and bind correctly to types in the same
package by [@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft)
in
[Khan/genqlient#316
- Reorganize and improve documentation by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#322
- Fix non-deterministic generated code involving interfaces and
fragments. by [@&open-telemetry#8203;csilvers](https://github.com/csilvers) in
[Khan/genqlient#323
- Release v0.7.0 by
[@&open-telemetry#8203;benjaminjkraft](https://github.com/benjaminjkraft) in
[Khan/genqlient#324

#### New Contributors

- [@&open-telemetry#8203;DylanRJohnston](https://github.com/DylanRJohnston) made
their first contribution in
[Khan/genqlient#252
- [@&open-telemetry#8203;spencermurray](https://github.com/spencermurray) made their
first contribution in
[Khan/genqlient#280
- [@&open-telemetry#8203;zholti](https://github.com/zholti) made their first
contribution in
[Khan/genqlient#291
- [@&open-telemetry#8203;zzh8829](https://github.com/zzh8829) made their first
contribution in
[Khan/genqlient#310

**Full Changelog**:
Khan/genqlient@v0.6.0...v0.7.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Andrzej Stencel <astencel@sumologic.com>
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