Socket
Socket
Sign inDemoInstall

github.com/dfuse-io/dgraphql

Package Overview
Dependencies
34
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/dfuse-io/dgraphql


Version published

Readme

Source

dfuse GraphQL API Services for Blockchains

reference License

This service is the API for querying blockchain data using GraphQL. It is part of dfuse.

Installation

See the different protocol-specific dfuse binaries at https://github.com/dfuse-io/dfuse#protocols

Current dgraphql implementations:

  • dfuse for EOSIO
  • dfuse for Ethereum, soon to be open sourced

Usage

Connecting from command-line clients

  • Using https://github.com/Gavinpub/ws (which supports subprotocol negotiation)

    ws -s graphql-ws ws://127.0.0.1:8080/graphql

    {"id":"3","type":"connection_init","payload":{"Authorization":"Bearer ......"},"variables":null}}

    {"id":"3","type":"start","payload":{"query":"subscription{searchTransactionsForward(query: "status:executed", lowBlockNum:0, highBlockNum:0){ trace{ block { num } id }}}","variables":null}}

    {"id":"3","type":"start","payload":{"query":"subscription{searchTransactionsForward(query: "status:executed", lowBlockNum:0, highBlockNum:0){ trace{ block { num } id }}}","variables":null}}

  • Using curl:

    curl http://localhost:8080/graphql -XPOST -d '{"query": "{ searchTransactionsForward(limit: 10, query: "status:executed") { cursor } }"}' -H "Authorization: Bearer $DFUSE" | jq .

    curl http://localhost:8080/graphql -XPOST -d '{"query": "{ blockIDByTime(time: "2019-01-01T00:00:00Z") { time num } }"}' -H "Authorization: Bearer $DFUSE" | jq .

Contributing

Issues and PR in this repo related strictly to the core dgraphql API engine

Report any protocol-specific issues in their respective repositories

Please first refer to the general dfuse contribution guide, if you wish to contribute to this code base.

This codebase uses unit tests extensively, please write and run tests.

License

Apache 2.0

FAQs

Last updated on 23 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc