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

fix: loading interfaces for derived loaders #1457

Merged
merged 5 commits into from
Sep 28, 2023
Merged

Conversation

saihaj
Copy link
Member

@saihaj saihaj commented Sep 18, 2023

we don't support interfaces as loaders in graph-node so we should not be generating any derived loader for interfaces

closes #1449

@changeset-bot
Copy link

changeset-bot bot commented Sep 18, 2023

🦋 Changeset detected

Latest commit: f349bfd

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

This PR includes changesets to release 2 packages
Name Type
@graphprotocol/graph-cli Minor
lens-protocol-posts-sg 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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 18, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f349bfd
Status: ✅  Deploy successful!
Preview URL: https://a0e77b1d.graph-tooling.pages.dev
Branch Preview URL: https://saihaj-patch-interface-loade.graph-tooling.pages.dev

View logs

@saihaj saihaj marked this pull request as ready for review September 28, 2023 13:52
@github-actions
Copy link
Contributor

🚀 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.59.0-alpha-20230928143131-f349bfd npm ↗︎ unpkg ↗︎

@saihaj saihaj merged commit b7dc8a5 into main Sep 28, 2023
11 checks passed
@saihaj saihaj deleted the saihaj/patch-interface-loader branch September 28, 2023 14:58
@dimitrovmaksim
Copy link
Member

Does this change mean you can't do parentEntity.childEntity.load() on entities where childEnitity points to an interface? More precisely that childEntity field won't exists on the parentEntity at all?

@saihaj
Copy link
Member Author

saihaj commented Oct 9, 2023

@dimitrovmaksim correct asfaik in graph-node we don’t allow loading interfaces. When adding support for loaders we mistakenly created loaders for interfaces which could crash subgraph at runtime

@dimitrovmaksim
Copy link
Member

dimitrovmaksim commented Oct 9, 2023

@saihaj Then i suppose the docs should point out that Interfaces are not supported for derived fields, because it seems some devs use them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants