Example Caliban app for the talk

Slides can be found here

In this application you can create users, repos and forks and also import them from Github.

Running application

Application is in graphql package. To start server

If you want to run it against local postgres

  • go to CalibanApp and setup customLayer
  • setup db in application.conf or overwrite it env.conf

If you enable authorization in graphql.package.resolver and you can test it by inputting token to top right corner in graphiql e.g. {"name": "String", "roles": ["VIEWER"]}

Libraries used:

GraphQL tests

Tests are written in markdown files. Single file represent single request. One directory is a test suite. Requests/files are executes sequentially ordered by file names. To create test you need only extend GQLTestBase as it is done in UserTest. You can store values to cache between requests by using <<< and read them by using <<< as you can see in 01_create-user.md. Stored value might be any json, not just string. String is used only as a placeholder.

Example package

Example package contains examples shown in the talk which were not part of our application:

GithubApi.scala

Client was generated via

calibanGenClient src/main/resources/schema.docs.graphql src/main/scala/graphql/GithubApi.scala