async-graphql/README.md

101 lines
4.0 KiB
Markdown
Raw Normal View History

2020-05-25 21:37:46 +00:00
# A GraphQL server library implemented in Rust
2020-03-01 13:56:14 +00:00
<div align="center">
<!-- CI -->
2020-04-28 07:41:31 +00:00
<img src="https://github.com/async-graphql/async-graphql/workflows/CI/badge.svg" />
2020-04-05 08:22:13 +00:00
<!-- codecov -->
2020-04-28 07:55:28 +00:00
<img src="https://codecov.io/gh/sunli829/async-graphql/branch/master/graph/badge.svg" />
2020-03-01 13:56:14 +00:00
<!-- Crates version -->
<a href="https://crates.io/crates/async-graphql">
<img src="https://img.shields.io/crates/v/async-graphql.svg?style=flat-square"
alt="Crates.io version" />
</a>
<!-- Downloads -->
<a href="https://crates.io/crates/async-graphql">
<img src="https://img.shields.io/crates/d/async-graphql.svg?style=flat-square"
alt="Download" />
</a>
<!-- docs.rs docs -->
<a href="https://docs.rs/async-graphql">
<img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square"
alt="docs.rs docs" />
</a>
</div>
2020-05-03 13:46:38 +00:00
`Async-graphql` is a high-performance server-side library that supports all GraphQL specifications.
2020-03-12 09:21:49 +00:00
2020-05-03 13:46:38 +00:00
* [Feature Comparison](feature-comparison.md)
2020-05-10 01:41:13 +00:00
* [Book](https://async-graphql.github.io/async-graphql/en/index.html)
* [中文文档](https://async-graphql.github.io/async-graphql/zh-CN/index.html)
2020-03-21 07:11:46 +00:00
* [Docs](https://docs.rs/async-graphql)
2020-04-28 07:41:31 +00:00
* [GitHub repository](https://github.com/async-graphql/async-graphql)
2020-03-01 13:56:14 +00:00
* [Cargo package](https://crates.io/crates/async-graphql)
* Minimum supported Rust version: 1.42 or later
2020-03-01 13:56:14 +00:00
## Stability: Unstable & Experimental
__This project doesn't currently follow SemVer, and there can be breaking changes on any version numbers. We will begin following SemVer once the project reaches v2.0.0__
Even though this project is above v1.0.0, we are rapidly changing and improving the API. This has caused versioning problems that aren't easily resolved because the project became popular very quickly (it was only started in March 2020).
We currently plan to start following SemVer once we reach the v2.0.0 release, which will happen once the API starts to stabilize. Unfortunately, we don't currently have the timeline for this.
If things don't seem to be compiling after an upgrade, it is likely you'll need to dive into compiler errors to update some syntax that changed. Feel free to open an issue if something seems weird!
2020-04-14 01:53:17 +00:00
## Examples
2020-03-09 12:44:31 +00:00
2020-04-28 07:41:31 +00:00
If you are just getting started, we recommend checking out our examples at: https://github.com/async-graphql/examples
2020-04-23 05:58:34 +00:00
2020-04-28 12:36:47 +00:00
To see how you would create a Relay-compliant server using async-graphql, warp, diesel & postgresql, you can also check out a real-world example at: https://github.com/phated/twentyfive-stars
2020-03-09 12:44:31 +00:00
2020-04-02 07:51:04 +00:00
## Benchmark
```shell script
2020-04-28 07:41:31 +00:00
git clone https://github.com/async-graphql/benchmark
2020-04-02 07:51:04 +00:00
cargo run --release
```
2020-03-02 00:24:49 +00:00
## Features
2020-03-17 11:11:14 +00:00
* Fully support async/await
* Type safety
* Rustfmt friendly (Procedural Macro)
* Custom scalar
* Minimal overhead
* Easy integration (hyper, actix_web, tide ...)
* Upload files (Multipart request)
2020-03-20 03:56:08 +00:00
* Subscription (WebSocket transport)
2020-03-26 03:34:28 +00:00
* Custom extension
* Apollo Tracing extension
* Limit query complexity/depth
2020-03-29 16:00:56 +00:00
* Error Extensions
2020-04-10 02:26:08 +00:00
* Apollo Federation
2020-03-20 03:56:08 +00:00
2020-03-18 00:44:41 +00:00
## Integrations
* Actix-web [async-graphql-actix-web](https://crates.io/crates/async-graphql-actix-web)
2020-04-14 03:44:08 +00:00
* Warp [async-graphql-warp](https://crates.io/crates/async-graphql-warp)
2020-04-26 15:10:16 +00:00
* Tide [async-graphql-tide](https://crates.io/crates/async-graphql-tide)
2020-03-18 00:44:41 +00:00
2020-03-03 03:48:00 +00:00
## License
Licensed under either of
* Apache License, Version 2.0,
(./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
2020-03-01 14:13:37 +00:00
2020-03-01 13:56:14 +00:00
## References
* [GraphQL](https://graphql.org)
2020-03-19 09:20:12 +00:00
* [GraphQL Multipart Request](https://github.com/jaydenseric/graphql-multipart-request-spec)
* [GraphQL Cursor Connections Specification](https://facebook.github.io/relay/graphql/connections.htm)
* [GraphQL over WebSocket Protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md)
2020-03-26 03:34:28 +00:00
* [Apollo Tracing](https://github.com/apollographql/apollo-tracing)
2020-04-10 02:28:27 +00:00
* [Apollo Federation](https://www.apollographql.com/docs/apollo-server/federation/introduction)
2020-03-22 08:45:59 +00:00
## Contribute
2020-05-25 21:37:46 +00:00
Welcome to contribute !