Filter in schema about "Giving Nodes a Type"

REF: https://docs.dgraph.io/howto/#giving-nodes-a-type

I would like to know if it is possible to create a filter even if it is only in Ratel. To filter null Schemas used in types, labels and kinds.

Today I’m using this approach recommended by you, but when I open Ratel it has more than 120 predicate entries. I use a pattern for types, labels and kinds. I always place an underline or more of one when I want to refer to another type of label.

e.g: has(_message) or has(__User) or has(___Protected)

As they are only used for this approach I see no reason for them to be occupying a space that should only be for functional Schema.

Cheers.

What do you mean by null schema?

Are you talking about defining composite filters? Unfortunately, we don’t have such functionality yet.

About null schema, it is about the use of “types/kinds/labels” in nodes but we do not actually declare via alter schema. That is, it is not part of the schema, so it should not be displayed as such. I spoke null in a colloquial sense only.

Imagine the following situation. You have an application with more or less 190 predicates defined for the application. However, in the same application you use a set of “anonymous” predicates. And from 190 it passes to 380 predicates and goes up with time.

That way you do not have effective schema control. It’s just a huge list. You would need a glue to remember and use the search field to find something and change around.

I’m just commenting on this feature. On day day it would be interesting to have a good control under the schema via Ratel for example. But nothing prevents you from ignoring it.

I see, I think you are talking about schema which is set in an explicit(by the user)/implicit(set by Dgraph). If schema query allowed you to specify a filter to only return schema which was set explicitly, would that solve your use case?

1 Like

Exactly.

[Placing a large sentence here to fill in the required space for 20 characters.]

Maybe create an issue for that on Github and we can do that at some point.

1 Like