Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

Corrupted relations in tables of graphcool database after CLI deploy #558

Closed unremarkablegarden closed 5 years ago

unremarkablegarden commented 5 years ago

I’m having an issue with an important database. It started a couple of days ago when I tried to use the graphcool CLI to push some schema changes (noting out of the ordinary).

It seems the database relations have become corrupted. We need to somehow repair these, as soon as possible. I believe that I’ve tried every possible thing to fix it, but nothing has worked.

  1. I can’t push any new changes to the schema. Internal server error

Either the process crashes or it gives me “Whoops! Internal server error” type message. I copied the current schema from the console into my Types.graphql file and that was pushable. So that’s back to normal. No new changes can be made.

  1. My app is broken as a result

The Chrome dev console: "Whoops. Looks like an internal server error." (multiple times)

  1. If I try to use the CLI to export the database with debug enabled, I find this error:
Downloading nodes... 625ms
Downloading lists... 279ms
Downloading relations... ✔
WARNING: Error: The download of relations failed. You may get fragmented data. Request ID: eu-west-1:simple:cjlv62k4z18pf0143mczgonc8
    at /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/src/Output/index.ts:209:41
    at SimpleAction.ActionBase.pause (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/src/Output/actions/ActionBase.ts:65:17)
    at Output.warn (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/src/Output/index.ts:206:17)
    at Exporter.<anonymous> (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/src/commands/export/Exporter.ts:100:18)
    at step (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/export/Exporter.js:32:23)
    at Object.next (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/export/Exporter.js:13:53)
    at fulfilled (/usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core/dist/commands/export/Exporter.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  1. Can’t export relations with curl

curl 'https://api.graph.cool/simple/v1/ [my project] /export' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer [ my token ]' \ -d '{"fileType”:”relations","cursor":{"table":0,"row":0,"field":0,"array":0}}' \ -sSv

{"requestId":"eu-west-1:simple:cjlv6hafp1bxl0106gfi3xn5z","error":"Whoops. Looks like an internal server error. Please contact us from the Console (https://console.graph.cool) or via email (support@graph.cool) and include your Request ID: eu-west-1:simple:cjlv6hafp1bxl0106gfi3xn5z”}

Exporting lists and nodes works fine.

  1. I can’t clone the project in the console.

  2. Can't view two of the tables in the console. I get the Whoops error for each row it tries to show.

marktani commented 5 years ago

Please contact us from the Console (https://console.graph.cool) or via email (support@graph.cool) and include your Request ID: eu-west-1:simple:cjlv6hafp1bxl0106gfi3xn5z. Thanks!