php-debugbar
php-debugbar copied to clipboard
Fetch support
Any plans to support fetch
in addition to xhr
?
I don't see a way to hook php-debugbar up to Apollo currently, whilst it works just fine with Axios, is lack of fetch support the reason? I came across the docs for manual integration but it seems to be xhr
specific and throwing fetch
as it doesn't go so well.
Would be great to hook this up to Apollo-based SPA's so I can see the horrendous number of database queries being ran easier 🙃
I think this is what we do now: https://github.com/maximebf/php-debugbar/blob/2a95c20da4c6965114e5773f3aaf974e12f9c92b/src/DebugBar/Resources/debugbar.js#L1151-L1169
And this is how Symfony does it, which supports fetch: https://github.com/symfony/symfony/blob/7788612c3cb63cc44b2cabb4644a7fbd75c61e97/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig#L279-L331
So I think we should be able to support fetch also. Do you want to make a PR for that?
@barryvdh yep, done, please check out #422 🤘
I think this issue can be closed, right?
I think this issue can be closed, right?
Yes, must be closed