feat: get-blog-detail and relevant blogs

This commit is contained in:
Quangnhankie
2021-10-20 10:11:07 +07:00
parent abea83cdd6
commit 7ea734d0ad
16 changed files with 459 additions and 98 deletions

View File

@@ -2337,10 +2337,19 @@ export type BlogList = Node &{
translations: Array<BlogTranslation>
authorName: Scalars['String']
authorAvatarAsset:Asset
relevantProducts: Product
relevantProducts: Product[]
isFeatured: Boolean
}
export type GetBlogQuery = { __typename?: 'Query' } & {
blog?: Maybe<
{ __typename?: 'Blog' } & BlogList
>
}
export type BlogTranslation = {
__typename?: 'BlogTranslation'
id: Scalars['ID']
@@ -2359,6 +2368,13 @@ export type GetAllBlogsQuery = PaginatedList & {
'totalItems'
}
}
export type GetRelevantBlogsQuery = PaginatedList & {
relevantBlogs: { __typename?: 'BlogList' } & {
items: Array<{ __typename?: 'Blog' } & BlogList!>,
}
}
export type GetFeaturedBlogQuery = PaginatedList & {
id:string,
featuredBlogs: { __typename?: 'BlogList' } & {
@@ -2367,6 +2383,7 @@ export type GetFeaturedBlogQuery = PaginatedList & {
}
}
export type QueryBlogs = {
excludeBlogIds:Array,
options: BlogListOptions
@@ -3339,6 +3356,12 @@ export type GetAllProductPathsQuery = { __typename?: 'Query' } & {
items: Array<{ __typename?: 'Product' } & Pick<Product, 'slug'>>
}
}
export type GetAllBlogPathsQuery = { __typename?: 'Query' } & {
blogs: { __typename?: 'BlogList' } & {
items: Array<{ __typename?: 'Blog' } & Pick<BlogList,'slug','translations'>>
}
}
export type GetAllProductsQueryVariables = Exact<{
input: SearchInput