Contentful logo

Contentful Community

Did Contentful radically change graphQL conventions in the last 3 months?

Hi, having a big and unsolvable, seemingly, issue with a netlify+gatsby blog:

I think I have traced the error to this: graphQl queries fail and thus gatsby build fails but delivers a useless error message. My investigations hint that graphQL naming conventions have change in the last 3 months.
Am I right in my assessment? If not, how can I mitigate this? I basically have a static site now that I cannot rebuild, cannot test, cannot anything.

Before, I did this:

resolve(
graphql(
      {
        allContentfulBlogPost {
          edges {
            node {
              title
              slug
            }
          }
        }
        allContentfulOurServices {
          edges {
            node {
              title
              slug
            }
          }
        }...

Using this query (which worked in July) in our project’s graphiQl on contentful it doesn’t work any more.
Using Ctrl + Space , I found that this works and produces the “same” original result:

resolve(
      graphql(
        `
          {
            blogPostCollection {
              items {
                title
                slug
              }
            }
            ourServicesCollection {
              items {
                title
                slug
              }
            }

Am I right in my assessment? If not, how can I mitigate this? I basically have a static site now that I cannot rebuild, cannot test, cannot anything.

Hi,

I don’t believe such changes happened to Contentful GraphQl schema. From my understanding, Gatsby has a thing where it looks like you are using GraphQl, but really it’s pulling the data from the REST API and then “fakes” the GraphQl response. Is it possible that that’s what you were using, which is why the query looks totally different from what it actually looks like when inspecting through graphiQl?