Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Does Liferay DXP 7.2 has GraphQL support?
Hi, Does Liferay DXP 7.2 has out of box GraphQL support like REST APIs?
Thank you!
Thank you!
In Liferay's slack I was told support for GraphQL is available in 7.2 SP1 and 7.1 FP12 onwards, will be released in 7.2 GA2. But I don't work for Liferay so can't confirm this

Thanks! This page, https://www.liferay.com/solutions/headless-apis, says GraphQL is supported, but I was not able to find any documentation at all.
Documentation is being worked on Gwowen, not sure though of ETA.
I have also heard GraphQL support in Liferay is still a work in progress. I have a project with a golang server app handling the GraphQL api from a frontend PWA (lit-html, lit-apollo) where in turn the golang app interfaces with the new headless api . For the golang code (consuming the Liferay REST apis) I used the openapi-generator: which can generate code for many languages and supports openapi3. On my radar for the future is looking at the GraphQL in Liferay itself, but have not dove into it yet.
Hi Gwowen,
as announced here, https://liferay.dev/blogs/-/blogs/liferay-portal-7-2-ce-ga2-release
Liferay GraphQL support has been added to Liferay 7.2 CE GA2 (recently released) and to 7.2 DXP SP1.
as announced here, https://liferay.dev/blogs/-/blogs/liferay-portal-7-2-ce-ga2-release
Liferay GraphQL support has been added to Liferay 7.2 CE GA2 (recently released) and to 7.2 DXP SP1.
I have a Liferay 7.2 CE GA2 up and running but
The URL
http://localhost:8080/o/graphql
like documented here
https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/get-started-discover-the-api
returns nothing
The URL
http://localhost:8080/o/graphql
like documented here
https://portal.liferay.dev/docs/7-2/frameworks/-/knowledge_base/f/get-started-discover-the-api
returns nothing
Sorry I was wrong:
Using Altair, a GraphQL Client extension of Firefox and sending a query works fine:
Using Altair, a GraphQL Client extension of Firefox and sending a query works fine:
query {
messageBoardThreads(siteKey: "Guest") {
items {
aggregateRating {
ratingCount
ratingValue
}
articleBody
id
messageBoardMessages {
items {
headline
}
}
}
page
pageSize
totalCount
}
}
Hey Andre, that moment of success is exciting.
Are you able to do queries that require authentication with Altair? I still don't know how you authenticate the requests... I read that you can add a Basic auth header but I couldn't make it work up to now (working with curl, though).
Fernando
Fernando
You can add header "AUTHORIZATION" as "Basic dGVzdEBsaWZlcmF5LmNvbTp0ZXN0" where I have provided Base64 encoding for "test@liferay.com:test". You need to change it as per your setup.
Yup. Somehow I messed up the base64 in my previous atempt. It works now. :-)
https://liferay.dev/blogs/-/blogs/new-graphql-apis-in-liferay-7-2
RestBuilder tool in DXP 7.2 creates the Rest Services with OpenAPI and GraphQL support.
RestBuilder tool in DXP 7.2 creates the Rest Services with OpenAPI and GraphQL support.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™