要通过本教程创建帖子模板(我在第 4 部分): https: //www.joaopedro.cc/blog-com-gatsby-e-react-parte-4
但是在执行“PostPage”查询时发生错误:
Multiple "root" queries found: "PostPage" and "PostPage".
Only the first ("PostPage") will be registered.
Instead of:
1 | query PostPage {
2 | markdownRemark {
3 | #...
4 | }
5 | }
6 |
7 | query PostPage {
8 | markdownRemark {
9 | #...
10 | }
11 | }
Do:
1 | query postPageAndPostPage {
2 | markdownRemark {
3 | #...
4 | }
5 | markdownRemark { …Run Code Online (Sandbox Code Playgroud)