graphprotocol / graphprotocol/graph-node
Support for @derivedFrom field on an interface
Offen
@dotansimha arbeitet bereits daran.
Seit 15.2.2022.
area/graphql
enhancement
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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!]!")])]
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.