44 lines
786 B
TypeScript
44 lines
786 B
TypeScript
import { gql } from 'graphql-request'
|
|
|
|
export const articleFragment = gql`
|
|
fragment ArticleFields on Article {
|
|
id
|
|
title
|
|
url
|
|
author
|
|
image
|
|
savedAt
|
|
createdAt
|
|
publishedAt
|
|
contentReader
|
|
originalArticleUrl
|
|
readingProgressPercent
|
|
readingProgressAnchorIndex
|
|
slug
|
|
isArchived
|
|
description
|
|
linkId
|
|
}
|
|
`
|
|
|
|
export type ContentReader = 'WEB' | 'PDF'
|
|
|
|
export type ArticleFragmentData = {
|
|
id: string
|
|
title: string
|
|
url: string
|
|
author?: string
|
|
image?: string
|
|
savedAt: string
|
|
createdAt: string
|
|
publishedAt?: string
|
|
contentReader?: ContentReader
|
|
originalArticleUrl: string
|
|
readingProgressPercent: number
|
|
readingProgressAnchorIndex: number
|
|
slug: string
|
|
isArchived: boolean
|
|
description: string
|
|
linkId?: string
|
|
}
|