Error seeding
colinskow opened this issue · comments
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:
- Create fresh DB (4.2.5) in Neo4J Desktop and install APOC
- Clone latest version of this repo from master
cd api && npm install
npm start
npm run seedDb
in second terminal
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)
}
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.