Skip to content

Add fields to graphQL version type

Jarka Košanová requested to merge 32081-design-rich-data into master

What does this MR do?

It adds author and created_at fields to design versions graphql type.

GraphQL example

Query

{
  project(fullPath: "flightjs/Flight") {
    issue(iid: "29") {
      designCollection {
        versions {
          nodes {
            id
            sha
            author {
              id
              name
            }
            createdAt
          }
        }
      }
    }
  }
}

Response

{
  "data": {
    "project": {
      "issue": {
        "designCollection": {
          "versions": {
            "nodes": [
              {
                "id": "gid://gitlab/DesignManagement::Version/3",
                "sha": "5fa57932f9b3abd0894f18fe6767067d89604324",
                "author": {
                  "id": "gid://gitlab/User/101",
                  "name": "Jaja K"
                },
                "createdAt": "2021-05-12T04:27:26Z"
              },
              {
                "id": "gid://gitlab/DesignManagement::Version/2",
                "sha": "a290364c575aca8b3d8934c80ff863f0781972d9",
                "author": {
                  "id": "gid://gitlab/User/1",
                  "name": "Administrator"
                },
                "createdAt": "2021-05-11T16:54:44Z"
              },
              {
                "id": "gid://gitlab/DesignManagement::Version/1",
                "sha": "1ecd180545b466f627e0348ec800472249e599a1",
                "author": {
                  "id": "gid://gitlab/User/1",
                  "name": "Administrator"
                },
                "createdAt": "2021-05-11T16:54:27Z"
              }
            ]
          }
        }
      }
    }
  }
}

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #32081 (closed)

Edited by Max Woolf

Merge request reports