我无法按照 Gridsome 的文档使用 NeflifyCMS 设置 Gridsome
用于设置 Netlify config.yml 的片段
collections:
- name: "posts"
label: "Posts"
folder: "posts"
create: true
slug: "{{slug}}"
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Excerpt", name: "excerpt", widget: "string"}
- {label: "Publish Date", name: "date", widget: "date"}
- {label: "Body", name: "body", widget: "markdown"}
我去 Graphql Playground 并打开 Docs 选项卡并看到“allPost”查询,但是当我在其中查看时,“title”未被识别为 post 下的字段,但由于某种原因“belongsTo”是。如果您尝试查询“title”,您将收到错误“Cannot query field 'title' on type 'Post'”。
我不知道“belongsTo”来自哪里或如何解决它。这是 Netlify 错误还是 Gridsome 问题?