pleshevskiy / rust-juniper-graphql-diesel-rocket-example

This is example for server with graphql and db on rust language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust Juniper GraphQL Diesel Rocket Example

Clone this project and follow the instructions below and start playing today! Unlike the Rocket example 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, you can do this using

rustup default nightly

or per project basis

rustup override set nightly

Need to install diesel_cli for database managing

cargo install diesel_cli

Run example database and run migrations using

docker-compose -f docker-compose.example.yml
diesel migration run

Lastly, you can run the server using

cargo run

If all goes well, you will be able to visit http://localhost:8000/ with a graphiql interface.

Attributions

Thank you for examples:

About

This is example for server with graphql and db on rust language

License:MIT License


Languages

Language:Rust 87.6%Language:PLpgSQL 11.8%Language:Shell 0.6%