pages from GraphQL are ordered by last edited instead of the order the appear in backoffice
I use GraphQL to get all my data from Umbraco. I thought data would be served in the order data appears in Umbraco Backoffice. This is also what the docs say
But it turns out that whatever is edited last comes on the bottom of the page. This completly breaks how we have made our site.
Right now this problem most affects our audits part of our CMS. We do audits and each audit can be hundreds of pages long (on the web page, if exported to PDF)
The screenshot shows how we do audits, you don't have to understand the Norwegian letters but the structure shown in studio is what I expect in my front end (order wise)
Instead whatever is edited last comes last on our page.
My GraphQL query for getting this data looks like this
query($url: String!) {
content(url: $url) {
id
name
level
... on Granskning {
oppsumering
level
}
descendants {
items {
name
id
level
... on Prinsipper {
beskrivelse
prinsipp
level
id
}
... on Retningslinjer {
beskrivelse
id
vurdering
level
}
... on Suksesskriterium {
beskrivelse
id
vurdering
funn
level
}
... on TestbareKriterier {
beskrivelse
id
vurdering
funn
level
}
}
}
}
}
Have you tried testing if the allContent>orderBy argument would suit your use case better?
Also, for this kind of inquires, I recommend that you open a support ticket, so that the team can get access to your backoffice and help you out that way, as seeing your content and being able to query it directly would help a lot :)
Sorry for the late reply, summer holidays came along 🌴
We are still on the Heartcore mini-plan and as such do not have access to Umbraco email support.
What do you mean when you say "allContent>orderBy", ordered by what? Can I somehow order by "allContent"?
My goal is for the structure that is shown in the CMS to be the same as the structure I get in my GraphQL-query.
pages from GraphQL are ordered by last edited instead of the order the appear in backoffice
I use GraphQL to get all my data from Umbraco. I thought data would be served in the order data appears in Umbraco Backoffice. This is also what the docs say
But it turns out that whatever is edited last comes on the bottom of the page. This completly breaks how we have made our site.
Right now this problem most affects our audits part of our CMS. We do audits and each audit can be hundreds of pages long (on the web page, if exported to PDF)
The screenshot shows how we do audits, you don't have to understand the Norwegian letters but the structure shown in studio is what I expect in my front end (order wise) Instead whatever is edited last comes last on our page.
My GraphQL query for getting this data looks like this
Hey Andreas
Have you tried testing if the allContent>orderBy argument would suit your use case better?
Also, for this kind of inquires, I recommend that you open a support ticket, so that the team can get access to your backoffice and help you out that way, as seeing your content and being able to query it directly would help a lot :)
Sorry for the late reply, summer holidays came along 🌴 We are still on the Heartcore mini-plan and as such do not have access to Umbraco email support.
What do you mean when you say "allContent>orderBy", ordered by what? Can I somehow order by "allContent"?
My goal is for the structure that is shown in the CMS to be the same as the structure I get in my GraphQL-query.
Hey, you do have support.
Heartcore is a SaaS product and as per - https://umbraco.com/products/umbraco-heartcore/pricing/ - you can reach out in the chat.
I, also, recommend that you ask for Nicole : )
Before then, it would be a good idea to check the "docs" tab in the GraphQL playground, as it shows you all possible arguments etc.
I would have shown you a screenshot but I don't work at the company anymore, so I don't have access to a Heartcore project.
is working on a reply...