这是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
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Contributing

[hasura/graphql-engine](https://github.com/hasura/graphql-engine) is a mono-repo consisting of 3 components. Each have their own contributing guides:

1. [Server (Haskell)](server/CONTRIBUTING.md)
2. [CLI (Go)](cli/CONTRIBUTING.md)
3. [Console (JavaScript)](console/CONTRIBUTING.md)

All of the three components have a single version, denoted by either the git tag or a combination of branch name and git commit sha.

## Common guidelines

- Please make sure there is an issue associated with the work the work you're doing.
- If you're working on an issue, please comment that you are doing so to prevent duplicate work by others also.
- Squash your commits and refer to the issue using `fix #<issue-no>` or `close #<issue-no>` in the commit message.
- Commit messages:
- Please keep the it under 100 characters. This allows the message to be easier to read on github as well as in various git tools and produces a nice, neat commit log
- Use the imperative present tense: "change" not "changed" nor "changes"
- Don't capitalize the first letter
- Do not add a dot (.) at the end
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Hasura GraphQL Engine

[![CircleCI](https://circleci.com/gh/hasura/graphql-engine.svg?style=svg)](https://circleci.com/gh/hasura/graphql-engine)

Source code for Hasura's GraphQL Engine, including CLI, API Console and Server.

## Getting started

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

Follow the [official docs](https://docs.hasura.io/1.0/graphql/manual/getting-started/index.html).

## Contributing

Checkout our [contributing guide](CONTRIBUTING.md) for more details.
35 changes: 33 additions & 2 deletions cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
# Contributing

Thanks for you interest in Hasura GraphQL Engine CLI.

## Pre-requisites

- [Go 1.10](https://golang.org/doc/install)
- [GNU Make](https://www.gnu.org/software/make/)


You can follow your existing Golang workflow to fork, work on a branch and
submit PR. If you're new to forking and working on Golang repositories, please
follow the instructions below to make sure the import paths are correct.
follow the instructions below to make sure the import paths are correct:

- Fork the repo
- Fork the repo on GitHub
- `mkdir -p $GOPATH/src/github.com/hasura`
- `cd $GOPATH/src/github.com/hasura`
- `git clone https://github.com/<your-username>/graphql-engine`
- `cd graphql-engine`
- `git remote add upstream https://github.com/hasura/graphql-engine`
- `git checkout -b <branch-name>`
- `make deps`
- Work on the feature/fix
- If you modify files in `assets/`, run `make assets`
- Add tests and ensure all tests are passing (`make test`)
- Commit, push and submit PR

Expand All @@ -32,3 +42,24 @@ workflow. The `.realize.yaml` config is already included in the repo.
`realize` watches the directory for changes and rebuilds the cli whenever a new
change happens. The cli is installed to `$GOPATH/bin/hasura`, which should
already be in your `PATH`. The config is located at `.realize/realize.yaml`.

## Tests

When you're adding a new feature, it is encouraged to add integration tests (unit tests also if possible) for the functions/api. You should run all the test and make sure everything passes before submitting the PR.

The tests expect a GraphQL Engine server instance to be running. You can point the tests to any GraphQL Engine server but please note that **the database should be empty**. The easiest way to do this is to run an Postgres and GraphQL Engine using [Docker Compose](https://github.com/hasura/graphql-engine-install-manifests). Once the server is running, you can run the tests by executing the make command:

```bash
HASURA_GRAPHQL_TEST_ENDPOINT=http://localhost:8080 make test
```

## Builds

To build a binary, execute the following command:

```bash
# make deps to install all go packages
make build
```

This will output cross-platform binaries to `_output` directory.
3 changes: 3 additions & 0 deletions server/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

TODO