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 <[email protected]> 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>
