Iwan Luijks (9)

Pushing GraphQL errors from API Platform to Sentry

By default errors resulting from GraphQL calls done to API Platform don't end up in Sentry. Use the following piece of code and configuration to make sure they will be send to Sentry. namespace MyNamespace; use ApiPlatform\GraphQl\Error\ErrorHandlerInterface; use GraphQL\Error\Error; use Sentry\State\HubInterface; class ErrorHandler implements ErrorHandlerInterface…

Continue reading...

API Platform custom collection filter on identifier

API Platform supports various filters out of the box, like the SearchFilter. The filters though lack support for filtering on an entity's id when using another property as the identifier of the entity. Given you have for example the field ext_ref marked as identifier of the…

Continue reading...