RE: Does Liferay DXP 7.2 has GraphQL support?

Gwowen Fu,修改在6 年前。 New Member 帖子: 12 加入日期: 19-11-5 最近的帖子
Hi, Does Liferay DXP 7.2 has out of box GraphQL support like REST APIs?
Thank you! 
thumbnail
Jack Bakker,修改在6 年前。 Liferay Master 帖子: 978 加入日期: 10-1-3 最近的帖子
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 emoticon
Gwowen Fu,修改在6 年前。 New Member 帖子: 12 加入日期: 19-11-5 最近的帖子
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.
thumbnail
David H Nebinger,修改在6 年前。 Liferay Legend 帖子: 14933 加入日期: 06-9-2 最近的帖子
Documentation is being worked on Gwowen, not sure though of ETA.
thumbnail
Jack Bakker,修改在6 年前。 Liferay Master 帖子: 978 加入日期: 10-1-3 最近的帖子
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. 
thumbnail
Denis Signoretto,修改在6 年前。 Expert 帖子: 375 加入日期: 09-4-21 最近的帖子
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.
thumbnail
Andre Kreienbring,修改在6 年前。 Regular Member 帖子: 152 加入日期: 06-12-18 最近的帖子
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
thumbnail
Andre Kreienbring,修改在6 年前。 Regular Member 帖子: 152 加入日期: 06-12-18 最近的帖子
Sorry I was wrong:
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
  }
}
thumbnail
Jack Bakker,修改在6 年前。 Liferay Master 帖子: 978 加入日期: 10-1-3 最近的帖子
Hey Andre, that moment of success is exciting.  
thumbnail
Fernando Fernandez,修改在6 年前。 Expert 帖子: 401 加入日期: 07-8-22 最近的帖子
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 
thumbnail
ANKIT SRIVASTAVA,修改在6 年前。 Junior Member 帖子: 76 加入日期: 11-2-2 最近的帖子
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.
thumbnail
Fernando Fernandez,修改在6 年前。 Expert 帖子: 401 加入日期: 07-8-22 最近的帖子
Yup. Somehow I messed up the base64 in my previous atempt. It works now. :-)
thumbnail
ANKIT SRIVASTAVA,修改在6 年前。 Junior Member 帖子: 76 加入日期: 11-2-2 最近的帖子
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.