graphql-sangria-demo run-service
A GraphQL demo implemented with Scala and Sangria
Options:
-h, --help Show help message
-v, --version Show version of this program
Subcommand: run-service - Starts GRAPHQL Sangria Demo as a daemon that services HTTP requests
-h, --help Show help message
---
graphql-sangria-demo run-service
- build
graphql-sangria-demo
usingmvn clean install
- make sure the dans-dev-tools are installed properly
- call
run-reset-env.sh
from the root of the project - call
run-service.sh
from the root of the project - in your browser, go to http://localhost:20200/graphiql
To interact with the GraphQL servlet, use the internal http://localhost:20200/graphiql interface. Alternatively, on Mac, use the GraphiQL.app.
To generate the latest version of the GraphQL schema for graphql-sangria-demo
:
#install get-graphql-schema
npm install -g get-graphql-schema
# (re)start the service (after: mvn clean install -DskipTests=true): see GRAPHQL INTERFACE above
get-graphql-schema http://<base-url>/graphql > docs/schema.graphql
-
Unzip the tarball to a directory of your choice, typically
/usr/local/
-
A new directory called graphql-sangria-demo- will be created
-
Add the command script to your
PATH
environment variable by creating a symbolic link to it from a directory that is on the path, e.g.ln -s /usr/local/graphql-sangria-demo-<version>/bin/graphql-sangria-demo /usr/bin
General configuration settings can be set in cfg/application.properties
and logging can be configured
in cfg/logback.xml
. The available settings are explained in comments in aforementioned files.
Prerequisites:
- Java 8 or higher
- Maven 3.3.3 or higher
Steps:
git clone https://github.com/Dans-labs/GraphQL-Sangria-Demo.git
cd graphql-sangria-demo
mvn install