Category: api-platform.com

API platform Boolean filter default value

I registered kind of boolean filter for my ressource: app.my_dummy_resource.boolean_filter: parent: ‘api_platform.doctrine.orm.boolean_filter’ arguments: [ { ‘dummyBoolean’: true} ] tags: [ { name: ‘api_platform.filter’, id: ‘my_dummy.boolean’ } ] By default, false is the value of my filter when I call my…

Symfony : uploading file, working from Postman, not from Javascript nor cURL

I’m trying to make a request from a Javascript file to an upload file route made with Symfony and API Platform. REQUESTS : With Postman, using the file input under form-data and using the GUI, the upload works (201 response)….

Create nested doctine objects with one GraphQl query with API Platform

I have a basic Entity in my symfony application: /** * @ApiResource() * @ORMEntity(repositoryClass=CardRepository::class) */ class Card { /** * @ORMId() * @ORMGeneratedValue() * @ORMColumn(type=”integer”) */ private $id; /** * @ORMOneToMany(targetEntity=CardReference::class, mappedBy=”card”, orphanRemoval=true) */ private $cardReferences; /** * @ORMColumn(type=”string”, length=255,…

API Platform Serialization issue for custom Output

I have created this resource in order to request a password reset token: POST {{api_base_url}}/users/password/reset-request Payload example { “email” :”[email protected]” } Everything works fine but the response doesn’t serialize ResetPasswordRequestOutput to show the result. I got this response instead (as…

api platform: Error (null) Backend fetch failed

We use symfony with the platform api in docker and we have a problem with varnish. For local development varnish works with the default.vcl configuration file (https://github.com/api-platform/api-platform/blob/master/api/docker/varnish/conf/default.vcl). When uploading to the server, varnish provides the error “Error (null) Backend fetch…