[SOLVED] GraphQl Query no longer working for reference content

I have…

  • [ ] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [x] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Please note, this is happening via the graphql interface on the web ui, and via the .net sdk and api. It is also affecting a large amount of page content on a live website so is kind of urgent

using query

{  queryLandingPageContents(filter: "data/locator/iv eq 'locker-room' and data/locator/iv eq 'start-line'") {
id
data: flatData {
  title
  subtitle
  locator
  content {
    ... on TabBlock {
      typename: __typename
      id
      data: flatData {
        locator
        content {
          typename: __typename
          id
        }
      }
    }
  }
}}}

I’m getting the following:

{  "errors": [
{
  "message": "Fragment cannot be spread here as objects of type 'LandingPageDataContentUnionDto' can never be of type 'TabBlock'.",
  "locations": [
    {
      "line": 8,
      "column": 9
    }
  ],
  "extensions": {
    "code": "POSSIBLE_FRAGMENT_SPREADS",
    "codes": [
      "POSSIBLE_FRAGMENT_SPREADS"
    ],
    "number": "5.5.2.3"
  }
}  ] }

Expected behavior

It should be returning query result correctly. Nothing has changed on the schemas and this query was working until yesterday

Minimal reproduction of the problem

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ x] Cloud version

Version: [VERSION]

Browser:

  • [ x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

Can you post the union definition of LandingPageDataContentUnionDto?

Not sure why the possible types have changed from the full list of schemas. This is also affecting other content dtos by the looks of it

LandingPageDataContentUnionDto

No Description

possible types

CommunityPost

UserEntity

LandingPage

TabPage

I have rolled it back and will provide a fix today.

Much appreciated, thank you

1 Like

Can you send me a link to a backup of your app via PM?

Or your app name, then I can do it myself.

It is solved and will be deployed soon. Very weird API design in the GraphQL library was leading to this.

This topic was automatically closed after 2 days. New replies are no longer allowed.