这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 68 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,82 @@
# Hasura GraphQL Engine

[![CircleCI](https://circleci.com/gh/hasura/graphql-engine.svg?style=svg)](https://circleci.com/gh/hasura/graphql-engine)
[![Docs](https://img.shields.io/badge/docs-v1.0-brightgreen.svg?style=flat)](https://docs.hasura.io)
[![Release](https://img.shields.io/github/release/hasura/graphql-engine/all.svg?style=flat)](https://github.com/hasura/graphql-engine/releases)
[![CircleCI](https://circleci.com/gh/hasura/graphql-engine.svg?style=shield)](https://circleci.com/gh/hasura/graphql-engine)
[![Docker pull](https://img.shields.io/docker/pulls/hasura/graphql-engine.svg?style=flat)](https://hub.docker.com/r/hasura/graphql-engine/)
![Docker image size](https://img.shields.io/microbadger/image-size/hasura/graphql-engine/latest.svg)

Source code for Hasura's GraphQL Engine, including CLI, API Console and Server.
[![Chat on Discord](https://img.shields.io/discord/407792526867693568.svg?logo=discord&style=flat)](https://discord.gg/AnmPAz3)
[![Follow on Twitter](https://img.shields.io/twitter/follow/HasuraHQ.svg?style=flat&logo=twitter)](https://twitter.com/intent/follow?screen_name=HasuraHQ)

## Getting started
![Hasura GraphQL Engine Banner](assets/banner.png)

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)
Hasura GraphQL Engine is a performant GraphQL server that provides **ready-to-use GraphQL API over Postgres** by auto-generating GraphQL schema and corresponding resolvers.

Follow the [official docs](https://docs.hasura.io/1.0/graphql/manual/getting-started/index.html).
* **Make powerful queries**: built-in filtering, pagination, and pattern search arguments and operators
* **Works with existing database**: point it to an existing, living Postgres database to get instant GraphQL API
* **Fine-grained access control**: dynamic access control that
integrates with your auth
* **Light-weight & performant**: 20MB docker image; ~60MB RAM @ 1000 req/s; multi-core aware
* **Dev friendly**: admin UI & Rails-inspired schema migrations
* **Postgres** ❤️: supports Postgres types (PostGIS/geo-location, etc.), turns views to *graphs*, trigger stored functions or procedures with
mutations

## Quickstart - Setup on Heroku

:information_source: *no credit-card required*; sign-up may be required

1. Click on the following button to deploy GraphQL Engine on Heroku and provision the free Postgres add-on:

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)

2. Open the admin console

Visit https://\<app-name\>.herokuapp.com (*replace \<app-name\> with your app name*) to open the admin console.

3. Make your first GraphQL query

Create test tables and instantly run your first query. Follow this [simple guide](https://docs.hasura.io/1.0/graphql/manual/getting-started/first-graphql-query.html).

### Other deployment methods

For Docker-based deployment and advanced configuration options, see deployment guides [here](https://docs.hasura.io/1.0/graphql/manual/getting-started/index.html).

## Architecture

The Hasura GraphQL Engine fronts a Postgres database instance and can serve as an API Gateway for all data requests from client apps. It can be configured to work with your existing Auth middleware to handle access control to data using field-level rules with dynamic variables.

The GraphQL Engine is a standalone, multi-core aware component that can be scaled vertically and horizontally.

![Hasura GraphQL Engine architecture](https://hasura.io/rstatic/dist/3021ad7d73fb15e8f7bdf86612ebd8a9.png)

You can also place the engine behind a central GraphQL proxy that fronts multiple GraphQL APIs via schema stitching.

![GraphQL Engine schema-stitched architecture](https://docs.platform.hasura.io/0.15/_images/graphql-schema-stitching.png)

## Client-side tooling

GraphQL Engine provides an HTTP API. This means you can use any client-side tool or library to query the endpoint. To fully leverage GraphQL, it is recommended that you use GraphQL specific client-side tooling like [Apollo Client](https://github.com/apollographql/apollo-client), [Relay](https://github.com/facebook/relay), etc. See [awesome-graphql](https://github.com/chentsulin/awesome-graphql) for a list of such tools.

## Community

GraphQL Engine has a burgeoning community of amazing developers! Come join the community using your preferred means of communication:

- [Discord](https://discord.gg/vBPpJkS)
- [Intercom chat](https://hasura.io/help)
- [Twitter](https://twitter.com/hasurahq)
- [Email](mailto:build@hasura.io)
- [Facebook](https://www.facebook.com/HasuraHQ/)
- [Docs](https://docs.hasura.io)

We are committed to fostering an open and welcoming environment in the community. Please see the [Code of Conduct](code-of-conduct.md) (*adapted from the [Contributor Covenant](https://www.contributor-covenant.org])*).

## Contributing

Checkout our [contributing guide](CONTRIBUTING.md) for more details.

## License

GraphQL Engine is available under the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html) (AGPL-3.0). [Why AGPL](https://gist.github.com/hasura-bot/9c36a0201a7563f7762b265a12b044d5).

:information_source: If you are not satisfied with this license, commercial licenses are available on request. Please feel free to contact us at build@hasura.io or [hasura.io/help](https://hasura.io/help).

GraphQL Engine is available under the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html) (AGPL-3.0). [Why AGPL?](https://gist.github.com/hasura-bot/9c36a0201a7563f7762b265a12b044d5).

:information_source: Commercial licenses are available on request. Please feel free to contact us at build@hasura.io or [hasura.io/help](https://hasura.io/help).
Binary file added assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Hasura GraphQL Engine Community Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at build@hasura.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org