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

Add YAML parsing support to mappings #1935

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

isum
Copy link
Member

@isum isum commented Jan 31, 2025

This PR adds type definitions for two host functions that parse YAML documents and defines some helper methods to make working with YAML types nicer.

The main use case for this feature is to parse subgrah manifests, but it is flexible enough to allow parsing any YAML document.

Part of graphprotocol/graph-node#5772
Host functions are implemented in graphprotocol/graph-node#5785

Tests

I have created and deployed a subgraph to a local graph-node with changes from graphprotocol/graph-node#5785 and tested all new features/methods from this PR.

@isum isum self-assigned this Jan 31, 2025
Copy link

changeset-bot bot commented Jan 31, 2025

🦋 Changeset detected

Latest commit: 46c291a

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-ts Minor

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

Copy link
Contributor

github-actions bot commented Jan 31, 2025

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphprotocol/graph-cli 0.96.0-alpha-20250131191223-12864a462732b1ab78e9aea4a87fb8b4ed5899ad npm ↗︎ unpkg ↗︎
@graphprotocol/graph-ts 0.38.0-alpha-20250131191223-12864a462732b1ab78e9aea4a87fb8b4ed5899ad npm ↗︎ unpkg ↗︎

@isum isum force-pushed the ion/add-yaml-support branch from 59f799f to 564b43c Compare January 31, 2025 18:54
Copy link

cloudflare-workers-and-pages bot commented Jan 31, 2025

Deploying graph-tooling with  Cloudflare Pages  Cloudflare Pages

Latest commit: 12864a4
Status: ✅  Deploy successful!
Preview URL: https://435e564d.graph-tooling.pages.dev
Branch Preview URL: https://ion-add-yaml-support.graph-tooling.pages.dev

View logs

@isum isum force-pushed the ion/add-yaml-support branch from 564b43c to 46c291a Compare January 31, 2025 19:00
@isum isum force-pushed the ion/add-yaml-support branch from 46c291a to 12864a4 Compare January 31, 2025 19:11
@isum isum marked this pull request as ready for review January 31, 2025 19:23
@YaroShkvorets
Copy link
Collaborator

Thanks for the PR. Can you add some unit tests in packages/ts/test/yaml.ts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants