threshold-network / staking-subgraphs

Threshold Network staking subgraphs
https://threshold.network
1 stars 1 forks source link

Fix use of empty values in GraphQL required fields #27

Closed manumonti closed 2 years ago

manumonti commented 2 years ago

The GraphQL entities defined in subgraph's schema can be composed of optional and required fields. A field is marked as required using the exclamation mark in its definition. When a field is marked as required, this must contain a non-null and non-empty value.

Until now, in Threshold Network subgraph, there are several entities whose required fields are initialized as empty values:

The previous versions of The Graph node allowed to deploy subgraphs with required fields set as empty or null, but with recent version, the deployment fails with message: Null value resolved for non-null field name.