Can I tell dgraph that I don't need/want a big detailed response?

is it possible to tell dgraph that I just want a “OK” response or simple “Error” response, instead of this big response? because it’s imo a waste of data and bandwidth since I don’t need it

It’s really a big response

{
  "data": {
    "code": "Success",
    "message": "Done",
    "queries": null,
    "uids": {
      "amit": "0x1",
      "artyom": "0x9",
      "catalina": "0x8",
      "goldie": "0x5",
      "hyung": "0x4",
      "luke": "0xa",
      "michael": "0x7",
      "perro": "0x6",
      "rammy": "0x3",
      "sang": "0xb",
      "sarah": "0x2"
    }
  },
  "extensions": {
    "server_latency": {
      "parsing_ns": 58367,
      "processing_ns": 6003445,
      "assign_timestamp_ns": 1065266,
      "total_ns": 7429244
    },
    "txn": {
      "start_ts": 3,
      "commit_ts": 4,
      "preds": [
        "1-\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000age",
        "1-\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000dgraph.type",
        "1-\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000friend",
        "1-\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000name",
        "1-\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000owns_pet"
      ]
    }
  }
}

ah yo BTW this is a mutation request

Nope, not possible.

1 Like

but that’s a waste of bandwidth :frowning: ain’t there a roundabout via lambda functions or something like that ._.

If you build your own API on top of Dgraph and your API instance is side by side with the cluster. So you can reduce the amount of data. But from Dgraph itseft you won’t have any trick.

1 Like

Sure, that works fine if you use google cloud functions + dgraph

but we people nowadays use Cloudflare Workers + dgraph

because google cloud functions and AWS lambda (efge) are very slow and much more expensive, than Cloudflare Workers :frowning:

anyway thanks a lot! I hope they will create a feature to opt out of that data