Skip to content

Conversation

utay
Copy link

@utay utay commented Jul 11, 2025

I caught this by using the @stream directive with graphql-ruby and got a NPE on query.selected_operation.operation_type.

Since graphql-ruby 2.5.6, GraphQL::Query::Partial was added for running sub-trees of valid queries. The query argument of execute_query might be a GraphQL::Query::Partial in which case we don't have direct access to the operation type and the query string; I thought in this case it would be nice to see the query path

Copy link

linux-foundation-easycla bot commented Jul 11, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@utay utay force-pushed the graphql-query-partial branch from 1251a67 to ce02bb9 Compare July 11, 2025 12:30
@utay utay force-pushed the graphql-query-partial branch from ce02bb9 to 2e16b4a Compare July 11, 2025 12:32
@arielvalentin
Copy link
Contributor

Cc @rmosolgo

Copy link
Contributor

@rmosolgo rmosolgo left a comment

Choose a reason for hiding this comment

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

LGTM, just needs some support for versions where Query::Partial isn't defined.

@utay utay force-pushed the graphql-query-partial branch from 43bf42f to d78a028 Compare July 16, 2025 11:29
@arielvalentin
Copy link
Contributor

Part of our expectations for accepting pull requests is adding automated tests that prevent future regressions.

Please add some test coverage for these changes.

https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/CONTRIBUTING.md#write-comprehensive-automated-tests

Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions github-actions bot added the stale Marks an issue/PR stale label Aug 16, 2025
@kaylareopelle kaylareopelle removed the stale Marks an issue/PR stale label Aug 18, 2025
@kaylareopelle
Copy link
Contributor

Hi @utay! Could you add some test coverage for this change like @arielvalentin mentioned above?

Part of our expectations for accepting pull requests is adding automated tests that prevent future regressions.

Please add some test coverage for these changes.

https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/CONTRIBUTING.md#write-comprehensive-automated-tests

Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions github-actions bot added the stale Marks an issue/PR stale label Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Marks an issue/PR stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants