apiplatform (4)

API Platform (website https://api-platform.com/)

Iwan Luijks

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...
Iwan Luijks

Installed API Platform 2.7 and resources not found?

When installing API Platform using Composer with composer req api for example and you get version 2.7 installed make sure that when following the documentation of API Platform (having ApiPlatform\Metadata\ApiResource as attribute) you also put the directive metadata_backward_compatibility_layer: false under api_platform in api/config/packages/api_platform.yaml otherwise your resources won't be…

Continue reading...