Skip to content

Dans-labs/GraphQL-Sangria-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-sangria-demo

Build Status

SYNOPSIS

graphql-sangria-demo run-service

DESCRIPTION

A GraphQL demo implemented with Scala and Sangria

ARGUMENTS

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
---

EXAMPLES

graphql-sangria-demo run-service

GRAPHQL INTERFACE

  1. build graphql-sangria-demo using mvn clean install
  2. make sure the dans-dev-tools are installed properly
  3. call run-reset-env.sh from the root of the project
  4. call run-service.sh from the root of the project
  5. in your browser, go to http://localhost:20200/graphiql

GRAPHIQL TOOLS

To interact with the GraphQL servlet, use the internal http://localhost:20200/graphiql interface. Alternatively, on Mac, use the GraphiQL.app.

GRAPHQL SCHEMA

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

INSTALLATION AND CONFIGURATION

  1. Unzip the tarball to a directory of your choice, typically /usr/local/

  2. A new directory called graphql-sangria-demo- will be created

  3. 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.

BUILDING FROM SOURCE

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

About

A GraphQL demo implemented with Scala and Sangria

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published