Current behavior
graphcool reset --target local
results in
ERROR: Cannot query field 'resetProjectData' on type 'Mutation'. (line 2, column 11):
resetProjectData(input: {
^
{
"data": null,
"errors": [
{
"message": "Cannot query field 'resetProjectData' on type 'Mutation'. (line 2, column 11):\n resetProjectData(input: {\n ^",
"locations": [
{
"line": 2,
"column": 11
}
]
}
],
"status": 400
}
Get in touch if you need help: https://www.graph.cool/forum
To get more detailed output, run $ set -x DEBUG "*"
Reproduction
graphcool init
graphcool deploy --target local # choose local
graphcool reset --target local
Expected behavior?
Resets the data of the local service.
Currently, the quickest way to reset all data locally is to
types.graphql
graphcool deploy --force --target local
types.graphql
graphcool deploy --target local
Now that we have import
and export
with the newest CLI, this would be really helpful to have working locally for staging clean sample data in a dev/testing environment.
For future googlers trying to reset their local graphcool data, but getting an error such as:
There are issues with the new service definition:
Global
✖ Did not find the type or relation you provided a permission for: 'User.read, ...'
In addition to the above steps, you also need to comment out the contents of graphcool.yml
, but leave the types: ./types.graphql
line:
types: ./types.graphql
#permissions:
#- operation: User.read
#- operation: User.create
#- operation: User.update
Most helpful comment
Currently, the quickest way to reset all data locally is to
types.graphql
graphcool deploy --force --target local
types.graphql
graphcool deploy --target local