Remove unused shareInfo from GQL queries

This commit is contained in:
Jackson Harper 2022-03-11 13:12:34 -08:00
parent bf8d99e0f1
commit f9af4ec2d8
5 changed files with 2 additions and 28 deletions

View file

@ -23,9 +23,7 @@ export function ArticleHighlights(props: ArticleHighlightsProps): JSX.Element {
<PrimaryLayout
pageMetaDataProps={{
title: props.publicArticle.title,
description:
props.publicArticle.shareInfo?.description ||
props.publicArticle.description,
description: props.publicArticle.description,
path: router.pathname,
ogImage: props.previewImagePath,
ogImageType: 'image/png',

View file

@ -44,17 +44,11 @@ export type ArticleAttributes = {
slug: string
savedByViewer?: boolean
content: string
shareInfo?: ArticleShareInfo
highlights: Highlight[]
linkId: string
labels?: Label[]
}
type ArticleShareInfo = {
title?: string
description?: string
}
const query = gql`
query GetArticle(
$username: String!
@ -66,10 +60,6 @@ const query = gql`
article {
...ArticleFields
content
shareInfo {
title
description
}
highlights(input: { includeFriends: $includeFriendsHighlights }) {
...HighlightFields
}

View file

@ -67,10 +67,6 @@ export function useGetArticleSavingStatus({
article {
...ArticleFields
content
shareInfo {
title
description
}
highlights(input: { includeFriends: false }) {
...HighlightFields
}

View file

@ -33,15 +33,9 @@ export type PublicArticleAttributes = {
image?: string
description?: string
hasContent?: boolean
shareInfo?: PublicArticleShareInfo
highlights: Highlight[]
}
type PublicArticleShareInfo = {
title?: string
description?: string
}
export const PublicArticleGQLFragment = gql`
fragment PublicArticle on Article {
id
@ -54,10 +48,6 @@ export const PublicArticleGQLFragment = gql`
savedByViewer
postedByViewer
hasContent
shareInfo {
title
description
}
highlights {
id
shortId

View file

@ -45,7 +45,7 @@ export default function Home(): JSX.Element {
pageMetaDataProps={{
title: article.title,
path: router.pathname,
description: article.shareInfo?.description || article.description,
description: article.description,
}}
>
<Toaster />