Upmost __typename in query: Operation not allowed

upmost __typename in query / mutation causes an error: Operation not allowed
It is required by gql flutter library and by me because i use both gql and dgraph.

Is there a workaround for this.

query getUserProfile($username: String!) {
  getUser(username: $username) {


  "data": null,
  "errors": [
      "message": "Operations not allowed -- [__typename]"

I can confirm this was merged and is functional in 21.12. Of course the cloud is running 21.03.

I faced a similar issue with Apollo. I recall there was a configuration setting to prevent Apollo from injecting __typename everywhere. Perhaps the same option exists for gql flutter? That would be a workaround provided you don’t need the top level __typename results.

1 Like

I tried to follow getting started tutorial https://dgraph.io/docs/get-started/
but after running

docker run --rm -it -p "8080:8080" -p "9080:9080" -p "8000:8000" -v ~/dgraph:/dgraph "dgraph/standalone:v21.12.0"

I can not connect to localhost:8000 to ratel

It seems like retel is not starting at all. Where can I find docker file for this container

I0725 12:37:20.959607      35 run.go:514] Setting up lambda servers
I0725 12:37:20.960244      35 run.go:742] gRPC server started.  Listening on port 9080
I0725 12:37:20.960287      35 run.go:743] HTTP server started.  Listening on port 8080
I0725 12:37:21.029654      35 pool.go:164] CONN: Connecting to localhost:5080
I0725 12:37:21.038092      25 zero.go:511] Got connection request: cluster_info_only:true 
I0725 12:37:21.038270      25 log.go:34] 1 no leader at term 4; dropping index reading msg
I0725 12:37:21.824099      25 pool.go:327] CONN: Re-established connection with localhost:7080.
E0725 12:37:21.828196      25 pool.go:311] CONN: Unable to connect with localhost:7080 : rpc error: code = Unknown desc = No node has been set up yet
E0725 12:37:21.932194      35 groups.go:1223] Error during SubscribeForUpdates for prefix "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15dgraph.graphql.schema\x00": Unable to find any servers for group: 1. closer err: <nil>

Check out this answer: Ratel not working - #2 by MattH