Skip to content

yoshiyu0922/scala-graphql-sangaria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scala-graphql-sangaria

概要

GraphQLアプリの雛形

Environments

  • Scala 2.12.8
  • PlayFramework 2.7.2
  • sbt 1.2.8
  • scalikejdbc 3.2
  • jwt-play-json 2.1.0
  • sangria 1.4.2 (GraphQL library)
  • Docker

環境構築

1. docker-compose up

$ cd docker

$ docker-compose up

2. migration

$ cd migration

$ sbt flywayMigrate

3. アプリを起動

$ cd api

$ sbt run

call API

  • GraphiQLをインストールする
  • 認証は以下を呼べばトークンを取得できる
mutation auth {
  auth(
    userId: "yoshiyu0922"
    password: "test"
  ) {
    token
  }
}

Other Commands

create jar

$ sbt assembly

create scala-doc

$ sbt doc

deploy

$ sbt dist

$ unzip target/universal/sangaria-graphql-app-1.0-SNAPSHOT.zip

$ ./sangaria-graphql-app-1.0-SNAPSHOT/bin/sangaria-graphql-app 
sbt scalafmt

Releases

No releases published

Packages

No packages published

Languages