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/22 14:59:35 UTC

[isis-app-demo] branch main-graphql-SNAPSHOT created (now db7efd7)

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

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


      at db7efd7  adds in graphql (incubating) support

This branch includes the following new commits:

     new db7efd7  adds in graphql (incubating) support

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-demo] 01/01: adds in graphql (incubating) support

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

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

commit db7efd734f37b2ad241a9790930918af694d25e1
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Apr 22 15:59:27 2022 +0100

    adds in graphql (incubating) support
---
 webapp/pom.xml                                          |  5 +++++
 webapp/src/main/java/petclinic/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 111d4aa..a0c2280 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/petclinic/webapp/AppManifest.java b/webapp/src/main/java/petclinic/webapp/AppManifest.java
index bf225fa..0aba760 100644
--- a/webapp/src/main/java/petclinic/webapp/AppManifest.java
+++ b/webapp/src/main/java/petclinic/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 petclinic.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 9c9143c..ebb8d57 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 = petclinic.webapp.application.fixture.scenarios.PetClinicDemo
 
 
+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 f9ed402..98eeef7 100644
--- a/webapp/src/main/resources/static/index.html
+++ b/webapp/src/main/resources/static/index.html
@@ -42,6 +42,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>