[IMPLEMENTED] Getting newStatus via GraphQL

I have…

I’m submitting a…

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

Current behavior

There is a schema with content, which has Published and Draft version.
When querying content via GraphQL endpoint with X-Unpublished in place and requesting for “newStatus” field - I do get response that there is no such field defined in schema for this content type.

"message": "Cannot query field 'newStatus' on type 'Tribeapp'. Did you mean 'status'?"

Expected behavior

newStatus can be retrieved similar to status field.

Minimal reproduction of the problem

query {
    queryTribeappContents(top: 10)
        { id, version, lastModified, newStatus, version, data {
            areaName { iv }
            header { en } }
            newStatus
        }
}

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [X] Self hosted with other version (I’m working on local setup with code)
  • [ ] Cloud version

Version: latest master

Browser:

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

Others:
NewStatus is returned via REST API, but not GraphQL

I think, I’ll be able to do merge request for this feature. It’s needed to extend graphql model correctly. Already have a small draft for it.
One active question I might have - how this field should behave if X-Unpublished is not populated:

  1. It can return null
  2. It can return current status…
    I’d go with null

Sorry …

1 Like

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