Skip to content

Sorting & filtering dynamic / extended resources #139

@joepio

Description

@joepio

When using generated data, such as auditing data #95 (e.g. created-at or created-by) or collections #36 (members and total-pages), we can't filter or sort by these properties at the moment.

This is because these properties are only calculated when running get_resource_extended, which can be way more expensive than running get_resource (which simply returns the existing data in the store).

Some solutions:

Overwrite a resource, set its dynamic properties when _extended is called (caching in resource)

If we save the generated properties on running get_resource_extended, we could use these again when running get_resource.

  • Performant and cheap
  • Uses outdated information (and it is not known how much outdated it is)
  • Will not be OK for all endpoints, such as endpoints.
  • Be careful when parsing query parameters.
  • Can we always cache Endpoints without any query paramters? Maybe? Would make things simpler!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions