Default values on input types

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.

4 Likes

Making this into a formal feature request.

1 Like