This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch release-3.0.0-RC1-jpa in repository https://gitbox.apache.org/repos/asf/causeway-app-helloworld.git
commit 388f396f57fc4f435993bc8f970801d8e1c97cbf Author: danhaywood <[email protected]> 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 1ad5341..75bbc2a 100644 --- a/src/main/java/domainapp/webapp/AppManifest.java +++ b/src/main/java/domainapp/webapp/AppManifest.java @@ -12,6 +12,7 @@ import org.apache.causeway.core.runtimeservices.CausewayModuleCoreRuntimeService import org.apache.causeway.persistence.jpa.eclipselink.CausewayModulePersistenceJpaEclipselink; import org.apache.causeway.security.shiro.CausewayModuleSecurityShiro; 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; @@ -27,6 +28,7 @@ import domainapp.modules.hello.HelloWorldModule; CausewayModuleSecurityShiro.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>
