Skip to content

RUM-13564 Add GraphQL errors support for cross-platform SDKs#3201

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits intodevelopfrom
bplasovska/RUM-13564/graphql-errors
Mar 2, 2026
Merged

RUM-13564 Add GraphQL errors support for cross-platform SDKs#3201
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits intodevelopfrom
bplasovska/RUM-13564/graphql-errors

Conversation

@barboraplasovska
Copy link
Contributor

@barboraplasovska barboraplasovska commented Feb 25, 2026

What and why?

This PR adds support for the _dd.graphql.errors attribute on Android so that cross-platform SDKs (React Native, Flutter) can report GraphQL errors on both platforms.

@datadog-official

This comment has been minimized.

@barboraplasovska barboraplasovska marked this pull request as ready for review February 27, 2026 11:03
@barboraplasovska barboraplasovska requested review from a team as code owners February 27, 2026 11:03
cdn34dd
cdn34dd previously approved these changes Feb 27, 2026
Co-authored-by: Nikita Ogorodnikov <4046447+0xnm@users.noreply.github.com>
0xnm
0xnm previously approved these changes Feb 27, 2026
Comment on lines +3523 to +3533
val graphql = firstValue.resource.graphql
checkNotNull(graphql)
assertThat(graphql.errorCount).isEqualTo(1L)
assertThat(graphql.errors).hasSize(1)
val error = checkNotNull(graphql.errors?.first())
assertThat(error.message).isEqualTo("field not found")
assertThat(error.code).isEqualTo("VALIDATION_ERROR")
assertThat(error.locations).hasSize(1)
assertThat(error.line).isEqualTo(2L)
assertThat(error.column).isEqualTo(3L)
assertThat(error.path).hasSize(2)
Copy link
Member

Choose a reason for hiding this comment

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

can you please update all the tests below with a similar change? they are still relying heavily on !!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done !

0xnm
0xnm previously approved these changes Feb 27, 2026
Comment on lines +3602 to +3603
assertThat(graphql).isNotNull
assertThat(graphql!!.errorCount).isNull()
Copy link
Member

Choose a reason for hiding this comment

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

nit: seems like here and in the tests below there is still !!

cdn34dd
cdn34dd previously approved these changes Mar 2, 2026
@barboraplasovska barboraplasovska dismissed stale reviews from cdn34dd and 0xnm via d4c59c8 March 2, 2026 09:49
0xnm
0xnm previously approved these changes Mar 2, 2026
ambushwork
ambushwork previously approved these changes Mar 2, 2026
@barboraplasovska barboraplasovska force-pushed the bplasovska/RUM-13564/graphql-errors branch from 3e53482 to acb07a4 Compare March 2, 2026 12:46
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.36%. Comparing base (18b420c) to head (acb07a4).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
...roid/rum/internal/domain/scope/RumResourceScope.kt 94.44% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3201      +/-   ##
===========================================
- Coverage    71.46%   71.36%   -0.10%     
===========================================
  Files          928      928              
  Lines        34444    34460      +16     
  Branches      5812     5815       +3     
===========================================
- Hits         24613    24589      -24     
- Misses        8224     8238      +14     
- Partials      1607     1633      +26     
Files with missing lines Coverage Δ
...roid/rum/internal/domain/scope/RumResourceScope.kt 91.60% <94.44%> (+0.10%) ⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants