graphql-platform
graphql-platform copied to clipboard
"dotnet graphql update" delets schema file before checking if server is reachable
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
When you run "dotnet graphql update" as documented in the strawberryshake tooling.md and the endpoint is not reachable, you wil get a HTTP Error and the process stops (so far so good) BUT the process will delete the schema.graphql file before it tries to reach the server, so that you will be left with a missing schema and failing builds.
Maybe you can restore the schema from your local git client, but this can be quite annoying and dangerous.
Steps to reproduce
- Make sure the graphql endpoint / server is not reachable
- In the console navigate to the project where you have implemented StrawberryShake
- run "dotnet graphql update"
- Try to recompile or run any test - it will fail due to the missing schema file
Relevant log output
No response
Additional Context?
It would be handyto check if the server was reachable before deleting any schema files.
Product
Strawberry Shake
Version
12.12.1
Thank you for reporting this
This is fixed with version 13