query name in public use space - #288
Merged
Merged
Conversation
nikgraf
force-pushed
the
ng/query-name-in-public-use-space
branch
from
June 30, 2025 18:48
622add9 to
2f6ebe4
Compare
Contributor
There was a problem hiding this comment.
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({
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.