@dhruvparmar Is there a way to upvote using this API? I don't see a mutation for that? Also, what will be the validity for the access_grant_token & access_token?
@dhruvparmar Seems like doing a "goals" query keeps returning a 204 (no content) for me. It works fine from the API explorer, but any call to this endpoint from my code succeeds but doesn't return anything. Any idea on what may be up with this?
EDIT: This has now been resolved on the server-side.
@dhruvparmar Hi, I've got a quick question about mutations. When attempting to mark a goal as complete, I only get returned {"data":{"goalMarkAsComplete":{"node":null}}}
Is this intentional? As it doesn't actually seem to perform the action. Here is my request:
mutation {
goalMarkAsComplete(input: {clientMutationId: "\(clientId)", goalId: \(goalId)}) {
node {
id, completedAt, createdAt, title, user {
name, id, profileImage, username
}
}
}
}
And what is the clientMutationId? Is it just a random String or the client ID that's retrieved when authenticating?
EDIT: After looking at the error, it's an access_denied error, any way to resolve this?
@dhruvparmar I see some planned updates to APIs here and see recent changes on github. Will the docs be updated asap or do we need to keep an eye here and on github?
@wayfarerish hey, any updates to the GraphQL interface of the API will always reflect in the reference here http://api-v2-docs.producthunt.c...
Unfortunately we don't have a change-log yet so we've decided to publish those updates here as well for the Makers festival participants.
@dhruvparmar Thanks. I'll figure something out. I see that the order of media in the API is different than that on the website. is that bug or website uses some type of sorting?
@dhruvparmar hi, still pretty new on this graphql things, but it seem like no way to filter the records ? like if I want to filter all my goals that complete only ? I can only fetch all and filter locally ?
@imknight hey, you can filter "goals" by using "completed" flag here http://api-v2-docs.producthunt.c...
Setting `completed: true` on the query will result in only completed goals being fetched.
@dhruvparmar Hello, how can I get all user following and do not rest against the limit of the API?
For example, I want to see what people which I follow do on PH(upvote something, comment, add/finish goal)
@nikolay_siabrenko you can look up "followers" for a user. check here http://api-v2-docs.producthunt.c...
If you run into rate limit issues try fetching "followers" on a per "user" basis. http://api-v2-docs.producthunt.c...
We do not support subscriptions as of now, so to get a "user"'s activity you would have to regularly poll for the specific data and detect changes in that on your end. For e.g
1. To detect if a user upvoted a new post, you could poll for "votedPosts" list on the "user" object.
2. To detect changes to user's goal, you can poll "goals(userId: idOfUser)" connection with 'NEWEST' filter.
@amitchambial hey, we've just released some fixes to the API. could you retry the same mutation?
Incase the issue still persists, please write to us at hello@producthunt.com with your API Key & the input you are using for the mutation.
Report
@dhruvparmar
Hi,
I am facing a problem with pagination when I query "posts" ordered by votes , where "hasNextPage" field is always false.
My query is
{
posts (order:VOTES, after:"MjA=") {
edges{
node{
id
name
votesCount
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
For this query "hasNextPage" field is always coming as false.
Also the order of nodes I am getting is not exactly in order for instance , this is one of the ouputs where post are not in proper descending order.
{
"node": {
"id": "100183",
"name": "Feather Icons",
"votesCount": 5118
}
},
{
"node": {
"id": "53552",
"name": "Carrd",
"votesCount": 4723
}
},
{
"node": {
"id": "52794",
"name": "Stripe Atlas (Pre-Launch)",
"votesCount": 4890
}
},
{
"node": {
"id": "25535",
"name": "Startup Launch List",
"votesCount": 4890
}
},
{
"node": {
"id": "108401",
"name": "Sublime Text 3.0",
"votesCount": 5122
}
},
Report
@dhruvparmar Also what I have noticed that not all the products are present in the output, when I use the UI I can see many other products which are missing from the API output.
Example "remove.bg" which should be 3rd in terms of votes is not present in the output but "Startup Pitch Decks" is present at 3rd position.
{
"node": {
"id": "14717",
"name": "Startup Stash",
"votesCount": 18382
}
},
{
"node": {
"id": "76",
"name": "Slack",
"votesCount": 14591
}
},
{
"node": {
"id": "75048",
"name": "Startup Pitch Decks",
"votesCount": 9388
}
},
@vaibhav_soulskill hey, we have an existing issue with pagination. Please add "(first: 20)" to the connection params for now. I'll update here once the issue is fixed.
Replies
YourStack
Bulletin
YourStack
NewsletterStash
Ahey
YourStack
YourStack
Bulletin
Bulletin
Bulletin
YourStack
Bulletin
Makerbox for Product Hunt
YourStack
Makerbox for Product Hunt
NewsletterStash
YourStack
NewsletterStash
Scout
YourStack
Scout
Upvote Bell
YourStack
Upvote Bell
YourStack
Goals 2.0
YourStack
YourStack