Field aliases

Use aliases to query the same type of entity collections more than once and make a distinction between them, for example, assets with their definitions and descriptive examples. Both of them are stringAttributes so it might not be obvious at first sight which response part belongs to which attribute. Using aliases makes the response easier to read as you don't need to look at the type returned by each node and can even skip it:

query {
    assets(where: {id: {eq: "c500633c-2c1a-4990-afcd-274cbde93500"}}) {
        definitions: stringAttributes(where: {
            type: {publicId: {eq: "Definition"} }
        }) {
            stringValue
        }
        examples: stringAttributes(where: {
            type: {publicId: {eq: "DescriptiveExample"} }
        }) {
            stringValue
        }
    }
}
{
  "data": {
    "assets": [
      {
        "id": "c500633c-2c1a-4990-afcd-274cbde93500",
        "definitions": [
          {
            "stringValue": "definition"
          }
        ],
        "examples": [
          {
            "stringValue": "example"
          }
        ]
      }
    ]
  }
}