Skip to content

Conversation

@baiirun
Copy link
Contributor

@baiirun baiirun commented Jan 26, 2026

Summary

  • Updates findManyPublic to use the new native spaceId, spaceIds, and typeIds filters added in geobrowser/gaia#293
  • These native filters use indexed EXISTS subqueries instead of computed functions that ran O(n) subqueries per row
  • entitiesOrderedByProperty query still uses the old approach since it doesn't yet support native typeIds filter

Changes

For the regular entities query:

  • spaceId: $spaceId as a top-level argument (single space)
  • spaceIds: {in: $spaceIds} as a top-level argument (multi-space)
  • typeIds: {in: $typeIds} as a top-level argument (replaces relation-based filter)

…ities query

The gaia API (geobrowser/gaia#293) added efficient native filters for the
entities query: spaceId, spaceIds, typeId, and typeIds. These use indexed
EXISTS subqueries instead of the previous approach which ran 2 subqueries
per row causing O(n) overhead.

This change updates findManyPublic to use the new native filters:
- spaceId/spaceIds as top-level query arguments instead of inside filter
- typeIds as a top-level argument instead of relation-based filtering

The entitiesOrderedByProperty query still uses the old approach since it
doesn't yet support the native typeIds filter.
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.

2 participants