graphprotocol / graphprotocol/hypergraph

Create an entity to publish without requiring the hypergraph provider

Open
#492 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
22
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Often we just want to create an entity then publish it without integrating with the reactivity of the hypergraph store. Currently when using the hooks we require writing to a private space with a hypergraph space provider.

We could have something like

export class Todo extends Entity.Class<Todo>("Todo")({
   name: Type.String,
   description: Type.String,
})

const newTodo = Todo.create({ name: "X", description: "Y" })
await publishToPublicSpace({ entity: newTodo, spaceId: "Z" })

// Alternatively something like this
await publishToPublicSpace(Todo, { entity: { name: "X", description: "Y" }, spaceId: "Z" })

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names Entity.Class, Todo.create, hooks, the hypergraph space provider, and a proposed publishToPublicSpace entry point. Start by tracing the current provider-based entity creation and publishing flow. Done means an agreed API supports creating and publishing an entity without requiring the hypergraph provider, with tests covering the proposed usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.