README
diff --git a/graphql-scripting/README.md b/graphql-scripting/README.md
index 67fdc0d..3bf5c6d 100644
--- a/graphql-scripting/README.md
+++ b/graphql-scripting/README.md
@@ -1,11 +1,19 @@
-Apache Sling GraphQL Scripting Engine
+Apache Sling GraphQL Core
----
-This is an experimental module for running GraphQL queries in Sling.
+This module allows for running GraphQL queries in Sling, using dynamically built GraphQL schemas and
+OSGi services for data fetchers (aka "resolvers") which provide the data.
-----
+To take advantage of Sling's flexibility, it allows for running GraphQL queries in three different modes,
+using client or server-side queries and optionally being bound to the current Sling Resource.
-## Enabling Multiple GraphQL endpoint styles
+Server-side queries are implemented as a Sling Script Engine.
+
+The current version uses the [graphql-java](https://github.com/graphql-java/graphql-java) library, which
+is exposed by the `org.apache.sling.graphql.api.graphqljava` interfaces. We might later remove this dependency
+by creating a facade that abstracts these things, if needed.
+
+## Supported GraphQL endpoint styles
This module enables the following GraphQL "styles"
@@ -18,22 +26,10 @@
The GraphQL requests can hit a Sling resource in all cases, there's no need for path-mounted servlets which are [not desirable](https://sling.apache.org/documentation/the-sling-engine/servlets.html#caveats-when-binding-servlets-by-path-1).
-## Status at commit 13847b2b
-
-The GraphQL engine is functional, a request to a Resource `/foo` mapped to a .gql script containing
-`{ currentResource { path } }` returns `{currentResource={path=/foo}}`.
-This demonstrates the server-side execution of GraphQL queries, in the context of the current Resource.
-
-A (rough) `GraphQLServlet` allows for implementing either a traditional GraphQL single-path endpoint,
-or turning any Sling Resource into a GraphQL endpoint. See the comments in that class.
-
-The GraphQL schema is provided by a sub-request using the `.GQLschema` extension - this allows us to
-implement any suitable dynamic mechanism to provide it.
-
-----
-
## Decorating the schemas with DataFetcher definitions
+TODO rework this section and point to the corresponding tests.
+
With dynamic schemas, I think the mapping of types and/or fields to DataFetchers belongs in them.
We can use structured comments in the schemas for this so that they stay syntactically valid.
@@ -70,11 +66,13 @@
## How to test this in a Sling instance
-See the `GraphQLScriptingTestSupport.graphQLJava()` method for which bundles
-are required for this bundle to start.
+See the `GraphQLScriptingTestSupport` class for which bundles need to be added to
+a Sling Starter instance to support this bundle.
-A simple way to install them in a Sling starter instance (running under JDK11
-or later) is:
+A simple way to install them in a Sling starter instance is:
+
+ # Adapt this list based on the current version of the GraphQLScriptingTestSupport class!
+ export B="graphql reactive antlr dataloader"
mvn dependency:copy-dependencies
export S=http://localhost:8080
@@ -82,7 +80,6 @@
curl -u admin:admin -X MKCOL $S/apps/gql
curl -u admin:admin -X MKCOL $S/apps/gql/install
curl -u admin:admin -X MKCOL $S/apps/gql/install/15
- export B="graphql reactive antlr dataloader"
for bundle in $B
do
path=$(ls target/dependency/*${bundle}* | head -1)
@@ -90,9 +87,9 @@
curl -u admin:admin -T $path ${S}/apps/gql/install/15/${filename}
done
-For some reason, as of April 14th the `org.apache.sling.installer.factory.packages` bundle
-has to be stopped for this to work - didn't investigate so far.
-
And then install this bundle using for example
mvn clean install sling:install
+
+For some reason, as of April 14th the `org.apache.sling.installer.factory.packages` bundle
+has to be stopped for this to work - didn't investigate so far.
\ No newline at end of file