No, GraphQL executes a type filter as you mentioned. So
query {
queryUser {
name
}
}
would execute
{
q(func: type(User)) {
User.name
}
}
if @dgraph directive is not used.
The GraphQL API allows you to define non-null fields. If you have existing data for a type in Dgraph, then those fields might be null because ± doesn’t enforce any such non-null constraints. It is possible that these two might not intermix properly.
Do you want to be able to query the data that was already there earlier using the GraphQL API or do you want the API to only return the data that you wrote using GraphQL mutations?