reym
Projections/Schema/Field

@gdpr

Use the @gdpr directive if a field of a projection contains GDPR relevant data.

ArgumentDescription
defaultThe value that is to be used after the gdpr data was invalidated
conditionA condition on which the data is to be invalidated

The data of that field (and therefore also for all events in the event store) will be invalidated when the condition argument evaluates to true or when the entire entry is deleted.

When using the @gdpr directive, the expression environment for the condition will only have the projection field available for this operation.

Invalidation does not happen when the entire projection is removed.

Example

user.graphql
type User @upsertOn(...) {
    name: String! @gdpr(default: "---", condition: "projection.isSoftDeleted == true")
    isSoftDeleted: Boolean
}

The name field will be set to "---" when the isSoftDeleted field is set to true. In addition all traces of the name field in the event store will be set to that value.

On this page