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

epic(filter): filter by created_at and updated_at #471

Open
MR2011 opened this issue Feb 4, 2025 · 0 comments
Open

epic(filter): filter by created_at and updated_at #471

MR2011 opened this issue Feb 4, 2025 · 0 comments

Comments

@MR2011
Copy link
Collaborator

MR2011 commented Feb 4, 2025

Each entity has the two timestamps:

  • updated_at
  • created_at

Allow filtering by these timestamps via API. The filtering should allow to filter for a range by using a start and end date.

  enum DateField {
    createdAt
    updatedAt
    deletedAT
  }

  input DateFilter {
    field: DateField!
    startDate: String
    endDate: String
  }

Example Steps for Service:

  1. Add both filters to the ServiceFilter in internal/entity/service.go
  2. Update database layer (internal/database/mariadb/service.go)
    2.1 update ensureServiceFilter()
    2.2 update getServiceFilterString()
    2.3 update buildServiceFilterParameters()
    2.4 add tests for GetServices() with the new filter options
  3. Update api layer:
    3.1 Update ServiceFilterInput in api/graphql/graph/schema/service.graphqls
    3.2 Generate new implementation with gqlgen
    3.3 Set filter in ServiceBaseResolver in internal/api/graphql/graph/baseResolver/service.go

Entities to consider:

  • Activity
  • Component
  • ComponentVersion
  • ComponentInstance
  • Evidence
  • Issue
  • IssueMatch
  • IssueVariant
  • IssueRepository
  • Service
  • SupportGroup
  • User
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants