Cannot query field \"allMarkdownRemark\" on type \"RootQueryType\
See original GitHub issue "message": "Cannot query field \"allMarkdownRemark\" on type \"RootQueryType\".",
query
{ allMarkdownRemark { edges { node { title } } }
package.json
{ "name": "gatsby-starter-hello-world", "description": "Gatsby hello world starter", "license": "MIT", "scripts": { "develop": "gatsby develop", "build": "gatsby build", "serve": "gatsby serve" }, "dependencies": { "gatsby": "^1.9.119", "gatsby-link": "^1.6.28", "gatsby-plugin-styled-components": "^2.0.3", "gatsby-plugin-typography": "^1.7.10", "gatsby-remark-copy-linked-files": "^1.5.22", "gatsby-source-filesystem": "^1.5.9", "gatsby-transformer-json": "^1.0.13", "gatsby-transformer-remark": "^1.7.23", "styled-components": "^2.2.4", "typography": "^0.16.6", "typography-theme-bootstrap": "^0.16.7", "typography-theme-lawton": "^0.15.10", "typography-theme-us-web-design-standards": "^0.16.9" } }
http://localhost:8000/___graphql?query={ allMarkdownRemark { edges { node { title } } }
I also cannot query JSON file or markdown files as I expect.
I have json file in /data/a.json with { ‘value’: ‘a’ }
I have rm -rf node_modules/ and reinstalled. I have used two browsers just in case of cache issue.
gatsby-config.js
`
module.exports = {
siteMetadata: {
title: `ARWD`,
},
plugins: [
`gatsby-transformer-json`,
`gatsby-transformer-remark`,
`gatsby-plugin-styled-components`,
`gatsby-plugin-typography`,
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography.js`,
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `CMECF`,
path: `${__dirname}/public/files/CMECF`,
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `Attorney`,
path: `${__dirname}/public/files/Attorney`,
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `Applications`,
path: `${__dirname}/public/files/Applications`,
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `Files`,
path: `${__dirname}/public/files`,
}
},
],
}
`
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (5 by maintainers)
Top GitHub Comments
Using plugin gatsby-source-filesystem add also path to your folder with .md files.
The repo does include markdown files. #3103 seems related. It’s working after I recreated the config.