MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / IsReservedType

Function IsReservedType

x/keys.go:910–912  ·  view source on GitHub ↗

IsReservedType returns true if the given typ is reserved for internal usage, i.e., prefixed with `dgraph.`. We reserve `dgraph.` as the namespace for the types/predicates we may create in future. So, users are not allowed to create a type under this namespace. Hence, we should always define interna

(typ string)

Source from the content-addressed store, hash-verified

908// When critical, use IsPreDefinedType(typ string) to find out whether the typ was
909// actually defined internally or not.
910func IsReservedType(typ string) bool {
911 return isReservedName(ParseAttr(typ))
912}
913
914// IsPreDefinedType returns true only if the typ has been defined by dgraph internally.
915// For example, `dgraph.graphql` or ACL types are defined in the initial internal types.

Callers 1

Calls 2

isReservedNameFunction · 0.85
ParseAttrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…