dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Schema should have constraint

Open squalfof opened this issue 9 years ago • 3 comments

scalar (
	director.film: uid @reverse
	genre: uid @reverse
	initial_release_date: date @index
	name.en: string @index
)

uid type should not be specified as scalar, they are objects. Maybe some warning during schema-parsing ?

squalfof avatar Feb 22 '17 01:02 squalfof

since we don't recognise objects/object types in schema, @manishrjain Can we remove scalar block from schema file and have the below directly. It's kind of weird to specify uid type inside scalar block. director.film: uid @reverse genre: uid @reverse initial_release_date: date @index name.en: string @index

janardhan1993 avatar Mar 03 '17 10:03 janardhan1993

Yes, I was thinking the same thing. Let's remove the scalar block.

manishrjain avatar Mar 04 '17 04:03 manishrjain

We removed the scalar keyword. Also, we'll be getting rid of the schema file, instead allowing dynamic schema updates.

manishrjain avatar Mar 17 '17 06:03 manishrjain