magento / magento/architecture

Code Style Guidelines for GraphQL

Open
#269 4 comments 0 reactions 2 assignees View on GitHub

@paliarush is already working on this.

Since Sep 10, 2019.

Dominant language
No language data
Stars
278
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Document code style guidelines for GraphQL schema.
Currently, the following unwritten agreements exist:
1. `quantity` should be used, not `qty`
2. [Camel case](https://en.wikipedia.org/wiki/Camel_case) SHOULD be used for queries and mutations (root-level fields)
3. [Camel case](https://en.wikipedia.org/wiki/Camel_case) SHOULD be used for arguments
3.1. Investigate if Snake case should be used (in case it's already more widely used than Camel case)
4. [Upper camel case](https://en.wikipedia.org/wiki/Camel_case) SHOULD be used for types
5. [Snake case](https://en.wikipedia.org/wiki/Snake_case) SHOULD be used for fields

* Investigate if the above rules make sense or other agreements should be introduced. Document the agreements as guidelines.
* Investigate if any other code style guidelines make sense and document them.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.