Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering activities #3925

Closed
dmtrjsg opened this issue Jun 20, 2022 · 2 comments
Closed

Filtering activities #3925

dmtrjsg opened this issue Jun 20, 2022 · 2 comments

Comments

@dmtrjsg
Copy link

dmtrjsg commented Jun 20, 2022

⚠️ This one is superceded by

@thesan commented on Wed May 11 2022

Currently the queries used to show activities, looks like this:

query {
  events(where: { type_in: [EventA, EventB] }, ...) { ... }
}

In this example EventA relate to EntityA and EventB to EntityB as a result this wouldn't work:

query {
  events(where: { type_in: [EventA, EventB], EntityA: { id_in: ["1","2"], active_eq: true } }, ...) { ... }
}

Solution 1:

Adding some generic fields to the event interface. Eg:

query {
  events(where: { type_in: [EventA, EventB], entity_id_in: ["EntityA_1","EntityA_2","EntityB_3"], hasExpired: false }, ...) { ... }
}

This would probably also help filtering deadlines and statistics in the financial dashboard.

That said it would take some significant effort updating the mappings and it doesn't solves the filtering by member problem, unless the entity_ids get stored somewhere (local storage, membership metadata, or Orion) when e.g creating entities or subscribing to it. Similarly to #414.

Solution 2:

Writing custom queries for every activity.


@dmtrjsg commented on Mon Jun 06 2022

Question: is there anything else impacted other than Financials module?

@dmtrjsg
Copy link
Author

dmtrjsg commented Aug 9, 2022

@thesan to add the basic idea of storing the eventIds on the local storage.

@dmtrjsg
Copy link
Author

dmtrjsg commented Aug 9, 2022

@dmtrjsg dmtrjsg closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants