1
0
mirror of https://github.com/actix/examples synced 2024-12-18 00:13:57 +01:00
examples/graphql/juniper-advanced
Pete Doherty c34afd32fa
Fix small issues in juniper-advanced example (#673)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-12-11 06:54:22 +00:00
..
src Fix small issues in juniper-advanced example (#673) 2023-12-11 06:54:22 +00:00
.env.example update graphql advanced example 2022-02-17 20:59:04 +00:00
Cargo.toml migrate to dotenvy 2023-10-29 01:17:49 +01:00
mysql-schema.sql Fix small issues in juniper-advanced example (#673) 2023-12-11 06:54:22 +00:00
README.md update async-graphql example 2022-02-17 21:29:55 +00:00

GraphQL using Juniper and MySQL

GraphQL Implementation in Rust using Actix, Juniper, and MySQL as Database

Prerequisites

  • MySQL server

Database Configuration

Create a new database for this project, and import the existing database schema has been provided named mysql-schema.sql.

Create .env file on the root directory of this project and set environment variable named DATABASE_URL, the example file has been provided named .env.example, you can see the format in there.

cat mysql-schema.sql | mysql -u root -D graphql_testing

Usage

cd graphql/juniper-advanced
cp .env.example .env
# edit .env and insert your DB credentials
cargo run

GraphQL Playground

GraphQL provides its own documentation. Click the "docs" link in the top right of the GraphiQL UI to see what types of queries and mutations are possible.

http://localhost:8080/graphiql