Limitations on pagination & filtering #126
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Filtering can be done either in the Frontend or the Backend, the issue that you mention happens when the filtering is done on the Frontend. At the moment the filtering capabilities of the We are thinking on how we could extend the filtering capabilities. One alternative could be to use a query DSL that works with query parameters, another could be to create a GraphQL service, but we need more feedback from different use cases to come up with the proper solution. In any case, the Marlowe Web Runtime is a useful service that some Dapps can use as its sole backend, but it is impossible to cover all use cases. For complex Dapps it is recommended to create a backend infrastructure (that can use different components of the runtime) that uses the BFF (backend for frontend) pattern. You can also make a pure frontend solution, but you need to keep some state and depending on how many elements you discard, you might suffer from latency. The basic idea here would be to ask for elements, filter the ones that doesn't match, and ask for the next range to fill in the previous page. |
Beta Was this translation helpful? Give feedback.
Filtering can be done either in the Frontend or the Backend, the issue that you mention happens when the filtering is done on the Frontend.
At the moment the filtering capabilities of the
getContracts
method are quite limited. For example, when you provide multiple tags, the filter behaviour is to see if a contract hastag A
ORtag B
. If you want to do AND logic instead, for the moment you need to pass both tags and do additional filtering in the front.We are thinking on how we could extend the filtering capabilities. One alternative could be to use a query DSL that works with query parameters, another could be to create a GraphQL service, but we need more feedback from different use cas…