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

Migrate entity detail pages from Algolia to direct GraphQL queries #751

Open
abhayymishraa opened this issue Feb 4, 2025 · 0 comments · May be fixed by #758
Open

Migrate entity detail pages from Algolia to direct GraphQL queries #751

abhayymishraa opened this issue Feb 4, 2025 · 0 comments · May be fixed by #758
Assignees

Comments

@abhayymishraa
Copy link
Collaborator

abhayymishraa commented Feb 4, 2025

Problem Statement
Currently, we're using Algolia for both entity list pages (search/ranking/sorting) and entity detail pages. However, for detail pages, we can optimize by fetching data directly from the database via GraphQL instead of hitting Algolia.

Scope
Pages to migrate:

  • Project details page
  • Chapter details page
  • Committee details page
  • User details page

List pages will continue using Algolia for search functionality.

Current Implementation

  • All entity data is being fetched from Algolia
  • Detail pages don't require Algolia's search/ranking features
  • Unnecessary Algolia API calls for direct lookups

Proposed Changes

  1. Create GraphQL queries for each entity type:

  2. Modify detail page components to use GraphQL instead of Algolia:

    • Replace Algolia hooks with GraphQL queries
    • Ensure all necessary data is available via GraphQL
    • Update loading states and error handling
  3. Modify the incoming data from the graphql to adapt pages

  4. Entity types to update:

    • Projects
    • Chapters
    • Committees
    • Users

Required Chnages

  • frontend
  • backend
  • (tests)

Benefits

  • Reduced Algolia API usage
  • More direct and efficient data fetching
  • Lower latency for detail pages
  • Reduced costs (fewer Algolia operations)
@github-project-automation github-project-automation bot moved this to Backlog in Project Nest Feb 4, 2025
@arkid15r arkid15r moved this from Backlog to In progress in Project Nest Feb 4, 2025
@abhayymishraa abhayymishraa linked a pull request Feb 6, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants