You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2022/04/21 06:11:12 UTC

[isis-app-simpleapp] branch jpa-graphql-SNAPSHOT created (now 8137916)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a change to branch jpa-graphql-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git


      at 8137916  adds support for graphql viewer (incubating)

This branch includes the following new commits:

     new 8137916  adds support for graphql viewer (incubating)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[isis-app-simpleapp] 01/01: adds support for graphql viewer (incubating)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jpa-graphql-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git

commit 813791618d3c83d19675f38d8516ce996efb719e
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Apr 21 07:10:59 2022 +0100

    adds support for graphql viewer (incubating)
---
 webapp/pom.xml                                          |  5 +++++
 webapp/src/main/java/domainapp/webapp/AppManifest.java  |  2 ++
 webapp/src/main/resources/config/application.properties |  2 ++
 webapp/src/main/resources/static/index.html             | 14 ++++++++++++++
 4 files changed, 23 insertions(+)

diff --git a/webapp/pom.xml b/webapp/pom.xml
index 7bf3d96..4ab807f 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -68,6 +68,11 @@
             <type>pom</type>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.isis.incubator.viewer</groupId>
+            <artifactId>isis-viewer-graphql-viewer</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.isis.security</groupId>
             <artifactId>isis-security-shiro</artifactId>
diff --git a/webapp/src/main/java/domainapp/webapp/AppManifest.java b/webapp/src/main/java/domainapp/webapp/AppManifest.java
index 9dca47c..d89da6e 100644
--- a/webapp/src/main/java/domainapp/webapp/AppManifest.java
+++ b/webapp/src/main/java/domainapp/webapp/AppManifest.java
@@ -12,6 +12,7 @@ import org.apache.isis.persistence.jpa.eclipselink.IsisModulePersistenceJpaEclip
 import org.apache.isis.security.shiro.IsisModuleSecurityShiro;
 import org.apache.isis.testing.fixtures.applib.IsisModuleTestingFixturesApplib;
 import org.apache.isis.testing.h2console.ui.IsisModuleTestingH2ConsoleUi;
+import org.apache.isis.viewer.graphql.viewer.IsisModuleIncViewerGraphqlViewer;
 import org.apache.isis.viewer.restfulobjects.jaxrsresteasy4.IsisModuleViewerRestfulObjectsJaxrsResteasy4;
 import org.apache.isis.viewer.wicket.viewer.IsisModuleViewerWicketViewer;
 
@@ -27,6 +28,7 @@ import domainapp.webapp.quartz.QuartzModule;
         IsisModulePersistenceJpaEclipselink.class,
         IsisModuleViewerRestfulObjectsJaxrsResteasy4.class,
         IsisModuleViewerWicketViewer.class,
+        IsisModuleIncViewerGraphqlViewer.class,
 
         IsisModuleTestingFixturesApplib.class,
         IsisModuleTestingH2ConsoleUi.class,
diff --git a/webapp/src/main/resources/config/application.properties b/webapp/src/main/resources/config/application.properties
index 8a7dcce..5491670 100644
--- a/webapp/src/main/resources/config/application.properties
+++ b/webapp/src/main/resources/config/application.properties
@@ -29,3 +29,5 @@ eclipselink.jpa.upper-case-column-names=false
 #isis.testing.fixtures.initial-script = domainapp.webapp.application.fixture.scenarios.DomainAppDemo
 
 
+isis.core.meta-model.introspector.mode=full
+spring.graphql.graphiql.enabled=true
diff --git a/webapp/src/main/resources/static/index.html b/webapp/src/main/resources/static/index.html
index 5e8c12d..733ae69 100644
--- a/webapp/src/main/resources/static/index.html
+++ b/webapp/src/main/resources/static/index.html
@@ -43,6 +43,20 @@
                         <a href="http://restfulobjects.org"  target="_blank">Restful Objects</a> spec.
                     </p>
                 </li>
+                <li>
+                    <p>
+                        <b>
+                            <a href="graphiql?path=/graphql">GraphQL</a>
+                        </b>
+                    </p>
+                    <p>
+                        provides access to the <a href="https://github.com/graphql/graphiql/blob/main/packages/graphiql/README.md">GraphIQL</a> console to access the application using <a href="https://graphql.org/">GraphQL</a>.
+                    </p>
+                    <p>
+                        The domain model is expressed according to the (draft)
+                        <a href="http://graphqlobjects.org"  target="_blank">GraphQL Objects</a> spec.
+                    </p>
+                </li>
             </ul>
 
             <p>