graphql
graphql copied to clipboard
Allow @exclude-Directive on relation fields
Currently there is no way to exclude some operations on relation fields.
I would suggest allowing the use of the @exclude
directive at the field level for relations as well, so that you can configure the following:
type Actor @exclude(operations: [CONNECT]) {
name: String
}
type Movie {
title: String
actors: [Actor] @relationship(type: "ACTED_IN", direction: IN) @exclude(operations: [DELETE, DISCONNECT])
}
With the example above, no connect
, delete
and disconnect
operations are allowed for the Movie::actors
field
The available operations for @exclude
would be extended by CONNECT
and DISCONNECT