Directive Default Doesn't work

Report a Dgraph Bug - the default directive does not currently work

What version of Dgraph are you using? - Latest

in previous versions you could place the default value inside the schema, however in the version released 5 days ago, it starts to present an error when working with the same schema that was running

Dgraph Latest
$ dgraph version
 
Latest

Have you tried reproducing the issue with the latest release?

my node in dgraph:

type MyNode { 
	id: ID!
	description: String
	isDeleted: Boolean @default(add: { value: false})
}

Hey @AdrianMolero94,

Dgraph v22 is based on v21.03, the last stable release of Dgraph. As a consequence, some features in 21.12 are not in the latest.

See Dgraph v22.0.0 for more information. The product team is presently evaluating features and improvements from v21.12 for inclusion in upcoming releases.

2 Likes

@default directive is definitely in our backlog of good things from v21.12 to include. I don’t have a timeline to communicate yet. We are working on it …

3 Likes

@Raphael @matthewmcneely thank you for your reply