This is an automated email from the ASF dual-hosted git repository. bdelacretaz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit 274345f4099cfdb208827b77451200f438cb4c1f Author: Bertrand Delacretaz <[email protected]> AuthorDate: Tue May 26 15:22:59 2020 +0200 Add Kickstart-based demo setup --- org.apache.sling.graphql.samples.website/README.md | 17 ++++++++-- .../features/feature-graphql-example-website.json | 36 ++++++++++++++++++++++ .../main/resources/features/feature-sling12.json | 6 ++-- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/org.apache.sling.graphql.samples.website/README.md b/org.apache.sling.graphql.samples.website/README.md index 9b607fd..73fd9a9 100644 --- a/org.apache.sling.graphql.samples.website/README.md +++ b/org.apache.sling.graphql.samples.website/README.md @@ -3,5 +3,18 @@ Apache Sling GraphQL demo website This is a work in progress demo of the Sling GraphQL Core. -For now, you can build and install it on a Sling Starter instance -and start at http://localhost:8080/content/graphql-website-demo.html \ No newline at end of file +To run this: +* Build this module with `mvn clean install` +* Build the [GraphQL Core](https://github.com/apache/sling-org-apache-sling-graphql-core/) module +* Build the [Sling Kickstart](https://github.com/apache/sling-org-apache-sling-kickstart) module + +Then start the demo Sling instance using + + rm -rf launcher/ conf/ + java -jar ${THE_CORRECT_PATH}/org.apache.sling.kickstart-0.0.3-SNAPSHOT.jar \ + -s src/main/resources/features/feature-sling12.json \ + -af src/main/resources/features/feature-graphql-example-website.json + +And open http://localhost:8080/content/graphql-website-demo.html + +TODO: add GraphiQL instructions \ No newline at end of file diff --git a/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json b/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json new file mode 100644 index 0000000..abc9030 --- /dev/null +++ b/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-graphql-example-website.json @@ -0,0 +1,36 @@ +{ + "id":"org.apache.sling:org.apache.sling.graphql.samples.website:slingosgifeature:sling12:0.0.1-SNAPSHOT", + "title":"Apache Sling GraphQL Sample Website", + "description":"Demo website for the Sling GraphQL core", + "vendor":"The Apache Software Foundation", + "license":"Apache License, Version 2.0", + "variables":{}, + "bundles":[ + { + "id" : "org.apache.sling:org.apache.sling.graphql.core:0.0.1-SNAPSHOT", + "configurations" : { + "org.apache.sling.graphql.core.GraphQLServlet~default" : { + "sling.servlet.resourceTypes" : "graphql/servlet", + "sling.servlet.extensions": "json", + "sling.servlet.methods": [ "GET", "POST" ] + } + } + }, + "org.apache.sling:org.apache.sling.graphql.samples.website:0.0.1-SNAPSHOT", + "com.cedarsoftware:json-io:jar:4.12.0", + "com.graphql-java:graphql-java:jar:14.0", + "org.antlr:antlr4-runtime:jar:4.7.2", + "com.graphql-java:java-dataloader:jar:2.2.3", + "org.reactivestreams:reactive-streams:jar:1.0.2", + "org.apache.sling:org.apache.sling.servlet-helpers:jar:1.3.0" + ], + "repoinit:TEXT|true":[ + "create path (nt:unstructured) /graphql", + "set ACL for everyone", + "allow jcr:read on /graphql", + "end", + "set properties on /graphql", + "set sling:resourceType{String} to graphql/servlet", + "end" + ] +} \ No newline at end of file diff --git a/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-sling12.json b/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-sling12.json index ccd1f3f..bdca222 100644 --- a/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-sling12.json +++ b/org.apache.sling.graphql.samples.website/src/main/resources/features/feature-sling12.json @@ -1,7 +1,7 @@ { "id":"org.apache.sling:org.apache.sling.kickstart.conversion:slingosgifeature:sling12:0.0.1-SNAPSHOT", "title":"Sling 12 Feature Model", - "description":"Complete Sling 12 Feature Model", + "description":"Complete Sling 12 Feature Model - copied from the kickstart project", "vendor":"The Apache Software Foundation", "license":"Apache License, Version 2.0", "variables":{ @@ -309,7 +309,7 @@ "start-order":"15" }, { - "id":"org.apache.sling:org.apache.sling.jcr.repoinit:1.1.20", + "id":"org.apache.sling:org.apache.sling.jcr.repoinit:1.1.24", "start-order":"20", "feature-origins":"org.apache.sling:org.apache.sling.kickstart.conversion:slingfeature:repoinit:0.0.1-SNAPSHOT" }, @@ -319,7 +319,7 @@ "feature-origins":"org.apache.sling:org.apache.sling.kickstart.conversion:slingfeature:repoinit:0.0.1-SNAPSHOT" }, { - "id":"org.apache.sling:org.apache.sling.repoinit.parser:1.4.2", + "id":"org.apache.sling:org.apache.sling.repoinit.parser:1.6.2", "start-order":"20", "feature-origins":"org.apache.sling:org.apache.sling.kickstart.conversion:slingfeature:repoinit:0.0.1-SNAPSHOT" },
