Gatsby: GraphQL query results incorrect after upgrade from [email protected] to 1.9.211

Created on 6 Mar 2018  Â·  6Comments  Â·  Source: gatsbyjs/gatsby

Description

I wanted to release my new Gatsby starter gatsby-starter-personal-blog, but before that I wanted to update gatsby and its plugins to the latest. I was working during the development with Gatsby 1.9.192.

Regrettably I can't. Every other packages are ok, but not the Gatsby itself. Upgrading to anything later than 1.9.210 blows my work. After upgrade Gatsby to 1.9.211, my GraphQL queries results going crazy.

For example, this testing query

{
  posts: allMarkdownRemark(filter: {id: {regex: "//posts//"}}, sort: {fields: [fields___prefix], order: DESC}) {
    edges {
      node {
        id
        fileAbsolutePath
        fields {
          slug
          prefix
        }
      }
    }
  }
}

on 1.9.210 gives correct result:


Expand to see full result

{
  "data": {
    "posts": {
      "edges": [
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-21--like-nonsense-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-21--like-nonsense-3/index.md",
            "fields": {
              "slug": "/like-nonsense-3/",
              "prefix": "2017-12-21"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-19--i-may-not-have-gone-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-19--i-may-not-have-gone-3/index.md",
            "fields": {
              "slug": "/i-may-not-have-gone-3/",
              "prefix": "2017-12-19"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-17--i-have-not-failed-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-17--i-have-not-failed-3/index.md",
            "fields": {
              "slug": "/i-have-not-failed-3/",
              "prefix": "2017-12-17"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-15--good-friends-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-15--good-friends-3/index.md",
            "fields": {
              "slug": "/good-friends-3/",
              "prefix": "2017-12-15"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-13--there-are-only-two-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-13--there-are-only-two-3/index.md",
            "fields": {
              "slug": "/there-are-only-two-3/",
              "prefix": "2017-12-13"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-11--imperfection-is-beauty-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-11--imperfection-is-beauty-3/index.md",
            "fields": {
              "slug": "/imperfection-is-beauty-3/",
              "prefix": "2017-12-11"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-09--i-am-so-clever-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-09--i-am-so-clever-3/index.md",
            "fields": {
              "slug": "/i-am-so-clever-3/",
              "prefix": "2017-12-09"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-07--people-will-forget-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-07--people-will-forget-3/index.md",
            "fields": {
              "slug": "/people-will-forget-3/",
              "prefix": "2017-12-07"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-05--you-only-live-once-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-05--you-only-live-once-3/index.md",
            "fields": {
              "slug": "/you-only-live-once-3/",
              "prefix": "2017-12-05"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-03--be-who-you-are-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-03--be-who-you-are-3/index.md",
            "fields": {
              "slug": "/be-who-you-are-3/",
              "prefix": "2017-12-03"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-01--two-things-are-infinite-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-01--two-things-are-infinite-3/index.md",
            "fields": {
              "slug": "/two-things-are-infinite-3/",
              "prefix": "2017-12-01"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-21--like-nonsense-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-21--like-nonsense-2/index.md",
            "fields": {
              "slug": "/like-nonsense-2/",
              "prefix": "2017-11-21"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-19--i-may-not-have-gone-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-19--i-may-not-have-gone-2/index.md",
            "fields": {
              "slug": "/i-may-not-have-gone-2/",
              "prefix": "2017-11-19"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-17--i-have-not-failed-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-17--i-have-not-failed-2/index.md",
            "fields": {
              "slug": "/i-have-not-failed-2/",
              "prefix": "2017-11-17"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-15--good-friends-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-15--good-friends-2/index.md",
            "fields": {
              "slug": "/good-friends-2/",
              "prefix": "2017-11-15"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-13--there-are-only-two-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-13--there-are-only-two-2/index.md",
            "fields": {
              "slug": "/there-are-only-two-2/",
              "prefix": "2017-11-13"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-11--imperfection-is-beauty-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-11--imperfection-is-beauty-2/index.md",
            "fields": {
              "slug": "/imperfection-is-beauty-2/",
              "prefix": "2017-11-11"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-09--i-am-so-clever-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-09--i-am-so-clever-2/index.md",
            "fields": {
              "slug": "/i-am-so-clever-2/",
              "prefix": "2017-11-09"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-07--people-will-forget-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-07--people-will-forget-2/index.md",
            "fields": {
              "slug": "/people-will-forget-2/",
              "prefix": "2017-11-07"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-05--you-only-live-once-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-05--you-only-live-once-2/index.md",
            "fields": {
              "slug": "/you-only-live-once-2/",
              "prefix": "2017-11-05"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-03--be-who-you-are-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-03--be-who-you-are-2/index.md",
            "fields": {
              "slug": "/be-who-you-are-2/",
              "prefix": "2017-11-03"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-01--two-things-are-infinite-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-01--two-things-are-infinite-2/index.md",
            "fields": {
              "slug": "/two-things-are-infinite-2/",
              "prefix": "2017-11-01"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-21--like-nonsense/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-21--like-nonsense/index.md",
            "fields": {
              "slug": "/like-nonsense/",
              "prefix": "2017-10-21"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-19--i-may-not-have-gone/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-19--i-may-not-have-gone/index.md",
            "fields": {
              "slug": "/i-may-not-have-gone/",
              "prefix": "2017-10-19"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-17--i-have-not-failed/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-17--i-have-not-failed/index.md",
            "fields": {
              "slug": "/i-have-not-failed/",
              "prefix": "2017-10-17"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-15--good-friends/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-15--good-friends/index.md",
            "fields": {
              "slug": "/good-friends/",
              "prefix": "2017-10-15"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-13--there-are-only-two/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-13--there-are-only-two/index.md",
            "fields": {
              "slug": "/there-are-only-two/",
              "prefix": "2017-10-13"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-11--imperfection-is-beauty/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-11--imperfection-is-beauty/index.md",
            "fields": {
              "slug": "/imperfection-is-beauty/",
              "prefix": "2017-10-11"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-09--i-am-so-clever/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-09--i-am-so-clever/index.md",
            "fields": {
              "slug": "/i-am-so-clever/",
              "prefix": "2017-10-09"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-07--people-will-forget/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-07--people-will-forget/index.md",
            "fields": {
              "slug": "/people-will-forget/",
              "prefix": "2017-10-07"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-05--you-only-live-once/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-05--you-only-live-once/index.md",
            "fields": {
              "slug": "/you-only-live-once/",
              "prefix": "2017-10-05"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-03--be-who-you-are/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-03--be-who-you-are/index.md",
            "fields": {
              "slug": "/be-who-you-are/",
              "prefix": "2017-10-03"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-01--two-things-are-infinite/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-01--two-things-are-infinite/index.md",
            "fields": {
              "slug": "/two-things-are-infinite/",
              "prefix": "2017-10-01"
            }
          }
        }
      ]
    }
  }
}

but after update to 1.9.211 the same query gives broken list with some edges omitted and some multiplied:


Expand to see full result

{
  "data": {
    "posts": {
      "edges": [
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-21--like-nonsense-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-21--like-nonsense-3/index.md",
            "fields": {
              "slug": "/like-nonsense-3/",
              "prefix": "2017-12-21"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-19--i-may-not-have-gone-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-19--i-may-not-have-gone-3/index.md",
            "fields": {
              "slug": "/i-may-not-have-gone-3/",
              "prefix": "2017-12-19"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-19--i-may-not-have-gone-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-19--i-may-not-have-gone-3/index.md",
            "fields": {
              "slug": "/i-may-not-have-gone-3/",
              "prefix": "2017-12-19"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-17--i-have-not-failed-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-17--i-have-not-failed-3/index.md",
            "fields": {
              "slug": "/i-have-not-failed-3/",
              "prefix": "2017-12-17"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-17--i-have-not-failed-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-17--i-have-not-failed-3/index.md",
            "fields": {
              "slug": "/i-have-not-failed-3/",
              "prefix": "2017-12-17"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-15--good-friends-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-15--good-friends-3/index.md",
            "fields": {
              "slug": "/good-friends-3/",
              "prefix": "2017-12-15"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-15--good-friends-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-15--good-friends-3/index.md",
            "fields": {
              "slug": "/good-friends-3/",
              "prefix": "2017-12-15"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-13--there-are-only-two-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-13--there-are-only-two-3/index.md",
            "fields": {
              "slug": "/there-are-only-two-3/",
              "prefix": "2017-12-13"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-13--there-are-only-two-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-13--there-are-only-two-3/index.md",
            "fields": {
              "slug": "/there-are-only-two-3/",
              "prefix": "2017-12-13"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-11--imperfection-is-beauty-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-11--imperfection-is-beauty-3/index.md",
            "fields": {
              "slug": "/imperfection-is-beauty-3/",
              "prefix": "2017-12-11"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-11--imperfection-is-beauty-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-11--imperfection-is-beauty-3/index.md",
            "fields": {
              "slug": "/imperfection-is-beauty-3/",
              "prefix": "2017-12-11"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-09--i-am-so-clever-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-09--i-am-so-clever-3/index.md",
            "fields": {
              "slug": "/i-am-so-clever-3/",
              "prefix": "2017-12-09"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-09--i-am-so-clever-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-09--i-am-so-clever-3/index.md",
            "fields": {
              "slug": "/i-am-so-clever-3/",
              "prefix": "2017-12-09"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-07--people-will-forget-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-07--people-will-forget-3/index.md",
            "fields": {
              "slug": "/people-will-forget-3/",
              "prefix": "2017-12-07"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-07--people-will-forget-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-07--people-will-forget-3/index.md",
            "fields": {
              "slug": "/people-will-forget-3/",
              "prefix": "2017-12-07"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-05--you-only-live-once-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-05--you-only-live-once-3/index.md",
            "fields": {
              "slug": "/you-only-live-once-3/",
              "prefix": "2017-12-05"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-05--you-only-live-once-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-05--you-only-live-once-3/index.md",
            "fields": {
              "slug": "/you-only-live-once-3/",
              "prefix": "2017-12-05"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-03--be-who-you-are-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-03--be-who-you-are-3/index.md",
            "fields": {
              "slug": "/be-who-you-are-3/",
              "prefix": "2017-12-03"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-03--be-who-you-are-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-03--be-who-you-are-3/index.md",
            "fields": {
              "slug": "/be-who-you-are-3/",
              "prefix": "2017-12-03"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-01--two-things-are-infinite-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-01--two-things-are-infinite-3/index.md",
            "fields": {
              "slug": "/two-things-are-infinite-3/",
              "prefix": "2017-12-01"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-01--two-things-are-infinite-3/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-12-01--two-things-are-infinite-3/index.md",
            "fields": {
              "slug": "/two-things-are-infinite-3/",
              "prefix": "2017-12-01"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-21--like-nonsense-2/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-11-21--like-nonsense-2/index.md",
            "fields": {
              "slug": "/like-nonsense-2/",
              "prefix": "2017-11-21"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-21--like-nonsense/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-21--like-nonsense/index.md",
            "fields": {
              "slug": "/like-nonsense/",
              "prefix": "2017-10-21"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-19--i-may-not-have-gone/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-19--i-may-not-have-gone/index.md",
            "fields": {
              "slug": "/i-may-not-have-gone/",
              "prefix": "2017-10-19"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-17--i-have-not-failed/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-17--i-have-not-failed/index.md",
            "fields": {
              "slug": "/i-have-not-failed/",
              "prefix": "2017-10-17"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-15--good-friends/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-15--good-friends/index.md",
            "fields": {
              "slug": "/good-friends/",
              "prefix": "2017-10-15"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-13--there-are-only-two/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-13--there-are-only-two/index.md",
            "fields": {
              "slug": "/there-are-only-two/",
              "prefix": "2017-10-13"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-11--imperfection-is-beauty/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-11--imperfection-is-beauty/index.md",
            "fields": {
              "slug": "/imperfection-is-beauty/",
              "prefix": "2017-10-11"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-09--i-am-so-clever/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-09--i-am-so-clever/index.md",
            "fields": {
              "slug": "/i-am-so-clever/",
              "prefix": "2017-10-09"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-07--people-will-forget/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-07--people-will-forget/index.md",
            "fields": {
              "slug": "/people-will-forget/",
              "prefix": "2017-10-07"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-05--you-only-live-once/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-05--you-only-live-once/index.md",
            "fields": {
              "slug": "/you-only-live-once/",
              "prefix": "2017-10-05"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-03--be-who-you-are/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-03--be-who-you-are/index.md",
            "fields": {
              "slug": "/be-who-you-are/",
              "prefix": "2017-10-03"
            }
          }
        },
        {
          "node": {
            "id": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-01--two-things-are-infinite/index.md absPath of file >>> MarkdownRemark",
            "fileAbsolutePath": "C:/Users/Greg/_dev/mywebsites/new-test/content/posts/2017-10-01--two-things-are-infinite/index.md",
            "fields": {
              "slug": "/two-things-are-infinite/",
              "prefix": "2017-10-01"
            }
          }
        }
      ]
    }
  }
}

I believe that it's connected with the Fixes to speed up running queries — add caching & avoid work (#4213) commit, but I'm not sure about that, just tested different versions of Gatsby and the 1.9.210 is the last one it works with.

Steps to reproduce

  • gatsby new test-issue https://github.com/greglobinski/gatsby-starter-personal-blog.git
  • gatsby develop to check the redered list of posts or try the test query from above
  • yarn add [email protected]
  • gatsby develop and check the difference

Environment

  • gatsby-cli version: 1.1.44
  • Node.js version: 8.7.0
  • Operating System: Windows 7 / Ubuntu 16.04.4

Question

The starter is ready to release, but I do not want to do it with this flaw "You can use the starter but forget about updating Gatsby" ;) For now I can't figure out what/where is the problem and how to fix it. I appreciate any tips.

Most helpful comment

As soon as the tests finish running I'll merge and release the fix.

Thanks for the through bug report!

All 6 comments

I can confirm I'm seeing the same thing using your starter. See here for the full diff between [email protected] and [email protected], so it sounds like you're right that it's related to #4213.

If you'd like to investigate a fix there's some instructions on setting up a dev environment for Gatsby.

(I edited your comment to put the GraphQL results into collapsible blocks)

Looking into this...

Curious why it hasn't shown up on gatsbyjs.org since we use basically the same query.

Turns out the problem was how we were generating a cache key. I only used the node's contentDigest. Which is fine for organic content since people will almost never have identical content but falls apart for demo stuff like this as you do have some duplicate markdown files.

You also uncovered another bug — which if it hadn't existed wouldn't have uncovered the above bug — which is that gatsby-transformer-remark wasn't including all the data for the node when creating the content digest. Even with identical markdown text & frontmatter, the contentDigests shouldn't have been identical as there's the id and file path that would have differentiated the different files. But these and a few other fields weren't included.

As soon as the tests finish running I'll merge and release the fix.

Thanks for the through bug report!

Great! Thank you for the quick intervention.

Was this page helpful?
0 / 5 - 0 ratings