According to pretty much all graphql documentation (read: first 3 pages of google search)
I should be able to use syntax like:
{
hero {
name
}
}
and
{
human(id: "1000") {
name
height
}
}
The first page of https://graphql.org/ has examples like:
However, this syntax, and the majority of the grapql features, simply don't work with AEM for some unknown reason.
AEM wknd has an Content Fragment Model called Adventure with fields with the following property names:
So I should be able to do this:
{
Adventure {
adventureTitle
}
}
But this doesnt work. The only thing which works is something like:
{
adventureList {
items {
adventureType
adventureTitle
adventurePrice
adventureActivity
}
}
Its using a syntax which doesnt seem to be mentioned in any grapql documentation outside of AEM.
named queries, string comparisons, static parameters, all the documented features and syntax of graphql doesnt seem to work with graphql on AEM.
Is it using its own dialect?
Solved! Go to Solution.
Views
Replies
Total Likes
I believe there's no standard syntax for what we call the "top level functions" - so we decided to go with "adventureList" & "adventureByPath" to be more explicit with the query names.
On the other side, the intermediate "item" and "items" nodes were created to allow the introduction of sibling properties that would be common to all models (like "_references", which contains the hydrated content & fragment references).
The Adobe documentation mentions on https://experienceleague.adobe.com/docs/experience-manager-cloud-service/assets/admin/graphql-api-co... that the used library is the one from graphql.org, so I don't think that this is an Adobe dialect.
Views
Replies
Total Likes
Views
Replies
Total Likes
I believe there's no standard syntax for what we call the "top level functions" - so we decided to go with "adventureList" & "adventureByPath" to be more explicit with the query names.
On the other side, the intermediate "item" and "items" nodes were created to allow the introduction of sibling properties that would be common to all models (like "_references", which contains the hydrated content & fragment references).
Views
Replies
Total Likes
Views
Replies
Total Likes
For reference, the documentation page https://experienceleague.adobe.com/docs/experience-manager-cloud-service/assets/admin/content-fragme... provides examples of basic queries and how the syntax should look like.
On top of that, the GraphiQL user interface (https://experienceleague.adobe.com/docs/experience-manager-cloud-service/assets/admin/graphql-api-co...) also provides a schema explorer which helps understanding the structure of the schemas.
Views
Replies
Total Likes
Views
Likes
Replies