Closed Zerim closed 6 years ago
@Jannis One question just occurred to me. Do we want to enforce uniqueness for 1:1 reverse lookups? Or should we just say that all reverse lookups are by definition 1:*?
Doing the former might put us in a position to dynamically return an error from mapping scripts where two entities try and create a relationship to a single entity with only a 1:1 reverse lookup defined on its entity type.
Might be good to start with the more restrictive/limited API and only add 1:1
reverse lookups if we get requests from developers for the use case.
Aside from the @entity
change, other changes made. I'm going to leave this PR as WIP until I fill out the Value Object
and Built-in Types
sections
@Jannis Added sections for Built-in Types
and Value Object
as well as the recently designed @unique
directive. Ready for another look.
Okay, changes made @Jannis, ready for another look.
Closed in favor of https://github.com/graphprotocol/research/pull/64
Should be merged after: https://github.com/graphprotocol/the-graph-research/pull/47 (base branch set to that PR's branch for a more clear diff). Do not merge.
@Jannis I think I deviated a little bit on the
derivedFrom
API then what we had in the prototypes. I think the rationale makes sense, but let me know what you think.