Enforce naming convention for GraphQL files based on best practices
- Dominant language
- Python
- Stars
- 17
- Forks
- 10
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
To adopt and enforce best practices when it comes to naming.
* Names must have the following cases:
```yaml
# ----------------------------------------
# Examples:
# ----------------------------------------
# alternatingcase("Hello, world!") --> "hElLo WoRlD"
# camelcase("Hello, world!") --> "helloWorld"
# cobolcase("Hello, world!") --> "HELLO-WORLD"
# flatcase("Hello, world!") --> "helloworld"
# kebabcase("Hello, world!") --> "hello-world"
# macrocase("Hello, world!") --> "HELLO_WORLD"
# pascalcase("Hello, world!")= "HelloWorld"
#
# For other alternatives, see: https://github.com/chrisdoherty4/python-case-converter
#
# ----------------------------------------
# GraphQL SDL default naming conventions
# ----------------------------------------
type:
name: pascalcase
interface:
name: pascalcase
enum:
name: pascalcase
value: macrocase
field:
name: camelcase
argument: camelcase
input
name: pascalcase
union:
name: pascalcase
scalar:
name: pascalcase
```
* If a field has an output type with a `List` modifier, then its name must be plural.
```gql
type Example {
passenger: [Person] # <-- This is wrong!
passengers: [Person] # <-- Correct
}
```
Contributor guide
Research direction
No file or test is named; search the repository for the GraphQL SDL parsing or validation entry point, using the issue's examples as cases. Done means the specified naming conventions and plural names for list-valued fields are enforced, with tests covering violations and accepted names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, python
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100