在AEM 6.5中,需要手動安裝GraphiQL IDE工具,請遵循以下步驟安裝和配置。
導覽至 Software Distribution入口網站 > AEMas a Cloud Service.
搜尋「GraphiQL」(請務必包含 i in GraphiQL.
下載最新 GraphiQL內容包v.x.x.x
zip檔案是可直接安裝的AEM套件。
從AEM開始功能表導覽至 工具 > 部署 > 套件.
按一下 上傳套件 並選擇在上一步下載的包。 按一下 安裝 安裝套件。
導覽至 CRXDE Lite > 存放庫面板 >選取 /content/graphiql
節點(例如, http://localhost:4502/crx/de/index.jsp#/content/graphiql)。
在 屬性 頁簽更改值 endpoint
屬性 /content/_cq_graphql/wknd-shared/endpoint.json
.
導覽至 Web控制台配置 UI >搜尋 CSRF濾鏡 組態(例如http://localhost:4502/system/console/configMgr/com.adobe.granite.csrf.impl.CSRFFilter)
在 Excluded Paths
屬性名稱欄位更新, WKND GraphQL端點路徑 /content/cq:graphql/wknd-shared/endpoint
.
使用 //HOST:PORT/content/graphiql.html
,然後確認您可以建構新查詢或執行現有查詢。 (例如 http://localhost:4502/content/graphiql.html)
若要支援專案專用的GraphQL結構和查詢執行,您必須為 endpoint
和 Excluded Paths
值。