Currently it is not possible to declare default values for fields.
The GraphQL spec allows default values on input types: GraphQL
It would be awesome to see support for this on dgraph through a @default
field directive:
type Foo {
value: Int @default(5)
}
would generate this Input-Type:
input AddFooInput {
value: Int = 5
}
I’ll link this for reference.