You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"errors": [
{
"message": "Non-nullable field 'uuid' (type String!) was not present in result from Dgraph. GraphQL error propagation triggered.",
"locations": [
{
"line": 3,
"column": 5
}
],
"path": [
"queryUser",
1,
"uuid"
]
}
],
"data": {
"queryUser": [
{
"uuid": "bar",
"devices": [
{
"uuid": "foo"
}
]
},
null
]
}
}
Analysis
As a GraphQL user, I just declared some types, one of them (type User) happens to have same name as dgraph's internal type for ACL user. This causes a problem, as to how to identify which nodes are associated with user declared types and which ones with internal types. As a result, the actual results above contain errors, along with a null user in data.
If you call /query with following body, then you can see the reason why this happens:
As groot is also a User, so it is also returned by dgraph in response to query, although, groot was never inserted by us, as it got inserted by ACL instance.
So, any types which are used by dgraph internally should be namespaced, in order to avoid collision with user declared types. For example, ACL User can be __User or dgraph.User, or something like that.
The text was updated successfully, but these errors were encountered:
…5185)
Dgraph's internal types User, Group and Rule were too generic. Prefixed them with dgraph.type so that there is no chance of collision with user-defined types.
Also, reserved dgraph. as the namespace for dgraph's internal types/predicates so that no user could create any such type/predicate.
Fixes#4878.
Fixes #DGRAPH-1090.
…ypermodeinc#5185)
Dgraph's internal types User, Group and Rule were too generic. Prefixed them with dgraph.type so that there is no chance of collision with user-defined types.
Also, reserved dgraph. as the namespace for dgraph's internal types/predicates so that no user could create any such type/predicate.
Fixeshypermodeinc#4878.
Fixes #DGRAPH-1090.
What version of Dgraph are you using?
latest:master
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
doesn't matter
Steps to reproduce the issue (command/config used to run Dgraph).
dgraph zero
dgraph alpha --acl_secret_file ee/acl/hmac-secret
(ACL enabled, this is just to get the ACL Usergroot
inserted into Dgraph)alpha
instancedgraph alpha
(Without ACL this time, so that we can make queries and mutations without token)/admin/schema
with following POST body:graphql
with given GraphQL body):Expected behaviour and actual result.
Analysis
As a GraphQL user, I just declared some types, one of them (type User) happens to have same name as dgraph's internal type for ACL user. This causes a problem, as to how to identify which nodes are associated with user declared types and which ones with internal types. As a result, the actual results above contain errors, along with a null user in data.
If you call
/query
with following body, then you can see the reason why this happens:following results are returned:
As
groot
is also aUser
, so it is also returned by dgraph in response to query, although,groot
was never inserted by us, as it got inserted by ACL instance.So, any types which are used by dgraph internally should be namespaced, in order to avoid collision with user declared types. For example, ACL
User
can be__User
ordgraph.User
, or something like that.The text was updated successfully, but these errors were encountered: