500 error when using GraphQL API

Following query gives us 500 from Prismic GraphQL API when there are no matches for $page. Here show_in_pages is an array of page slugs for which we are matching.

When there are matching info articles, the response is returned as expected.

query PageInfoPopup($page: String!, $locale: String!) {
  prismic_allInfo_articles(
    sortBy: meta_firstPublicationDate_DESC
    lang: $locale
    first: 1
    where: { show_in_pages: { page_path: $page } }
  ) {
    edges {
      node {
        ...InfoArticleData
      }
      cursor
    }
    totalCount
  }
}

Hi @turkka.mannila,

Welcome to the Prismic community,
I will try to reproduce this issue, and in order to do so, can you please share with us (in a private message if necessary) your repository name with us.

It would be helpful if you could share a link to the GraphQL query applied in the GraphQL browser accessible such as

https://your-repo-name.cdn.prismic.io/graphql

For more please check this article.

Looking forward to your reply,
Fares