Skip to content

Build Survey Question Models and GraphQL API #379

@aneilbaboo

Description

@aneilbaboo
  • Survey / SurveyVersions approach
    • Models
      • Survey
        • Id: hashkey
        • Title
        • ownerId: string
        • currentPublishedVersionId: versionId
        • draftVersionId: versionId
      • SurveyVersion
        • surveyId: hashkey (unique to each survey version)
        • versionId: rangeKey (string representing a number an iso timestamp)
        • questions: JSON (surveyjs data)
    • GraphQL API
      • Objects
        • Survey object
          • id - uuid
          • title
          • ownerId
          • currentPublishedVersionId
          • draftVersionId
          • currentPublishedVersion => SurveyVersion object
          • draftVersion => SurveyVersion object
          • versions => list of survey versions
        • SurveyVersion object
          • surveyId
          • versionId
          • questions
      • Query
        • survey(id)- gets a survey
        • surveys(state: ‘published’ | ‘draft’ |’all’ ) - all surveys
      • Mutations
        • saveSurvey
          • If id provided, then create Survey and SurveyVersion (new draft)
          • Otherwise, provide id => saved questions overwrite draft SurveyVersion
        • publishSurvey (surveyId)
        • deleteSurvey
        • unpublishSurvey (surveyId) ? - not yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions