Blog April 9, 2020
MetaMate provides a common interface to all kinds of network-conntected data sources. One of them is HackerNews. Let’s use MetaMate’s graphql interface to query the HN landing page.
To your MetaMate, HN is a service that provides PostFeeds
, Posts
and SocialAccounts
.
Get PostFeeds
Alright, let’s see what PostFeeds
the hackernews
Service returns.
How does a service filter work?
MetaMate is a semantic service bus that orchestrates querying data from multiple services. A developer can specify a serviceFilter
to narrow down the services the request will be routed to.
Filter for top stories
The hackernews
service returns HN well-known feeds. For now, we are only interested in HN’s top stories. Let’s filter out all feeds we aren’t interested in.
How does a filter work?
By specifying a filter, the result set will be filtered. The actual filtering might be handled by MetaMate itself or by an upstream service.
Get the feed’s links
Next we want to get the links that are posted in the top stories section. What a link is to Hacker News is modelled as a Post
in MetaMate. To obtain the posts, we now also request the PostFeed
’s relation containsPosts
.
How to setup a MetaMate?
Please have a look at the installation instructions
Search HN
Now we want to look for a good weekend’s read. Let’s search Posts
for book recommendations
.
What’s next?
MetaMate’s just getting started. We’ll have a look at more features, provide guides on how to add backends to your MetaMate, share the roadmap and more.
If that sounds interesting to you, make sure to subscribe