Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit bec1cd5

Browse files
committed
Add comments to post and page pages
1 parent 04851f6 commit bec1cd5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

api/wordpress/pages/queryPageById.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import authorPostFields from '../_partials/authorPostFields'
44
import featuredImagePostFields from '../_partials/featuredImagePostFields'
55
import {gql} from '@apollo/client'
66
import defaultSeoFields from '../_partials/defaultSeoFields'
7+
import commentsPostFields from '../_partials/commentsPostFields'
78

89
// Fragment: retrieve single page fields.
910
export const singlePageFragment = gql`
@@ -14,6 +15,7 @@ export const singlePageFragment = gql`
1415
${seoPostFields}
1516
${authorPostFields}
1617
${featuredImagePostFields}
18+
${commentsPostFields}
1719
}
1820
`
1921

api/wordpress/posts/queryPostById.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import tagsPostFields from '../_partials/tagsPostFields'
66
import categoriesPostFields from '../_partials/categoriesPostFields'
77
import {gql} from '@apollo/client'
88
import defaultSeoFields from '../_partials/defaultSeoFields'
9+
import commentsPostFields from '../_partials/commentsPostFields'
910

1011
// Fragment: retrieve single post fields.
1112
const singlePostFragment = gql`
@@ -18,6 +19,7 @@ const singlePostFragment = gql`
1819
${featuredImagePostFields}
1920
${tagsPostFields}
2021
${categoriesPostFields}
22+
${commentsPostFields}
2123
}
2224
`
2325
// Query: retrieve post by specified identifier.

0 commit comments

Comments
 (0)