Skip to content

query name in public use space - #288

Merged
nikgraf merged 1 commit into
mainfrom
ng/query-name-in-public-use-space
Jun 30, 2025
Merged

query name in public use space#288
nikgraf merged 1 commit into
mainfrom
ng/query-name-in-public-use-space

Conversation

@nikgraf

@nikgraf nikgraf commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@nikgraf
nikgraf force-pushed the ng/query-name-in-public-use-space branch from 622add9 to 2f6ebe4 Compare June 30, 2025 18:48
@nikgraf
nikgraf requested a review from Copilot June 30, 2025 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new hook, usePublicSpace, to query the space name via GraphQL for public spaces and integrates it into the existing space context. Key changes include:

  • Adding the usePublicSpace hook in packages/hypergraph-react/src/internal/use-public-space.tsx.
  • Updating HypergraphSpaceContext to conditionally use the public space query when in public mode.
  • Refactoring the Playground route and component to pass a space ID variable and leverage the updated context.

Reviewed Changes

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

File Description
packages/hypergraph-react/src/internal/use-public-space.tsx New hook for querying public space data
packages/hypergraph-react/src/HypergraphSpaceContext.tsx Updated context hook to use usePublicSpace for public mode
apps/events/src/routes/playground.lazy.tsx Refactored to use a variable for space IDs
apps/events/src/components/playground.tsx Adjusted to use the updated space context
Comments suppressed due to low confidence (1)

packages/hypergraph-react/src/internal/use-public-space.tsx:24

  • [nitpick] Consider renaming 'result' to 'queryResult' to better indicate that this variable holds the result of the useQuery call, thereby improving code clarity.
  const result = useQuery({

@nikgraf
nikgraf merged commit 3e80547 into main Jun 30, 2025
6 checks passed
@nikgraf
nikgraf deleted the ng/query-name-in-public-use-space branch June 30, 2025 18:53
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