grand-stack / grand-stack-starter

Simple starter project for GRANDstack full stack apps

Home Page:https://grandstack.io/docs/getting-started-grand-stack-starter.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  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

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.