[Ouch! The query has some errors!] while GraphQL Fragment

Hi there,

I am trying to achieve something very simple.

I have the following query:

export const indexQuery = gql`
  {
    site: _site {
      favicon: faviconMetaTags {
        ...metaTagsFragment
      }
    }

    homepage {
      content {
        ...contentFragment
      }
      seo: _seoMetaTags {
        ...metaTagsFragment
      }
    }
  }
  ${metaTagsFragment}
  ${contentFragment}
`;

With the following fragment:

export const contentFragment = gql`
  fragment contentFragment on content {
    imagePosition
  }
`;

The server returns the following message:

Ouch! The query has some errors!
error - Error: [object Object]

If I try this, it works:

export const indexQuery = gql`
  {
    site: _site {
      favicon: faviconMetaTags {
        ...metaTagsFragment
      }
    }

    homepage {
      content {
        imagePosition
      }
      seo: _seoMetaTags {
        ...metaTagsFragment
      }
    }
  }
  ${metaTagsFragment}
`;

I am missing something obviously evident. Could you please help? Thanks! :slight_smile:

Tomas

Hello @tomas, sorry for the delay. Probably you have solved already your issue, but if not, can you please share the actual file where the problem happens? I cannot reproduce, sorry!