Skip to content

Validate non-file manifest fields with file data sources#2141

Open
DeepCogNeural wants to merge 2 commits into
graphprotocol:mainfrom
DeepCogNeural:codex/validate-manifest-with-file-data-sources
Open

Validate non-file manifest fields with file data sources#2141
DeepCogNeural wants to merge 2 commits into
graphprotocol:mainfrom
DeepCogNeural:codex/validate-manifest-with-file-data-sources

Conversation

@DeepCogNeural

Copy link
Copy Markdown

Fixes #2045

Summary

  • keep manifest schema validation active for regular data sources/templates when file data sources are present
  • omit only file data sources/templates from the schema-validation copy until file data source validation is implemented
  • add a regression fixture where a file/ipfs template no longer hides a numeric network value in a regular Ethereum data source

Tests

  • npx pnpm@9.15.9 --filter @graphprotocol/graph-cli exec vitest run tests/cli/validation.test.ts -t "File data source does not skip regular manifest validation" -u
  • npx pnpm@9.15.9 --filter @graphprotocol/graph-cli test:validation
  • npx pnpm@9.15.9 --filter @graphprotocol/graph-cli build
  • ../../packages/cli/bin/run.js codegen --skip-migrations in examples/matic-lens-protocol-posts-subgraph
  • npx pnpm@9.15.9 exec prettier --check packages/cli/src/subgraph.ts packages/cli/tests/cli/validation.test.ts packages/cli/tests/cli/validation/file-data-source-invalid-manifest/subgraph.yaml packages/cli/tests/cli/validation/file-data-source-invalid-manifest/schema.graphql packages/cli/tests/cli/validation/file-data-source-invalid-manifest/Abi.json
  • git diff --check

Note: npx pnpm@9.15.9 --filter @graphprotocol/graph-cli type-check currently fails on existing generated imports under tests/cli/add/subgraph/src/mapping.ts; this PR does not touch that fixture.

@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f231e1c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error "integer expected a string" should be caught at build time not deploy time

1 participant