-
Given an entity defined like so: type Batch @entity {
id: String!
hash: Bytes!
timestamp: BigInt!
batcher: Batcher
size: BigInt!
streams: [Stream!]! @derivedFrom(field: "batch")
} Is it possible to mark it as immutable if I only do The type Stream @entity {
batch: Batch!
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The answer is yes — it is possible to mark an entity as ![]() |
Beta Was this translation helpful? Give feedback.
-
For context here, derived fields are virtual and are build at runtime, it's not an actual field in the db that gets updated. Basically the graph-node dynamically fetches all derived entities from the DB that have the specified derived_from field equal to the ID of the "parent" Entity |
Beta Was this translation helpful? Give feedback.
The answer is yes — it is possible to mark an entity as
immutable: true
when it contains a field uses the@derivedFrom
directive: