fauna / fauna-shell

Interactive shell for FaunaDB
Other
75 stars 17 forks source link

Graph QL Upload does not exit with correct exit code. #180

Open cleve-fauna opened 2 years ago

cleve-fauna commented 2 years ago

We need this, because currently fauna shell does not exit with error

image

Originally posted by @aprilmintacpineda in https://github.com/fauna/fauna-shell/issues/158#issuecomment-1075879065

aprilmintacpineda commented 2 years ago

Still happening in 0.15.0.

image

Notice that it said that validation failed but still did not exit with the proper exit code.

Logs from Github Actions:

Run yarn global add fauna-shell @fauna-labs/fauna-schema-migrate
yarn global v1.22.1[8](https://github.com/disruptivsolutions/beny-backend/runs/5859898348?check_suite_focus=true#step:7:8)
[1/4] Resolving packages...
warning fauna-shell > cli-ux@4.[9](https://github.com/disruptivsolutions/beny-backend/runs/5859898348?check_suite_focus=true#step:7:9).3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning fauna-shell > @oclif/plugin-autocomplete > cli-ux@4.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning fauna-shell > request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning fauna-shell > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning fauna-shell > request > har-validator@5.1.5: this library is no longer supported
warning fauna-shell > request > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @fauna-labs/fauna-schema-migrate@2.2.1" has unmet peer dependency "faunadb@^4.4.1".
[4/4] Building fresh packages...
success Installed "fauna-shell@0.15.0" with binaries:
      - fauna
success Installed "@fauna-labs/fauna-schema-migrate@2.2.1" with binaries:
      - fauna-schema-migrate
Done in [12](https://github.com/disruptivsolutions/beny-backend/runs/5859898348?check_suite_focus=true#step:7:12).84s.

---

Run fauna upload-graphql-schema fauna/schema.graphql \
UPLOADING SCHEMA (mode=replace): fauna/schema.graphql
RESPONSE:
Schema does not pass validation. Violations:

Object type 'User' can include field 'country' only once. (line [29](https://github.com/disruptivsolutions/beny-backend/runs/5859898348?check_suite_focus=true#step:8:29)3, column 3):
  country: String,
  ^
 (line [30](https://github.com/disruptivsolutions/beny-backend/runs/5859898348?check_suite_focus=true#step:8:30)5, column 3):
  country: String
  ^

Object type 'User' can include field 'currency' only once. (line 294, column 3):
  currency: Currency,
  ^
 (line 306, column 3):
  currency: String
  ^