core icon indicating copy to clipboard operation
core copied to clipboard

Make RequestDataCollector work when using GraphQl

Open velreine opened this issue 3 years ago • 1 comments

Description

It would be nice if the "API Platform" pane in the WebProfiler worked properly when using GraphQl and not only REST.

The only thing that is required for this to work is to resolve the $resourceClass, this is grabbed from the request object like so: "$request->attributes->get('_api_resource_class')

I don't know if it's easy to do this with GraphQl but it would be a nice addition.

Example

velreine avatar Jul 14 '22 08:07 velreine

Hello I'm working on this one

There is a bit more work than just grab the resource class because we can request many different resource into a single graphql query.

I'm not using myself the graphql component but feel free to list information you want to have inside the profiler about a graphql request and I will try to add as many as possible.

ArnoudThibaut avatar Sep 16 '22 17:09 ArnoudThibaut