Skip to content

store.remove doesn't support bytes ids. #1987

Open
@spacecaterpillar

Description

@spacecaterpillar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions