steemQL 0.6.1 - Query related steem data with GraphQL

in #utopian-io7 years ago (edited)

Another step forward for steemQL, the GraphQL server for Steem. This update adds the ability to query related data.
This enables you to fetch data for a single user including e.g. his 10 last posts in just one query. And you can decide which properties of user and posts you need to get, something like user.name, user.id, user.post.title, user.post.body. No need to transfer unused data over the wire for your app. Also these subqueries take their own params, so you can configure the number of posts or or truncate the text of the body of posts inside a user queries. Have fun..

New Features

  • Get users with related posts in one query (for an example see below and screenshot)
  • Get posts with complete related user data in one query (the above reversed)

Roadmap

  • Improve the above queries with more related data, e.g. get all comments of posts inside a user query (building a ‘Graph’ of data)
  • Simplified return values for complex data structures like json_metadata, no need to parse it on your own
  • Subscriptions for post/comment related queries, to use with GraphQL Clients like Apollo

Contribution

Any kind of contribution is welcome, mainly feedback and feature requests.

GitHub: steemQL

Discord: https://discord.gg/NgezG

steemit.chat: @sarasate

Projects using steemQL:

steemQL In Action

The whole Insteem Site is using steemql. If you wanna figure out who mentioned you in a post or comment, have a look here: https://www.insteem.com/mentions/@sarasate

Here is a sample query to get user including his latest posts in 1 query:

{
  user(username: "sarasate") {
    id
    name
    balance
    created
    posts(query: {limit: 5, truncate_body: 10}) {
      id
      title
      body
      created
    }
  }
}

Play with it: steemQL Server. To get documentation for available queries, hit the green Schema button on the right.

Screen Shot 2018-02-09 at 11.01.00.png

If you're not familiar with GraphQL, here you go.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.

[utopian-moderator]

Hey @ms10398, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @sarasate I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x