( limit = 5, userId: string, )
| 3 | import { TOP_READER_BADGE, TOP_READER_BADGE_BY_ID } from '../graphql/users'; |
| 4 | |
| 5 | export const fetchTopReaders = async ( |
| 6 | limit = 5, |
| 7 | userId: string, |
| 8 | ): Promise<TopReader[]> => { |
| 9 | const { topReaderBadge } = await gqlClient.request<{ |
| 10 | topReaderBadge: TopReader[]; |
| 11 | }>(TOP_READER_BADGE, { |
| 12 | limit, |
| 13 | userId, |
| 14 | }); |
| 15 | |
| 16 | return topReaderBadge; |
| 17 | }; |
| 18 | |
| 19 | export const fetchTopReaderById = async ( |
| 20 | badgeId: string, |
no outgoing calls
no test coverage detected