Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.56 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.56 KB

Dicebag UI

This is the UI project powering Dicebag.

Getting Started

This project uses Trunk for development.

trunk serve

Environment Variables

The dicebag frontend uses the following environment variables:

  • API_URL: Defaults to http://127.0.0.1:8080/graphql if not provided

I would like to use dotenv like the server project does, but Trunk requires the environment variables to be included in the build at build time. Unfortunately, this doesn't work with CI/CD because there is no .env file. I would prefer to have a default as I do with the option_env! macro, but dotenv doesn't support this at the time of this writing.

When building dicebag for production use, you must include the API_URL in the build command.

Getting the Schema

This project uses the Juniper graphql-client CLI tool to fetch the server schema.

While running the server project locally, you can use the following command to update the schema at any time:

graphql-client introspect-schema --output src/graphql/schema.json http://127.0.0.1:8000

Generating Types

This project uses the Juniper graphql-client CLI tool

graphql-client generate --schema-path src/graphql/schema.json src/graphql/queries.graphql

Technologies Used