Blog url in api for posts
complete
Floffah
I would like for there to be a blog url passed in the graphql api for getting posts as i am currently creating a Discord bot for hashnode and it has to guess the url based on their username and the slug/cuid therefore doesn't take into account custom domains. Thank you!
Log In
Sandro Volpicella
marked this post as
complete
Hi Floffah
this is possible with our new API. The playground is available here: https://gql.hashnode.com
We also have a beta program in case you want to help us building some cool APIs :) https://townhall.hashnode.com/hashnode-public-apis-2-closed-beta
Here is an example query:
{
publication(host: "blog.awsfundamentals.com") {
posts(first: 2) {
edges {
node {
title
subtitle
url
}
}
}
}
}
See the URL field 😉
Kavir
marked this post as
in progress
Sandro Volpicella
Hi Floffah
this is possible with our new API. The playground is available here: https://gql.hashnode.com
We also have a beta program in case you want to help us building some cool APIs :) https://townhall.hashnode.com/hashnode-public-apis-2-closed-beta
Here is an example query:
{
publication(host: "blog.awsfundamentals.com") {
posts(first: 2) {
edges {
node {
title
subtitle
url
}
}
}
}
}
See the URL field 😉
Kavir
Hi Floffah we're working on improvements to our APIs and will provide an update on this soon!