Git Product home page Git Product logo

apollo-link-ethereum's Introduction

Apollo Link Ethereum Banner

Apollo Link Ethereum Version on NPM ย  Apollo Link Ethereum Downloads on NPM


Apollo Link Ethereum

apollo-link-ethereum allows you to use GraphQL to speak directly to a smart contract on the Ethereum blockchain. The package integrates with Apollo Client as a link. There are several resolvers so that you can resolve web3 calls using either web3js 1.0 or Ethers.js. A separate mutations package is available to actually execute transactions (currently only supports ethers.js).

Please see the documentation for each package for more information.

Package Description
apollo-link-ethereum The base package
apollo-link-ethereum-resolver-ethersjs Resolve calls using Ethers.js
apollo-link-ethereum-mutations-ethersjs Send transactions with Ethers.js
apollo-link-ethereum-resolver-web3js Resolve calls using Web3js 1.0

Examples

Example DApps

  1. Here's a simple read-only Example DApp:
    apollo-link-ethereum-example.

  2. A more in-depth application supporting both Ethereum reads (calls) and writes (transactions):
    ZeppelinOS Registry

Installation

You'll need to install the base package apollo-link-ethereum and one of the resolver packages. If you'd like to execute transactions you should also install the mutations package for the bindings you've selected. Currently there is only a mutations package for Ethers.js.

Development

We use yarn and lerna. Run yarn to install the lerna dependency:

$ yarn

Then use lerna to set up the child packages:

$ lerna bootstrap

Live compilation

The yarn watch command runs both the typescript transpilation and rollup to build the JS into a distributable:

$ yarn watch

apollo-link-ethereum's People

Contributors

asselstine avatar chuckbergeron avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.