Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Survey Question Models and GraphQL API #379

Open
aneilbaboo opened this issue Jan 16, 2019 · 1 comment
Open

Build Survey Question Models and GraphQL API #379

aneilbaboo opened this issue Jan 16, 2019 · 1 comment

Comments

@aneilbaboo
Copy link
Contributor

aneilbaboo commented Jan 16, 2019

  • 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
@aneilbaboo aneilbaboo changed the title Build Survey Models Build Survey Models and GraphQL API Jan 16, 2019
@aneilbaboo aneilbaboo changed the title Build Survey Models and GraphQL API Build Survey Question Models and GraphQL API Jan 16, 2019
@gcv gcv mentioned this issue Feb 27, 2019
@gcv
Copy link
Contributor

gcv commented Feb 27, 2019

PR: #386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants