UNPKG

astro-loader-hashnode

Version:

Astro content loader for seamlessly integrating Hashnode blog posts into your Astro website using the Content Layer API

22 lines (21 loc) 6.33 kB
/** * GraphQL query utilities */ export declare const QUERIES: { readonly SEARCH_POSTS: "\n query SearchPosts($first: Int!, $after: String, $filter: SearchPostsOfPublicationInput!) {\n searchPostsOfPublication(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n id\n cuid\n title\n subtitle\n brief\n slug\n url\n content {\n html\n }\n coverImage {\n url\n attribution\n isPortrait\n isAttributionHidden\n }\n publishedAt\n updatedAt\n readTimeInMinutes\n views\n reactionCount\n responseCount\n replyCount\n author {\n id\n name\n username\n profilePicture\n bio {\n html\n text\n }\n followersCount\n }\n tags {\n id\n name\n slug\n }\n seo {\n title\n description\n }\n ogMetaData {\n image\n }\n series {\n id\n name\n slug\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n "; readonly GET_DRAFT_BY_ID: "\n query GetDraftById($id: ObjectId!) {\n draft(id: $id) {\n id\n title\n canonicalUrl\n subtitle\n features {\n tableOfContents {\n isEnabled\n items {\n id\n level\n parentId\n slug\n title\n }\n }\n }\n content {\n markdown\n }\n coverImage {\n url\n }\n author {\n id\n name\n username\n profilePicture\n }\n updatedAt\n tags {\n id\n name\n slug\n }\n }\n }\n "; readonly GET_USER_DRAFTS: "\n query GetUserDrafts($first: Int = 20) {\n me {\n drafts(first: $first) {\n edges {\n node {\n id\n title\n subtitle\n content {\n markdown\n }\n coverImage {\n url\n }\n author {\n id\n name\n username\n profilePicture\n }\n updatedAt\n tags {\n id\n name\n slug\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n "; }; export declare const searchPostsQuery: () => "\n query SearchPosts($first: Int!, $after: String, $filter: SearchPostsOfPublicationInput!) {\n searchPostsOfPublication(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n id\n cuid\n title\n subtitle\n brief\n slug\n url\n content {\n html\n }\n coverImage {\n url\n attribution\n isPortrait\n isAttributionHidden\n }\n publishedAt\n updatedAt\n readTimeInMinutes\n views\n reactionCount\n responseCount\n replyCount\n author {\n id\n name\n username\n profilePicture\n bio {\n html\n text\n }\n followersCount\n }\n tags {\n id\n name\n slug\n }\n seo {\n title\n description\n }\n ogMetaData {\n image\n }\n series {\n id\n name\n slug\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n "; export declare const getDraftByIdQuery: () => "\n query GetDraftById($id: ObjectId!) {\n draft(id: $id) {\n id\n title\n canonicalUrl\n subtitle\n features {\n tableOfContents {\n isEnabled\n items {\n id\n level\n parentId\n slug\n title\n }\n }\n }\n content {\n markdown\n }\n coverImage {\n url\n }\n author {\n id\n name\n username\n profilePicture\n }\n updatedAt\n tags {\n id\n name\n slug\n }\n }\n }\n "; export declare const getUserDraftsQuery: () => "\n query GetUserDrafts($first: Int = 20) {\n me {\n drafts(first: $first) {\n edges {\n node {\n id\n title\n subtitle\n content {\n markdown\n }\n coverImage {\n url\n }\n author {\n id\n name\n username\n profilePicture\n }\n updatedAt\n tags {\n id\n name\n slug\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n "; /** * Build dynamic GraphQL query with conditional fields */ export declare function buildDynamicPostsQuery(options: { includeComments?: boolean; maxComments?: number; includeCoAuthors?: boolean; includeTableOfContents?: boolean; includePublicationMeta?: boolean; }): string;