Schema query filtering

iluminae commented :

Hi guys,
After a call with @danielmai I was pointed towards bumping this ticket for my feature request.

To explain why we would need this feature, see our issue where we needed to namespace our predicates to make them far less common to achieve the required ingestion speed. So a graph that would have 50 unique predicates with 10Million nodes becomes a graph with 1Million unique predicates. That, paired with our solution for multi-tenancy which entails namespacing everything further - means we could have 1M unique predicates per customer.

So, to achieve any inspection of available predicates, we would need to ask for all of them, then filter them to match some sort of simple regex, as @barum showed above. This would be improbable in a live-typeahead scenario. We would need to store our schema in a different database to make these types of queries, or a different place in dgraph. Either way, keeping them synced is a challenge.

Or, given a query of something like {q(schema: match(/blah.*/,8)){name}} the server could inspect the types for us, and show us just what the user would need.