To begin creating questions, we’ll have to run mutations on the Questions table; a quick trick is to look at the 8base API explorer to see how the mutation script should look like. Go the to 8base dashboard and click on the API explorer on the sidebar.
On the API explorer, click on the
mutation link as seen above. This will present all the mutations for all available tables on your 8base dashboard. Look for that of the questions table.
From the screenshot above, we can see that the name of the mutation is
questionCreate and it takes a single argument
data of type
QuestionCreateInput consists of the fields required to create a question. If you have already forgotten the fields required to create a question, you can click on the
QuestionCreateInput link to view the fields.
Before we get to writing mutations to create questions, we need to update the guest permissions on the application. We need to enable file create access for guest users. Navigate to Settings > Roles > Guest and check the create box under File.
Now that we know how the data required for creating questions can move back to our application make the changes required for creating questions.
Like this article? Follow @codebeast on Twitter