Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pleshevskiy/rust-juniper-graphql-diesel-rocket-example
This is example for server with graphql and db on rust language
https://github.com/pleshevskiy/rust-juniper-graphql-diesel-rocket-example
boilerplate database diesel example itconfig juniper rocket rust template
Last synced: 5 days ago
JSON representation
This is example for server with graphql and db on rust language
- Host: GitHub
- URL: https://github.com/pleshevskiy/rust-juniper-graphql-diesel-rocket-example
- Owner: pleshevskiy
- License: mit
- Archived: true
- Created: 2019-12-17T13:46:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-16T19:52:59.000Z (almost 4 years ago)
- Last Synced: 2024-09-27T07:23:23.045Z (4 months ago)
- Topics: boilerplate, database, diesel, example, itconfig, juniper, rocket, rust, template
- Language: Rust
- Homepage:
- Size: 37.1 KB
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Juniper GraphQL Diesel Rocket Example
Clone this project and follow the instructions below and start playing today!
Unlike the [Rocket example](https://github.com/graphql-rust/juniper/blob/master/juniper_rocket/examples/rocket_server.rs) in the Juniper repo, it can be built without relying on types defined in Juniper tests.## Running the project
Since Rocket uses the latest and greatest features of Rust, you need to use a nightly version of rust.
As per the [Rocket documentation](https://rocket.rs/guide/getting-started/), you can do this using```bash
rustup default nightly
```or per project basis
```bash
rustup override set nightly
```Need to install diesel_cli for database managing
```bash
cargo install diesel_cli
```Run example database and run migrations using
```bash
docker-compose -f docker-compose.example.yml
diesel migration run
```Lastly, you can run the server using
```bash
cargo run
```If all goes well, you will be able to visit http://localhost:8000/ with a graphiql interface.
## Attributions
Thank you for examples:
* [Rust-Juniper-Rocket-GraphQL-Example](https://github.com/martimatix/Rust-Juniper-Rocket-GraphQL-Example)
* [rocket-diesel-rest-api-example](https://github.com/sean3z/rocket-diesel-rest-api-example)
* [juniper-example-todo-backend](https://github.com/mhallin/juniper-example-todo-backend)