Skip to content

Conversation

@nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Oct 23, 2025

Example code how to try it out:

  useEffect(() => {
    const fetchProjects = async () => {
      const { data } = await Entity.searchManyPublic(Project, {
        query: searchTerm,
        space: '3f32353d-3b27-4a13-b71a-746f06e1f7db',
        first: 100,
      });
      console.log('WOW', searchTerm, { data });
    };
    fetchProjects();
  }, [searchTerm]);

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new Entity.searchManyPublic function to support searching entities with GraphQL queries. The implementation provides search functionality with support for nested relations up to 2 levels deep and includes filtering capabilities.

Key Changes:

  • Added searchManyPublic function with support for multi-level entity relationships
  • Exported the new search function from the entity module
  • Demonstrated usage in the projects template component

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/hypergraph/src/entity/search-many-public.ts Implements the core search functionality with GraphQL queries for 0, 1, and 2 levels of nested relations
packages/hypergraph/src/entity/index.ts Exports the new search function from the entity module
apps/template-vite-react/src/routes/explore-public-knowledge/projects.tsx Adds example usage of the new search function with useEffect hook
.changeset/neat-tires-tie.md Documents the change for the changelog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nikgraf nikgraf merged commit a4898c4 into main Oct 23, 2025
6 checks passed
@nikgraf nikgraf deleted the ng/add-search branch October 23, 2025 13:26
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