I heard on Go Time where Francesc mentioned that by default, dgraph is very flexible and will let you write any data you want. I believe he mentioned that if you try to query for a predicate that doesn’t have an index, this will fail, but it sounded like everything else was fairly flexible.
I’m using DGo, and I have several types defined as Go structs (with appropriate JSON tags and DType
field). I have yet to get DGraph to recognize my types without explicitly defining them in the schema as well. If I install a minimal schema that defines, say, a single index, that Alter will be accepted, as will any Mutates where I pass in my types. Both operations succeed. Yet when I go to Ratel after these, there are no types listed.
I tried searching the docs for answers but am coming up short. In addition, all of the tutorial content I’ve seen defines all types explicitly in the loaded schema. So I’m wondering if I just misunderstood the intent behind the statements about flexible schema. It would be ideal that during development, I could just work with Go types and not worry about my dgraph schema so much.
Any ideas?