Skip to content

catcatio/catcat-inventory-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catcat-inventory-web

CatCat inventory web version

Source

https://www.prisma.io/docs/tutorials/bootstrapping-boilerplates/react-(fullstack)-tijghei9go/

image

To develop

  1. Up prisma, postgres, pgadmin image
    cd dev
    . up
    
  2. Prisma server image
    cd web/server
    yarn dev
    
  3. Apollo web client image
    cd web
    yarn install
    yarn start
    
  4. PostgreSQL admin image
    • open http://localhost:5050
    • Connection : postgres
    • SSL : Disable

To update data model (e.g. add coverUrl)

./web/server/database/datamodel.graphql Add coverUrl

type Post {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  isPublished: Boolean! @default(value: "false")
  title: String!
  text: String!
  author: User!
  coverUrl: String
}

Then re deploy

prisma deploy
prisma generate

Then add missing data

mutation {
  updateManyPosts(
    where: { coverUrl: null }
    data: { coverUrl: "https://avatars1.githubusercontent.com/u/36980416" }
  ) {
    count
  }
}

TODO

About

CatCat inventory web version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published