我正在尝试从Markdown文件中使用GraphQL将图像列表添加到Gatsby中。如果我使用一张图像,它将起作用。
降价清单:
images:
- ./images/01.jpg
- ./images/02.jpg
- ./images/03.jpg
查询:
{
allMarkdownRemark {
edges {
node {
frontmatter {
images {
id
}
}
}
}
}
}
结果:
"errors": [
{
"message": "The \"path\" argument must be of type string. Received type object",
"locations": [
{
"line": 6,
"column": 11
}
],
"path": [
"allMarkdownRemark",
"edges",
4,
"node",
"frontmatter",
"images"
]
}
],
谢谢!