Open bkosun opened 1 year ago
can you try API Platform 3.2 ?
This issue affects versions 3.1 and 3.2. I have not tested earlier versions.
Unfortunately, there is not enough time right now to fully understand this issue, so I decided to create this bug report
I just tested the newest version v3.2.0-beta.1 - the bug is still present
API Platform version(s) affected: 3.1, 3.2
Description
GraphQL Query operation ignores custom ItemProvider if resource does not have Http Get operation
src/Entity/Account.php
src/State/AccountItemProvider.php
For example, I have an entry with ID
018a7bb5-4215-7363-82cf-b54c804c138e
and a propertycredentials
that contains the following data:GraphQL query:
The result will be as follows:
However, if you remove the HTTP Get operation attribute, the
ApiPlatform\Doctrine\Orm\State\ItemProvider
provider will be used instead ofApp\State\AccountProvider
, resulting in the following result:How to reproduce
Implement your own ItemProvider and configure a GraphQL Query operation without an Http Get operation
Possible Solution
...
Additional Context
Perhaps I have to use QueryItemRessolver?
This works, but, note that there is no similar problem if I use the GraphQL QueryCollection operation with custom CollectionProvider without the HTTP GetCollection operation