GraphQL error when trying to create a book in local dev mode
After checking out the repo and starting the local dev environment with docker-compose up
, I managed to register and activate a user. When clicking on the "Start writing your book" button in the dashboard, I receive a GraphQL error.
Expected behavior
An empty book should be created
Current behavior
I get the following error response in GraphQL:
{
"errors": [
{
"message": "Variable \"$input\" got invalid value {}; Field collectionId of required type ID! was not provided.",
"locations": [
{
"line": 1,
"column": 21
}
],
"extensions": {
"code": "BAD_USER_INPUT",
"exception": {
"stacktrace": [
"GraphQLError: Variable \"$input\" got invalid value {}; Field collectionId of required type ID! was not provided.",
" at /home/node/server/node_modules/graphql/execution/values.js:114:15",
" at coerceInputValueImpl (/home/node/server/node_modules/graphql/utilities/coerceInputValue.js:99:11)",
" at coerceInputValueImpl (/home/node/server/node_modules/graphql/utilities/coerceInputValue.js:54:14)",
" at coerceInputValue (/home/node/server/node_modules/graphql/utilities/coerceInputValue.js:37:10)",
" at _loop (/home/node/server/node_modules/graphql/execution/values.js:107:69)",
" at coerceVariableValues (/home/node/server/node_modules/graphql/execution/values.js:119:16)",
" at getVariableValues (/home/node/server/node_modules/graphql/execution/values.js:48:19)",
" at buildExecutionContext (/home/node/server/node_modules/graphql/execution/execute.js:184:61)",
" at executeImpl (/home/node/server/node_modules/graphql/execution/execute.js:89:20)",
" at Object.execute (/home/node/server/node_modules/graphql/execution/execute.js:64:35)",
" at /home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:261:48",
" at Generator.next (<anonymous>)",
" at /home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:8:71",
" at new Promise (<anonymous>)",
" at __awaiter (/home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:4:12)",
" at execute (/home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:240:20)"
]
}
}
},
{
"message": "Variable \"$input\" got invalid value {}; Field title of required type String! was not provided.",
"locations": [
{
"line": 1,
"column": 21
}
],
"extensions": {
"code": "BAD_USER_INPUT",
"exception": {
"stacktrace": [
"GraphQLError: Variable \"$input\" got invalid value {}; Field title of required type String! was not provided.",
" at /home/node/server/node_modules/graphql/execution/values.js:114:15",
" at coerceInputValueImpl (/home/node/server/node_modules/graphql/utilities/coerceInputValue.js:99:11)",
" at coerceInputValueImpl (/home/node/server/node_modules/graphql/utilities/coerceInputValue.js:54:14)",
" at coerceInputValue (/home/node/server/node_modules/graphql/utilities/coerceInputValue.js:37:10)",
" at _loop (/home/node/server/node_modules/graphql/execution/values.js:107:69)",
" at coerceVariableValues (/home/node/server/node_modules/graphql/execution/values.js:119:16)",
" at getVariableValues (/home/node/server/node_modules/graphql/execution/values.js:48:19)",
" at buildExecutionContext (/home/node/server/node_modules/graphql/execution/execute.js:184:61)",
" at executeImpl (/home/node/server/node_modules/graphql/execution/execute.js:89:20)",
" at Object.execute (/home/node/server/node_modules/graphql/execution/execute.js:64:35)",
" at /home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:261:48",
" at Generator.next (<anonymous>)",
" at /home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:8:71",
" at new Promise (<anonymous>)",
" at __awaiter (/home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:4:12)",
" at execute (/home/node/server/node_modules/apollo-server-core/dist/requestPipeline.js:240:20)"
]
}
}
}
]
}
Steps to reproduce
Start local dev environment using Docker
- register user
- open Dashboard
- click "Start writing your book" button
Environment
Mac Docker
Possible solution
It seems like the inputs are not set correctly. Please advise.