Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check eventHandler defined in subgraph.yaml exists in compiled wasm #1475

Closed
KholdStare opened this issue Oct 11, 2023 · 0 comments · Fixed by #1535
Closed

Check eventHandler defined in subgraph.yaml exists in compiled wasm #1475

KholdStare opened this issue Oct 11, 2023 · 0 comments · Fixed by #1535
Labels
area/cli enhancement New feature or request

Comments

@KholdStare
Copy link

KholdStare commented Oct 11, 2023

Which packages are impacted by your issue?

@graphprotocol/graph-cli

Describe the issue

Currently it is possible to mention a non-existent function as the handler for an event in the manifest. graph build will run fine, but running the actual subgraph will break at runtime, the first time the event fires that needs to call that handler.

The build step should check if the ts file or wasm have the function defined.

Reproduction

NA

Steps to Reproduce the Bug or Issue

  1. Create a manifest that handles an event but does not have the handler defined.
  2. Deploy it and have the subgraph break with an error

Expected behavior

The build command should catch cases where the hander is missing.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • NodeJS: 18.17.1
  • "@graphprotocol/graph-cli": "^0.59.0"

Subgraph Manifest

No response

Subgraph GraphQL Schema

No response

Additional context

No response

@KholdStare KholdStare added the bug Something isn't working label Oct 11, 2023
@saihaj saihaj added enhancement New feature or request area/cli and removed bug Something isn't working labels Oct 11, 2023
@saihaj saihaj added this to Tooling Oct 12, 2023
@saihaj saihaj moved this to 🆕 New in Tooling Oct 12, 2023
@theguild-bot theguild-bot mentioned this issue Oct 31, 2023
26 tasks
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Tooling Dec 8, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
@theguild-bot theguild-bot mentioned this issue Oct 15, 2024
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants