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
commentsofpostsinside auserquery (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
Projects using steemQL:
- Insteem Web
- Insteem App (React Native, available via Expo)
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.
If you're not familiar with GraphQL, here you go.
Posted on Utopian.io - Rewarding Open Source Contributors