Skip to content

Latest commit

 

History

History
81 lines (53 loc) · 939 Bytes

README.md

File metadata and controls

81 lines (53 loc) · 939 Bytes

simple graphql bingding

with prisma provider basic graphql server

start prisma server

  • install prisam cli
npm install -g prisma
  • deploy prisma service
cd appdemo
docker-compose up -d

prisma deploy

  • access address
http://localhost:4466
  • add some data

images

mutation {
  createUser(data:{
    name:"demoapp"
  }){
    id
    name
  }
}

basic graphql binding

  • generate graphql schema
npm install -g get-graphql-schema

get-graphql-schema http://localhost:4466 > myuser-graphql-binding/schemas/datamodel.graphql
  • some bingding code && install deps
see myuser-graphql-binding
yarn

how to use bingding

  • use npm link generate local npm call
in root direcroty

npm link myuser-graphql-binding
  • use bingding
cd user-bingding-useage
yarn start
  • result

images