2020-10-01 18:57:23 +00:00
|
|
|
# Contribute to the Railway CLI
|
|
|
|
|
|
2023-03-04 02:44:32 +00:00
|
|
|
## Prerequisites
|
2024-10-21 22:55:37 +00:00
|
|
|
|
2023-03-04 02:44:32 +00:00
|
|
|
- [Rust](https://www.rust-lang.org/tools/install)
|
|
|
|
|
- [CMake](https://cmake.org/install/)
|
2020-10-01 18:57:23 +00:00
|
|
|
|
2023-03-04 02:44:32 +00:00
|
|
|
OR
|
2020-10-01 18:57:23 +00:00
|
|
|
|
2023-03-04 02:44:32 +00:00
|
|
|
- [Nix](https://nixos.org/download.html)
|
2020-10-01 18:57:23 +00:00
|
|
|
|
2024-08-29 00:08:46 +00:00
|
|
|
## Setting Up with Nix
|
2024-10-21 22:55:37 +00:00
|
|
|
|
2024-08-29 00:08:46 +00:00
|
|
|
Use `nix-shell` to enter an environment with all necessary dependencies.
|
2020-10-01 18:57:23 +00:00
|
|
|
|
2024-08-29 00:08:46 +00:00
|
|
|
## Running and Building
|
2024-10-21 22:55:37 +00:00
|
|
|
|
2024-08-29 00:08:46 +00:00
|
|
|
- Run the binary with: `cargo run -- <args>`
|
|
|
|
|
- Build the binary with: `cargo build --release`
|
2024-10-21 22:55:37 +00:00
|
|
|
|
|
|
|
|
## Generating the Schema
|
|
|
|
|
|
|
|
|
|
Install `graphql-client` with cargo:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
cargo install graphql_client_cli
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then, run the following command to generate the schema:
|
|
|
|
|
|
|
|
|
|
```sh
|
2025-01-08 19:33:37 +00:00
|
|
|
graphql-client introspect-schema https://backboard.railway.com/graphql/v2 > src/gql/schema.json
|
2024-10-21 22:55:37 +00:00
|
|
|
```
|