-
Notifications
You must be signed in to change notification settings - Fork 7
Aliases
This wiki page captures current design thinking about how aliasing will be implemented within Author.
Aliases are user-specified shorthand codes that are used to identify entities within a questionnaire.
For example a question with a title of "Please confirm that your date of birth is 01/01/1970" may have an alias of confirm-dob
.
Often aliases are established numeric codes that identify a question.
The initial implementation of aliases will only be applied to Sections and QuestionPages. A new field will be added to these types in the GraphQL schema. e.g.
Section {
id: ID!
title: String
alias: String
}
QuestionPage {
id: ID!
title: String
alias: String
}
The alias field should return a plaintext string value (without any markup). The fields are nullable and will return null if empty.
Mutation input types will also need to be updated to support updating alias values.
A new column will be added to the Sections
and Pages
tables called alias
The new column will contain a VARCHAR and default to null.
The maximum character length is suggested to be 24 characters for aliases. In practice we would allow the user to enter longer values but truncate when displaying the aliases.