sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

feat(browser): Add `graphqlClientIntegration`

Open Zen-cronic opened this issue 1 year ago • 2 comments

Resolves #13399

Todo:

  • [x] ~~Support fetch spans and tests~~
  • [x] ~~Support shorthand graphql queries (i.e., without a name)~~ Moved to later
  • [x] ~~Enhance breadcrumb data~~

  • [x] If you've added code that should be tested, please add tests.
  • [x] Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

Zen-cronic avatar Sep 25 '24 02:09 Zen-cronic

  • [x] ~~Todo: fix failing fetch tests by removing body from non-graphql requests~~

Zen-cronic avatar Sep 26 '24 16:09 Zen-cronic

Just wanted to inform about the failing tests:

Zen-cronic avatar Oct 18 '24 00:10 Zen-cronic

noted, i'll implement the feedback. thanks for the comprehensive review!

  • [x] update span hook
  • [x] update breadcrumb hook
  • [x] resolve rebase conflicts

will move on with the conflicts if the current implementation checks out

Zen-cronic avatar Dec 20 '24 03:12 Zen-cronic

I looked over it again, apart from some rebase stuff that is sadly going to have to happen 😬 (e.g. the client type is now gone and just part of core/client now, @sentry/types is gone and types should just be imported from @sentry/core now, ...), overall I want to stress that this is a really cool PR!

This: https://github.com/getsentry/sentry-javascript/pull/13783/files#r1913443495 is the main thing left to do IMHO - if you need more help/pointers please let us know!

mydea avatar Jan 13 '25 16:01 mydea

Looking great! Only things left IMHO:

  • move getBodyString, FetchHint & XhrHint to browser-utils
  • rebase and resolve conflicts

mydea avatar Jan 20 '25 11:01 mydea

i'm not sure what's making the webkit tests flaky for the added integration tests; locally they all pass on consecutive runs via yarn test --project='webkit' graphQLClient

Zen-cronic avatar Jan 29 '25 21:01 Zen-cronic

I can't push changes on your branch, so I opened a PR here: https://github.com/Zen-cronic/sentry-javascript/pull/1 which should fix the remaining CI issues on your branch!

mydea avatar Feb 05 '25 08:02 mydea

all resolved now!

Zen-cronic avatar Feb 06 '25 14:02 Zen-cronic