graph-tooling icon indicating copy to clipboard operation
graph-tooling copied to clipboard

store.remove doesn't support bytes ids.

Open spacecaterpillar opened this issue 9 months ago • 0 comments

Which packages are impacted by your issue?

@graphprotocol/graph-ts

Describe the issue

Here's the declared function:

  function remove(entity: string, id: string): void;

Typescript won't compile if you pass in a Bytes for the id when your table has Bytes for an id field.

Reproduction

None

Steps to Reproduce the Bug or Issue

  1. Define an entity whose id has type Bytes
  2. Try to remove such an entity using store.remove('EntityName', entity.id)

Expected behavior

It should be possible to remove entities from the table when they have Bytes for an id, especially since this is now recommended.

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • NodeJS: [e.g. 18.5.0]
  • @graphprotocol/* version(s): [e.g. 2.6.2]

Subgraph Manifest

No response

Subgraph GraphQL Schema

No response

Additional context

No response

spacecaterpillar avatar Mar 17 '25 15:03 spacecaterpillar