How to turn off extensions in dgraph cloud?

Currently all queries returning extensions in response :

{
  "data": {
    "queryAuthor": [
      {
        "id": "0x4"
      }
    ]
  },
  "extensions": {
    "touched_uids": 1,
    "tracing": {
      "version": 1,
      "startTime": "2021-04-17T07:18:29.488524213Z",
      "endTime": "2021-04-17T07:18:29.489954232Z",
      "duration": 1430045,
      "execution": {
        "resolvers": [
          {
            "path": [
              "queryAuthor"
            ],
            "parentType": "Query",
            "fieldName": "queryAuthor",
            "returnType": "[Author]",
            "startOffset": 80076,
            "duration": 1330111,
            "dgraph": [
              {
                "label": "query",
                "startOffset": 115629,
                "duration": 1272412
              }
            ]
          }
        ]
      }
    }
  }
}

how can i turn off this from dgraph cloud dashboard ?

and is it possible to fetch extensions only for specific queries …

3 Likes

Hi @chandu0101, Welcome to Dgraph Community!
We do have alpha flags to turn them off if you are running digraph locally.
--graphql extensions=true; Enables extensions in GraphQL response body.
But Currently, we don’t have a way to use alpha flags in the cloud.

Actually I think the response that returns the extensions information only if you use the web UI (or Ratel) . If you use a GraphQL client library to make the query, you wouldn’t get those extensions in the response. I may be mistaken though

dgrpah pricing model is based on data transfer :stuck_out_tongue: , it should be good if we can disable per request based/ or globally :slight_smile:

2 Likes

It absolutely does return extensions from Cloud in both Websocket and HTTP responses.

@chandu0101 is right: if these extensions are included in bandwidth pricing for Cloud, then we should have a way to turn them off. Often the extensions are larger than the actual data for my queries.

4 Likes

The fact that it’s impossible to turn off this response bloat does make it feel like a cheap tactic to inflate Dgraph’s revenue. Not a good look at all.