You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/03/24 15:21:45 UTC
(causeway-app-helloworld) branch jpa2-SNAPSHOT updated: enables graphql viewer
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch jpa2-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/causeway-app-helloworld.git
The following commit(s) were added to refs/heads/jpa2-SNAPSHOT by this push:
new 8cf2ba4 enables graphql viewer
8cf2ba4 is described below
commit 8cf2ba400ae6b549034498655523fc44b3604e1f
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 18 19:17:55 2024 +0000
enables graphql viewer
---
src/main/java/domainapp/webapp/AppManifest.java | 2 +
src/main/resources/application.yml | 19 ++++-
src/main/resources/static/index.html | 94 ++++++++++++++-----------
3 files changed, 71 insertions(+), 44 deletions(-)
diff --git a/src/main/java/domainapp/webapp/AppManifest.java b/src/main/java/domainapp/webapp/AppManifest.java
index 3365600..0a19012 100644
--- a/src/main/java/domainapp/webapp/AppManifest.java
+++ b/src/main/java/domainapp/webapp/AppManifest.java
@@ -19,6 +19,7 @@ import org.apache.causeway.security.simple.CausewayModuleSecuritySimple;
import org.apache.causeway.security.simple.realm.SimpleRealm;
import org.apache.causeway.security.simple.realm.SimpleRealm.Grant;
import org.apache.causeway.testing.h2console.ui.CausewayModuleTestingH2ConsoleUi;
+import org.apache.causeway.viewer.graphql.viewer.CausewayModuleViewerGraphqlViewer;
import org.apache.causeway.viewer.restfulobjects.jaxrsresteasy.CausewayModuleViewerRestfulObjectsJaxrsResteasy;
import org.apache.causeway.viewer.wicket.applib.CausewayModuleViewerWicketApplibMixins;
import org.apache.causeway.viewer.wicket.viewer.CausewayModuleViewerWicketViewer;
@@ -34,6 +35,7 @@ import domainapp.modules.hello.HelloWorldModule;
CausewayModuleSecuritySimple.class,
CausewayModulePersistenceJpaEclipselink.class,
CausewayModuleViewerRestfulObjectsJaxrsResteasy.class,
+ CausewayModuleViewerGraphqlViewer.class,
CausewayModuleViewerWicketApplibMixins.class,
CausewayModuleViewerWicketViewer.class,
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8116b11..5471222 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -20,10 +20,9 @@ causeway:
meta-model:
introspector:
lock-after-full-introspection: true
+ mode: full
validator:
allow-deprecated: false
- no-params-only: true
- explicit-object-type: true
viewer:
common:
@@ -52,6 +51,15 @@ causeway:
themes:
show-chooser: true
+ graphql:
+ api-variant: query_with_mutations_non_spec_compliant
+ authentication:
+ fallback:
+ username: sven
+ roles:
+ - simple-superuser
+ - foo
+ - bar
eclipselink:
@@ -74,6 +82,13 @@ server:
spring:
banner:
location: banner.txt
+ graphql:
+ graphiql:
+ enabled: true
+ path: "/graphiql"
+ schema:
+ printer:
+ enabled: true
management:
endpoint:
diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index 9a395d2..a496856 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -4,52 +4,62 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Apache Causeway™ HelloWorld</title>
- <link rel="stylesheet" type="text/css" href="css/page.css">
- </head>
- <body>
- <div id="wrapper">
- <img alt="Causeway Logo" src="images/apache-causeway/logo-banner-591x120.png" />
+ <link rel="stylesheet" type="text/css" href="css/page.css">
+</head>
+<body>
+<div id="wrapper">
+ <img alt="Causeway Logo" src="images/apache-causeway/logo-banner-591x120.png" />
+ <p>
+ This is a minimal <a href="https://causeway.apache.org">Apache Causeway</a> application, intended to
+ help you understand what the framework is all about. (If you want to start building your own apps,
+ we recommend that you instead use the companion "simple app" as a starter template).
+ <br/>
+ </p>
+
+ <p>To access the app:</p>
+ <ul>
+ <li>
<p>
- This is a minimal <a href="https://causeway.apache.org">Apache Causeway</a> application, intended to
- help you understand what the framework is all about. (If you want to start building your own apps,
- we recommend that you instead use the companion "simple app" as a starter template).
- <br/>
+ <b><a href="wicket/">Generic UI (Wicket)</a></b>
+ </p>
+ <p>
+ provides access to a generic UI for end-users. This
+ viewer is built with <a href="http://wicket.apache.org" target="_blank">Apache Wicket</a>™.
+ </p>
+ </li>
+ <li>
+ <p>
+ <b>
+ <a href="graphiql">GraphQL</a>
+ </b>
</p>
-
- <p>To access the app:</p>
- <ul>
- <li>
- <p>
- <b><a href="wicket/">Generic UI (Wicket)</a></b>
- </p>
- <p>
- provides access to a generic UI for end-users. This
- viewer is built with <a href="http://wicket.apache.org" target="_blank">Apache Wicket</a>™.
- </p>
- </li>
- <li>
- <p>
- <b>
- <a href="swagger-ui/index.thtml">RESTful API (Swagger)</a>
- </b>
- </p>
- <p>
- provides access to a Swagger UI for convenient access
- to (a subset of) the automatically generated REST API.
- </p>
- <p>
- The full backend API (at <a href="restful/">restful/</a>) renders both simple and also richer
- hypermedia representations of domain objects, the latter conforming to the
- <a href="http://restfulobjects.org" target="_blank">Restful Objects</a> spec.
- </p>
- </li>
- </ul>
-
<p>
- The default user/password is <b><i>sven/pass</i></b>.
+ provides access to the GraphQL API using the <a href="https://github.com/graphql/graphiql">GraphiQL</a> console.
</p>
+ </li>
+ <li>
+ <p>
+ <b>
+ <a href="swagger-ui/index.thtml">RESTful API (Swagger)</a>
+ </b>
+ </p>
+ <p>
+ provides access to a Swagger UI for convenient access
+ to (a subset of) the automatically generated REST API.
+ </p>
+ <p>
+ The full backend API (at <a href="restful/">restful/</a>) renders both simple and also richer
+ hypermedia representations of domain objects, the latter conforming to the
+ <a href="https://www.restfulobjects.org" target="_blank">Restful Objects</a> spec.
+ </p>
+ </li>
+ </ul>
+
+ <p>
+ The default user/password is <b><i>sven/pass</i></b>.
+ </p>
- </div>
- </body>
+</div>
+</body>
</html>