grand-stack / grand-stack-starter

Simple starter project for GRANDstack full stack apps
https://grandstack.io/docs/getting-started-grand-stack-starter.html
Apache License 2.0
504 stars 161 forks source link

Error seeding #141

Closed colinskow closed 3 years ago

colinskow commented 3 years ago

When I attempt to seed the DB I am getting the following error:

Error: Error: Response not successful: Received status code 400
    at /home/colin/localdev/github/grand-stack-starter/api/src/seed/seed-db.js:32:17

Steps to reproduce:

1) Create fresh DB (4.2.5) in Neo4J Desktop and install APOC 2) Clone latest version of this repo from master 3) cd api && npm install 4) npm start 5) npm run seedDb in second terminal

jmwroca commented 3 years ago

Change date: DateTime to date: Date under type Review in the schema.graphql resolved the issue for me.

type Review { reviewId: ID! stars: Float text: String date: DateTime <------------------------------------------------------------------ offending line business: Business @relationship(type: "REVIEWS", direction: OUT) user: User @relationship(type: "WROTE", direction: IN) }

colinskow commented 3 years ago

Thanks @jmwroca for finding the source of the problem.

The schema file is correct. The line to fix is in seed-mutations.js.

Change: $reviewDate: Date to $reviewDate: DateTime

I will submit a PR.