Function
getToolTopPosts
(
tag: string,
first = 5,
)
Source from the content-addressed store, hash-verified
| 289 | `; |
| 290 | |
| 291 | export const getToolTopPosts = async ( |
| 292 | tag: string, |
| 293 | first = 5, |
| 294 | ): Promise<ToolTopPost[]> => { |
| 295 | const result = await gqlClient.request<{ |
| 296 | page?: { edges?: { node: ToolTopPost }[] }; |
| 297 | }>(TOOL_TOP_POSTS_QUERY, { tag, first }); |
| 298 | return ( |
| 299 | result.page?.edges?.map(({ node }) => node).filter((post) => post.title) ?? |
| 300 | [] |
| 301 | ); |
| 302 | }; |
| 303 | |
| 304 | export interface ToolAdoptionPoint { |
| 305 | date: string; |
Tested by
no test coverage detected