2023-12-21 12:40:19 +03:00
|
|
|
# Contributing to Hasura GraphQL Engine
|
2018-07-11 07:57:03 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
_First_: if you feel insecure about how to start contributing, either to V2 or V3, feel free to ask us on our
|
|
|
|
[Discord](https://discordapp.com/invite/hasura) in the `#contrib` channel. You can also just go ahead with your
|
|
|
|
contribution, and we'll give you feedback. Don't worry - the worst that can happen is that you'll be politely asked to
|
2023-06-23 14:48:35 +03:00
|
|
|
change something. We appreciate any contributions, and we don't want a wall of rules to stand in the way of that.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This
|
|
|
|
document will cover what we're looking for. By addressing the points below, the chances that we can quickly merge or
|
|
|
|
address your contributions will increase.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
## Table of contents
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
[1. Code of conduct ](#code-of-conduct)
|
2019-11-18 08:02:34 +03:00
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
[2. Repo overview ](#overview)
|
2019-11-18 08:02:34 +03:00
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
[3. First time contributors welcome! ](#first-timers)
|
2019-11-18 08:02:34 +03:00
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
[4. Areas for contributing ](#areas)
|
2019-11-18 08:02:34 +03:00
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
[5. Ways of contributing ](#ways)
|
2019-11-18 08:02:34 +03:00
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
[6. Commit messages ](#commit-messages)
|
|
|
|
|
|
|
|
[7. Translations ](#translations)
|
|
|
|
|
|
|
|
<a name="code-of-conduct"></a>
|
|
|
|
|
|
|
|
## 1. Code of conduct
|
|
|
|
|
|
|
|
Please follow our [Code of conduct](code-of-conduct.md) in the context of any contributions made to Hasura.
|
2019-11-18 08:02:34 +03:00
|
|
|
|
|
|
|
<a name="overview"></a>
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
## 2. Repo overview
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
[hasura/graphql-engine](https://github.com/hasura/graphql-engine) is a mono-repo for both the open source V2 and V3
|
|
|
|
Hasura versions.
|
|
|
|
|
|
|
|
### V2
|
|
|
|
|
|
|
|
This V2 portion consists of 3 components and each has their own contributing guide:
|
2018-07-11 07:57:03 +03:00
|
|
|
|
|
|
|
1. [Server (Haskell)](server/CONTRIBUTING.md)
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2018-07-11 07:57:03 +03:00
|
|
|
2. [CLI (Go)](cli/CONTRIBUTING.md)
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2023-02-28 15:03:34 +03:00
|
|
|
3. [Console (JavaScript)](frontend/docs/generic-info.md#contributing-to-hasura-console)
|
2018-07-11 07:57:03 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
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.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
For all contributions, a CLA (Contributor License Agreement) needs to be signed
|
2023-06-23 14:48:35 +03:00
|
|
|
[here](https://cla-assistant.io/hasura/graphql-engine) before (or after) the pull request has been submitted. A bot will
|
|
|
|
prompt contributors to sign the CLA via a pull request comment, if necessary.
|
2018-10-01 20:09:18 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
### V3
|
|
|
|
|
|
|
|
The V3 portion is the V3 engine exclusively, the heart of Hasura, which is written in Rust.
|
|
|
|
|
|
|
|
1. [V3 Engine (Rust)](v3/CONTRIBUTING.md)
|
|
|
|
|
|
|
|
Check out the [V3 README here](/v3/README.md).
|
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
<a name="first-timers"></a>
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
## 3. First time contributors welcome!
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
We appreciate first time contributors, and we are happy to assist you in getting started. In case of questions, just
|
2023-06-23 14:48:35 +03:00
|
|
|
reach out to us!
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
You find all issues suitable for first time contributors
|
|
|
|
[here](https://github.com/hasura/graphql-engine/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
<a name="areas"></a>
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
## 4. Areas for contributing
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
Of course, we appreciate contributions to all components of Hasura. However, we have identified three areas that are
|
|
|
|
particularly suitable for open source contributions.
|
2018-10-01 20:09:18 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
### V2 Docs
|
2018-09-13 09:30:07 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
Our goal is to keep our docs comprehensive and updated. If you would like to help us in doing so, we are grateful for
|
|
|
|
any kind of contribution:
|
2019-08-14 20:38:27 +03:00
|
|
|
|
|
|
|
- Report missing content
|
|
|
|
|
|
|
|
- Fix errors in existing docs
|
|
|
|
|
|
|
|
- Help us in adding to the docs
|
|
|
|
|
|
|
|
The contributing guide for docs can be found at [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md).
|
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
### V2 Community content
|
2018-09-13 09:30:07 +03:00
|
|
|
|
2020-02-27 13:13:07 +03:00
|
|
|
Since we launched our [learn page](https://hasura.io/learn/), we are happy about contributions:
|
2019-11-18 08:02:34 +03:00
|
|
|
|
|
|
|
- Fix errors in existing learn tutorials
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
- Add new tutorials (please reach out to us if you have ideas to avoid duplicate word)
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
The README of the learn repository can be found [here](https://github.com/hasura/learn-graphql).
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
Apart from the learn content, we have identified three other ways of contributing with technical community content:
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
- [Boilerplates](https://github.com/hasura/graphql-engine/tree/master/community/boilerplates)
|
|
|
|
|
2023-06-30 16:46:41 +03:00
|
|
|
- [Sample apps](https://github.com/hasura/sample-apps/tree/main)
|
2019-11-18 08:02:34 +03:00
|
|
|
|
|
|
|
- [Tools](community/tools)
|
|
|
|
|
|
|
|
If you would like to contribute to the community by
|
|
|
|
|
|
|
|
- writing a technical blogpost
|
|
|
|
|
|
|
|
- speaking at an event
|
|
|
|
|
|
|
|
- organizing a workshop
|
|
|
|
|
|
|
|
check out our [community wiki](https://github.com/hasura/graphql-engine/wiki/Community-Wiki).
|
|
|
|
|
|
|
|
Feel free to submit a pull request if you have something to add even if it's not related to anything mentioned above.
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2023-12-21 12:40:19 +03:00
|
|
|
### V2 CLI
|
2019-08-14 20:38:27 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
We have some issues on the CLI that are suitable for open source contributions. If you know Go or if you would like to
|
|
|
|
learn it by doing, check out the following
|
|
|
|
[issues](https://github.com/hasura/graphql-engine/issues?q=is%3Aopen+is%3Aissue+label%3Ac%2Fcli+label%3A%22help+wanted%22).
|
2019-08-14 20:38:27 +03:00
|
|
|
|
|
|
|
The README of the CLI repository can be found [here](https://github.com/hasura/graphql-engine/tree/master/cli).
|
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
<a name="ways"></a>
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
## 5. Ways of contributing
|
2018-07-11 13:34:29 +03:00
|
|
|
|
|
|
|
### Reporting an Issue
|
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
- Make sure you test against the latest released version. It is possible that we may have already fixed the bug you're
|
|
|
|
experiencing.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
- Provide steps to reproduce the issue, including Postgres version, graphql-engine version and the provider you are
|
|
|
|
running on (Heroku, Docker, etc.).
|
2018-07-11 13:34:29 +03:00
|
|
|
|
|
|
|
- Please include logs of the server, if relevant.
|
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
- Create a [issue](https://github.com/hasura/graphql-engine/issues/new/choose).
|
|
|
|
|
2019-08-14 20:38:27 +03:00
|
|
|
### Working on an issue
|
2018-07-11 07:57:03 +03:00
|
|
|
|
2020-06-30 14:01:53 +03:00
|
|
|
- We use the [fork-and-branch git workflow](https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/).
|
|
|
|
|
2018-07-11 13:34:29 +03:00
|
|
|
- Please make sure there is an issue associated with the work that you're doing.
|
|
|
|
|
2019-08-14 20:38:27 +03:00
|
|
|
- If you're working on an issue, please comment that you are doing so to prevent duplicate work by others also.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
- Squash your commits and refer to the issue using `fix #<issue-no>` or `close #<issue-no>` in the commit message, at
|
|
|
|
the end. For example: `resolve answers to everything (fix #42)` or `resolve answers to everything, fix #42`
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2018-10-04 17:25:46 +03:00
|
|
|
- Rebase master with your branch before submitting a pull request.
|
2018-07-20 22:05:51 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
<a name="commit-messages"></a>
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
## 6. Commit messages
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2023-06-23 14:48:35 +03:00
|
|
|
- The first line should be a summary of the changes, not exceeding 50 characters, followed by an optional body which has
|
|
|
|
more details about the changes. Refer to [this link](https://github.com/erlang/otp/wiki/writing-good-commit-messages)
|
2018-10-19 19:59:18 +03:00
|
|
|
for more information on writing good commit messages.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2018-10-19 19:59:18 +03:00
|
|
|
- Use the imperative present tense: "add/fix/change", not "added/fixed/changed" nor "adds/fixes/changes".
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2018-10-19 19:59:18 +03:00
|
|
|
- Don't capitalize the first letter of the summary line.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2018-10-19 19:59:18 +03:00
|
|
|
- Don't add a period/dot (.) at the end of the summary line.
|
2018-07-11 13:34:29 +03:00
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
<a name="translations"></a>
|
|
|
|
|
2020-01-09 14:47:03 +03:00
|
|
|
## 7. Translations
|
2019-04-15 11:16:32 +03:00
|
|
|
|
|
|
|
This document is available in the following translations:
|
|
|
|
|
2019-11-18 08:02:34 +03:00
|
|
|
- [French 🇫🇷](translations/CONTRIBUTING.french.md)
|
2018-07-11 13:34:29 +03:00
|
|
|
|
|
|
|
(Credits: Some sections are adapted from https://github.com/PostgREST/postgrest/blob/master/.github/CONTRIBUTING.md)
|