DatoCMS API explorer erroring

Hi,

New to Dato and Gatsby, but trying to work something out. We have a query that looks like below.

const getData = graphql`
  {
    dato: datoCmsHomePage {
      newsTitle
      newsDescription
      newsBackgroundTitle
    }
    newsPosts: allDatoCmsBlogPost(limit: 3,sort: {fields: publishedDate,order:DESC}) {
      edges {
        node {
          title
          slug
          featuredImage {
            fluid {
              ...GatsbyDatoCmsFluid
            }
          }
          publishedDate(formatString:"MMMM DD, YYYY")
          contentNode {
            childMarkdownRemark {
              newsItemDescription:excerpt
            }
          }
          author
          category{
            title
          }
        }
      }
    }
  }

Pretty simple and it works in uat/prod. Here is the issue. If I run the same query in the API explorer, it fails.

Can anyone explain why to me?

hello @marketing4 yes, that’s normal as the queries in Gatsby are a GraphQL flavour that’s specific to them, so you cannot simply copy-paste them around. You cannot do the other way around either. You need to “translate” them a bit to make them work in one place or another, OK?

1 Like

@mat_jack1 - thanks so much. yeah I spent some more time googling and came to the same conclusion. appreciate response.