Skip to content

Comments

Add list collections query to GraphQL#1782

Merged
shangyian merged 3 commits intoDataJunction:mainfrom
shangyian:collections-gql
Feb 23, 2026
Merged

Add list collections query to GraphQL#1782
shangyian merged 3 commits intoDataJunction:mainfrom
shangyian:collections-gql

Conversation

@shangyian
Copy link
Collaborator

@shangyian shangyian commented Feb 23, 2026

Summary

This PR adds a listCollections GraphQL query and enables searching collections by fragment as well as by the user who created it. It implements several optimizations, including eager loading for user data, SQL subqueries for node counts, and DataLoader-based batching for node loading.

Example:

{
  listCollections(fragment: "repair", createdBy: "dj") {
    name
    description
    nodeCount
  }
}

Test Plan

Added this new test suite:

uv pytest tests/api/graphql/collections_test.py -v
  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@netlify
Copy link

netlify bot commented Feb 23, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit fcc8926
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/699c3075ac9b2c0008800b6a

@shangyian shangyian marked this pull request as ready for review February 23, 2026 10:54
@shangyian shangyian merged commit 0a5ea10 into DataJunction:main Feb 23, 2026
17 checks passed
@shangyian shangyian deleted the collections-gql branch February 23, 2026 11:12
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

Successfully merging this pull request may close these issues.

1 participant