create account

Glasnost v0.13 released: GraphQL API for Steem blockchain by ontofractal

View this thread on: hive.blogpeakd.comecency.com
· @ontofractal ·
$88.67
Glasnost v0.13 released: GraphQL API for Steem blockchain
![](http://i.imgur.com/1hzfw2x.jpg)
Glasnost transformation into a GraphQL API server is now complete, access to Steem/Golos blockchain data is now possible using GraphQL queries.

# Repos

### [Glasnost Docker hub](https://hub.docker.com/r/ontofractal/glasnost)
### [Glasnost Github Repo](https://github.com/cyberpunk-ventures/glasnost)


# Configuration

Glasnost now requires a PostgreSQL database.

You need to configure the following Postgres database parameters using the Docker ENV variables:

* GLASNOST_DB
* GLASNOST_DB_HOST
* GLASNOST_DB_PORT
* GLASNOST_DB_USERNAME
* GLASNOST_DB_PASSWORD

Other parameters, such as PORT, STEEM_URL and GOLOS_URL, can be configured in the Docker file.

# Changelog

* Added an extractor for the Postgres database, which synchronizes new posts and comments in real time and looks back for comments over last 7 days
* Added a `/graphql` GraphQL API endpoint with `comments` and `comment` objects (see examples below)
* Added an interactive browser-based GraphiQL client at `/graphiql` route
* Previous admin and static HTML pages were completely removed
* Updated docker image
* A lot of various bugfixes and improvements


# Examples of GraphQL queries

```
{
  comments(blockchain: "steem", author: "ontofractal") {
    id,
    title,
    author,
    permlink,
    created,
    totalPayoutValue,
    pendingPayoutValue
  }
}
```


```
{
  comment(blockchain: "steem", author: "ontofractal", permlink: "glasnost-v0-12-released-now-with-postgresql-realtime-and-7-day-lookback-comments-data-sync-open-source-app-server-for-steem") {
    id,
    title,
    created,
    totalPayoutValue,
    pendingPayoutValue
  }
}
```

# Road map

In the next release, I plan to expand the capabilities of GraphQL resolvers and add filters, sorting, and a new type of queries for statistics.

Among future features:

* Convenient websockets APIs for accessing blockchain data
* Performant, low latency APIs
* Advanced filters and content display settings
* real-time streams of enriched blockchain events


# Technologies

* Elixir
* Phoenix
* GraphQL
* PostgreSQL

# What's Glasnost?
Read more about Glasnost and its roadmap in the [introduction post](https://steemit.com/steemit/@ontofractal/ann-introducing-glasnost-alpha-open-source-blog-and-app-server-for-steem-golos-blockchains)

# Development process
Glasnost is a single code base developed simultaneously both for Steem and Golos blockchains. Sustainable Glasnost development is made possible by generous support of Steem and Golos communities and @cyberfund program to support Golos open source ecosystem. Read more about Golos and cyberfund open source support in this [post](https://steemit.com/golos/@hipster/golos-follows-steem-path-with-slight-economic-changes) by @hipster.

# Feedback
Please submit bugs, issues or feature requests to Github. Also get in touch with me: ontofractal at protonmail.com or steemit.chat.

<center> (ノ◕ヮ◕)ノ*:・゚✧ </center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 9 others
properties (23)
authorontofractal
permlinkglasnost-v0-13-released-graphql-api-for-steem-blockchain
categorysteemdev
json_metadata{"tags":["steemdev","steem","steemit","golos"],"users":["cyberfund","hipster"],"image":["http://i.imgur.com/1hzfw2x.jpg"],"links":["https://hub.docker.com/r/ontofractal/glasnost","https://github.com/cyberpunk-ventures/glasnost","https://steemit.com/steemit/@ontofractal/ann-introducing-glasnost-alpha-open-source-blog-and-app-server-for-steem-golos-blockchains","https://steemit.com/golos/@hipster/golos-follows-steem-path-with-slight-economic-changes"],"app":"steemit/0.1","format":"markdown"}
created2017-09-05 17:11:51
last_update2017-09-05 17:11:51
depth0
children4
last_payout2017-09-12 17:11:51
cashout_time1969-12-31 23:59:59
total_payout_value70.643 HBD
curator_payout_value18.024 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,942
author_reputation61,670,850,962,884
root_title"Glasnost v0.13 released: GraphQL API for Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id13,967,371
net_rshares26,235,491,784,927
author_curate_reward""
vote details (73)
@andybets ·
This looks great! I'm not sure how I hadn't come across the project before.
properties (22)
authorandybets
permlinkre-ontofractal-glasnost-v0-13-released-graphql-api-for-steem-blockchain-20170908t085133414z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-09-08 08:51:33
last_update2017-09-08 08:51:33
depth1
children0
last_payout2017-09-15 08:51:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length75
author_reputation15,189,090,569,005
root_title"Glasnost v0.13 released: GraphQL API for Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,232,202
net_rshares0
@cryptomaker ·
Realy good post.i resteem this post.best of luck
properties (22)
authorcryptomaker
permlinkre-ontofractal-glasnost-v0-13-released-graphql-api-for-steem-blockchain-20170905t171503060z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-09-05 17:15:06
last_update2017-09-05 17:15:06
depth1
children0
last_payout2017-09-12 17:15:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length48
author_reputation17,042,683,569,275
root_title"Glasnost v0.13 released: GraphQL API for Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id13,967,687
net_rshares0
@gtg ·
Keep up the good work, @ontofractal :-)
properties (22)
authorgtg
permlinkre-ontofractal-glasnost-v0-13-released-graphql-api-for-steem-blockchain-20170905t175757815z
categorysteemdev
json_metadata{"tags":["steemdev"],"users":["ontofractal"],"app":"steemit/0.1"}
created2017-09-05 17:57:57
last_update2017-09-05 17:57:57
depth1
children0
last_payout2017-09-12 17:57:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation461,808,784,648,801
root_title"Glasnost v0.13 released: GraphQL API for Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id13,971,322
net_rshares0
@ladu ·
Nice one
properties (22)
authorladu
permlinkre-ontofractal-glasnost-v0-13-released-graphql-api-for-steem-blockchain-20170905t190502798z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-09-05 19:05:09
last_update2017-09-05 19:05:09
depth1
children0
last_payout2017-09-12 19:05:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8
author_reputation238,580,540,620
root_title"Glasnost v0.13 released: GraphQL API for Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id13,976,805
net_rshares0