This is a boilerplate to start using hyperledger fabric blockchain with GraphQL
- based on: fabric-boilerplate
- based on GraphQL boilerplate code: graphql-dataloader-boilerplate
- Create-GraphQL was used to generate GraphQL boilerplate
You can hire us to build your next blockchain project using Hyperledger and GraphQL - Entria
brew install go
mkdir ~/.go
add this to .bashrc
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
yarn go:install
then
yarn go:build
Clear content of deploy/local before creating new containers
yarn clear
docker-compose up
go to http://localhost:7050/chain
go to http://localhost:9090
yarn run go:test
yarn repl
Query data for an entity (a and b are the valid entities for now)
bl > queryEntity('a')
Transfer coins from an entity to another
bl > transfer('a', 'b', 10)
mutation deployChain {
Deploy(input: {
fcn:"init"
args: ["a", "100", "b", "200"]
clientMutationId:"1"
}) {
results
}
}