Skip to content

Conversation

@saihaj
Copy link
Contributor

@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

@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
@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
Contributor 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

Development

Successfully merging this pull request may close these issues.

Using derivedFrom on Interfaces failing with Cannot read properties of undefined (reading 'fields') on graph-cli 0.57

3 participants