Skip to content

Varnish with GraphQl #2208

@CvekCoding

Description

@CvekCoding

Good morning.

I found that in a case of GraphQl request Api-Platform doesn't add http headers (even if it's a GET request):

public function onKernelResponse(FilterResponseEvent $event)
{
$request = $event->getRequest();
if (!$request->isMethodCacheable() || !RequestAttributesExtractor::extractAttributes($request)) {
return;
}

It's because the second check RequestAttributesExtractor::extractAttributes($request) returns empty array. Am I doing something wrong or it's a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions