Dhruv Parmar

API Support

Facing any issues with the API? Share them here
376 views

Add a comment

Replies

Best
Raghuv Adhepalli
Hi @dhruvparmar, can you provide the ability to filter through all "Post" objects that have a "Media" object with videoUrl. Thanks.
Dhruv Parmar
@raghuv_adhepalli I'm afraid we wouldn't be adding that filter for now as it's quite specific use case, alternatively you could iterate through the "posts" collection and build list of posts with videoUrl on your application.
Knight 
@dhruvparmar the same mutation work on API Explorer and not on local dev, could that my account not grant for write access scope ? but I already apply, will I get a confirmation ?
Dhruv Parmar
@imknight I've approved write access for your application. Let me know incase you're facing issues with mutations still.
Nikolay Siabrenko
@dhruvparmar Hello, find a bug in pageInfo, if you use query without first param, hasNextPage always false, but by default - first: 20 { viewer { user { following(after: "", first: 20) { totalCount pageInfo { endCursor, hasNextPage } edges { cursor node { id } } } } } }
Dhruv Parmar
@nikolay_siabrenko hey, thanks for reporting the issue, I can confirm it's a bug and we'll be working on fixing it. Unfortunately the issue exists in one of the 3rd party packages we use internally so it might be a while before the fix is in. I'd suggest going with always including `first: 20` in the connection variables for now.
Jan Zikán
@dhruvparmar Are you planning to provide information about new upvotes? I would love to be able to get list of post IDs with respective upvote DateTime. Edit: Just found out that this feature was supported in API v1: https://api.producthunt.com/v1/d...
Nikolay Siabrenko
@dhruvparmar @janzikan Yeah, it would be good to see upvotes history
Dhruv Parmar
@janzikan @nikolay_siabrenko We are considering adding ability to fetch `votes` on Post/Comments etc. I'll keep you guys updated here once it's implemented.
Vladyslav P.
Hey @dhruvparmar 👋 After submitting the write API access request as part of the Makers Festival registration, haven't heard anything back regarding the status of that access request. Is there a way to follow up on this? Happy Making to the Makers 🚀✅
Dhruv Parmar
@vpiskunov Hey, the application with API Key submitted by you has been granted write access on our end. Can you try running sample mutations on your end ? Let us know if you face any issues with that.
Vladyslav P.
@dhruvparmar sure, didn’t get any notification or feedback on that. Will try running them in the morning!
Zaki Khan
@dhruvparmar When we create a Maker profile, there are skills it asks us to enter. However, these skills are not available via the API as far as I can see from the documentation. Is this something that will be added?
Dhruv Parmar
@heyzeekay hey, we don't plan on adding maker profile on-boarding to the API as of now. Third party apps can still create goals on behalf of user's who are not makers, only they will be prompted to go through the on-boarding once they visit PH.
Dhruv Parmar
API Update: 1. Added ability to fetch "votes" on a Post or Comment. Supports filtering votes by "createdBefore" & "createdAfter" params. Results are ordered with newest votes coming first. http://api-v2-docs.producthunt.c... http://api-v2-docs.producthunt.c... 2. Added "userFollow" & "userFollowUndo" mutations. http://api-v2-docs.producthunt.c... http://api-v2-docs.producthunt.c... For further details check out the GraphQL reference here http://api-v2-docs.producthunt.c... cc @janzikan @nikolay_siabrenko
Jan Zikán
@nikolay_siabrenko @dhruvparmar Great job! Would it be possible to provide votes as query? The use case I am thinking of is to trigger an action when a post reaches a certain amount of upvotes. II do not want to track the number of upvotes for a specific post but for all posts - for example show post on a webpage once it reaches 100 upvotes.
Dhruv Parmar
@janzikan hey, we do not plan on exposing "votes" on the root query, as "votes" should always be fetched in the context of a Votable type. For your use case I'd suggest going with something like this 1. Fetch posts ordered by VOTES everyday 2. Filter out posts which could hit the threshold (100 in this case) and trigger polling the "post(id: postId)" field for them. I know this is not ideal, but probably something that could work. Don't worry about the number of requests as we can increase your rate limit quotas if you start getting blocked by them.
Jan Zikán
@dhruvparmar Better solution would be to be able to filter posts that have upvotes count greater than X and to order them by VOTES but in descending order. Are you planning to implement option for ordering so we choose whether the results should be ordered in ascending or descending order? Are you planning to implement filtering for the queries?
Dhruv Parmar
@janzikan the VOTES option sorts posts in descending order of votes count currently. We don't have plans to add filtering for the votes query as of now. Regarding ability to define the sort order, we'll try to incorporate this into the API. I'll share an update here once it's implemented.
Rishi
@dhruvparmar hey again! also is there an issue if the redirect uri is a subdomain? does it have to be a root domain? having issues when it's a subdomain
Dhruv Parmar
@wayfarerish i'm not sure about this, will have to get back to you on this. cc @devladinci
Sarun W.
@dhruvparmar would be good if we can filter goals currently in focus mode.
Dhruv Parmar
@sarunw hey, that's a good suggestion. I'll update here once we implement that.
Rishi
@dhruvparmar Hey Dhruv! What exactly is the use of 'clientMutationId' in goalCreate/Update mutations? It seems to work even if it is null. Are there any examples? Sorry, new to GQL.
Dhruv Parmar
@wayfarerish hey "clientMutationId" is a unique identifier used to track the mutation. In most cases this is not required so you can ignore it. Read more here https://facebook.github.io/relay...
Rishi
@dhruvparmar thank you!