Yes, exactly, we allow a global search on names. This is necessary for users that might not remember exactly what they are looking for but can recall a keyword.
I just did a little reading on the GraphQL schema language, but I would need to read more to grok how it might best suit use in Dgraph. Honestly I think I can boil down our current Dgraph schema needs to one very helpful feature: facets on schema items. So instead of writing this to search names:
regexp(animal.name, /fido/i) OR regexp(person.name, /fido/i)
I would write something like this:
schemaFacet(regexp(searchTag: name, /fido/i))
And my corresponding schema definition might look like this:
person.name: string @index(trigram) @facets(searchTag=name, ...) .
animal.name: string @index(exact, fulltext) @facets(searchTag=name, ...) .
This is my impression as well. It reminds me a bit of working with XML, where these really elaborate schemas are actually more burdensome than helpful.
One thing I like about Dgraph is that to me, you took a very practical approach to the query language. It reminds me of this thread on the cayley forum which is where I originally learned about Dgraph and ultimately led me to adopt it (https://discourse.cayley.io/t/modified-graphql-aimed-at-graph-dbs/485). From a developer productivity standpoint, I would personally be much more inclined to define my schema once (in the dgraph schema definition), and use some tool to auto-generate a GraphQL schema for me that others can use to grok my data model. Similar to a tool I already use to auto-generate Swagger API documentation: https://www.npmjs.com/package/typescript-rest-swagger… Writing swagger definition files seems like a suboptimal use of time when the computer can generate the definitions for me based on code I’ve already written.
Anyway, to summarize…from my perspective, the addition of a simple facet feature at the schema level would enable intelligent grouping of schema items for queries while also following the Dgraph team’s suggestion of avoiding a small number of widely-used predicates.