graphprotocol / graphprotocol/graph-node

Support for @derivedFrom field on an interface

Abierto
#2,109 3 comentarios 0 reacciones 2 asignados Ver en GitHub

@dotansimha ya está trabajando en esto.

Desde el 15/2/2022.

area/graphql enhancement
Lenguaje dominante
Rust
Estrellas
3.2k
Forks
1.1k
Merge medio
4 d 1 h
PR fusionados (30 d)
1

Descripción

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!]!")])]

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.