feat(browser): Add `graphqlClientIntegration`
Resolves #13399
Todo:
- [x] ~~Support
fetchspans 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).
- [x] ~~Todo: fix failing fetch tests by removing body from non-graphql requests~~
Just wanted to inform about the failing tests:
- size limit exceeded by 3 bytes! (CDN Bundle (incl. Tracing, Replay))
- all the playwright tests related to bundle (e.g., bundle_min, bundle_replay) have been failing with a timeout
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
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!
Looking great! Only things left IMHO:
- move
getBodyString,FetchHint&XhrHintto browser-utils - rebase and resolve conflicts
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
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!
all resolved now!