question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
necheporenkocommented, Jan 9, 2019

Using plugin gatsby-source-filesystem add also path to your folder with .md files.

1reaction
thebetterjortcommented, Mar 1, 2018

The repo does include markdown files. #3103 seems related. It’s working after I recreated the config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot query field "allMarkdownRemark" on type ... - GitHub
ERROR #85901 GRAPHQL There was an error in your GraphQL query: Cannot query field "allMarkdownRemark" on type "Query".
Read more >
Gatsby's Graphql say "Cannot query field ... - Stack Overflow
Gatsby's Graphql say "Cannot query field "allMarkdownRemark" on type "Query"" and don't appear gatsby-transformer-remark.
Read more >
Graphql Cannot Query Field \"Allmarkdownremark\" On Type ...
I'm using gatsby-source-prismic and all works great but sometimes if I have a media manager on Prismic doesn't add a video or image...
Read more >
How I Fixed: Gatsby GraphQL Cannot query field "query" on ...
I set up a Gatsby site, along with Postgres and Postgraphile to expose GraphQL over my database. This is frankly amazing, and achieves...
Read more >
Graphql-cannot-query-field-on-type - Wix.com
GraphQL query: Cannot query field "allMarkdownRemark" on type . ... A GraphQL schema must have a root query type, so we add a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found