graphprotocol / graphprotocol/graph-node
Support for @derivedFrom field on an interface
@dotansimha ci sta già lavorando.
Dal 15/2/2022.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
Do you want to request a feature or report a bug?
Feature
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
The following schema throws an error:
interface Owner {
id: ID!
}
type Pool implements Owner @entity {
id: ID! # Contract address
loanPositions: [LoanPosition!] @derivedFrom(field: "owner")
}
type User implements Owner @entity {
id: ID! # ethereum address
loans: [Loan!] @derivedFrom(field: "borrower") # Loans, created by the user
loanPositions: [LoanPosition!] @derivedFrom(field: "owner")
}
type LoanPosition @entity {
id: ID!
owner: Owner!
loan: Loan!
}
Error:
✖ Failed to deploy to Graph node http://localhost:8020/: subgraph validation error: [SchemaValidationError([InvalidDerivedFrom("Pool", "loanPositions", "field owneron typeLoanPosition must have one of the following types: Pool, Pool!, [Pool!], [Pool!]!")])]
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.