mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
update async-graphql example
This commit is contained in:
38
graphql/async-graphql/README.md
Normal file
38
graphql/async-graphql/README.md
Normal file
@ -0,0 +1,38 @@
|
||||
## GraphQL using `async-graphql`
|
||||
|
||||
> Getting started using [async-graphql](https://github.com/async-graphql/async-graphql) with Actix Web.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
cd graphql/graphql-demo
|
||||
cargo run
|
||||
```
|
||||
|
||||
## Endpoints
|
||||
|
||||
```
|
||||
GET/POST http://localhost:8080/graphql GraphQL endpoint
|
||||
GET http://localhost:8080/graphiql GraphQL playground UI
|
||||
```
|
||||
|
||||
## Query Examples
|
||||
|
||||
```graphql
|
||||
{
|
||||
humans {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
friends {
|
||||
id
|
||||
name
|
||||
}
|
||||
appearsIn
|
||||
homePlanet
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user