Skip to content

Provide data for a richer design "version selector" dropdown in GraphQL

Problem to solve

We would like GraphQL to supply the front-end with more data for the "version selector" dropdown.

Designs for this selector can be viewed in the Designs tab.

Further details

The following data will need to be exposed to GraphQL for VersionType:

Note that "version number" is currently being handled dynamically on the front-end. Once this data is available in GraphQL, the frontend should be changed to using GraphQL as the source for this property instead.

This issue represents the work involved to capture the above data and make it available via GraphQL.

Thoughts about the implementation

Version number

The number could be cached in Redis and expired, similar to how Design#user_notes_count is within the Version model.

User and time of change

Added in !17316 (merged) and !17322 (merged)

Added, removed, changed blurb

In order for the front end to produce a string like "X person changed 1 screen and added 2 screens", we'd need something like these new properties in GraphQL for VersionType:

  • The user who made the change
  • Counts of creation, modification and deletion - as this data never changes perhaps we migrate 3 new integer type columns into Version?
Edited by Christen Dybenko