Filtering after results fetched #5148
Replies: 4 comments
-
I think as a solution for my example above I can create |
Beta Was this translation helpful? Give feedback.
-
I think your problem is specific to GraphQL, as when using REST it's easy to do in the controller action / custom listener / etc. /me waits for the GraphQL experts to help you. |
Beta Was this translation helpful? Give feedback.
-
I solved the problem through the custom
The cons is that I return just an array, so I dont have paginator features at my result. |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
-
Hello.
I would to be able to filter collection after receiving it from persistence layer.
Example (everything below is about
GraphQl
).Parent class (just an owner of collection):
Child abstract class:
Inheritance classes:
if then I launch query it doesnt work:
Due to the fact that both
calculatedData
andpersistedData
fields are presented in final classes but not inAbstractItem
, I cant use built-inAbstractFilter
onAbstractItem
for several reasons:AbstractItem
.If Im right and there is no a proper way to filter/order by these fields (correct me please if Im wrong), I would like to propose to add feature - allow to process query results after receiving them from persistence layer and before further processing. I think here:
core/src/Bridge/Symfony/Bundle/DataProvider/TraceableChainCollectionDataProvider.php
Line 73 in 125dec9
Beta Was this translation helpful? Give feedback.
All reactions