@@ -83,13 +83,30 @@ The custom GraphQL linter includes the following built-in rules:
8383| ` no-duplicate-fields ` | error | Prevent duplicate field definitions |
8484| ` require-description ` | warn | Require descriptions for types/fields |
8585| ` require-deprecation-reason ` | warn | Require reason for deprecated fields |
86+ | ` field-naming-convention ` | warn | Enforce camelCase field naming |
87+ | ` root-fields-nullable ` | warn | Suggest nullable root field types |
88+
89+ ### Pagination Rules
90+
91+ | Rule | Severity | Description |
92+ | ------------------------------ | -------- | ---------------------------------------------- |
93+ | ` connection-structure ` | error | Ensure Connection types have edges/pageInfo |
94+ | ` edge-structure ` | error | Ensure Edge types have node/cursor fields |
95+ | ` connection-arguments ` | warn | Suggest pagination arguments for connections |
96+ | ` pagination-argument-types ` | error | Enforce correct types for pagination arguments |
8697
8798### Rule Details
8899
89100- ** no-anonymous-operations** : Ensures all GraphQL operations (queries, mutations, subscriptions) have names
90101- ** no-duplicate-fields** : Prevents duplicate field definitions within the same type
91102- ** require-description** : Suggests adding descriptions to types and fields for better documentation
92103- ** require-deprecation-reason** : Ensures deprecated fields include a reason for deprecation
104+ - ** field-naming-convention** : Enforces camelCase naming for field names (ignores special fields like ` __typename ` )
105+ - ** root-fields-nullable** : Suggests making root type fields nullable for better error handling
106+ - ** connection-structure** : Ensures Connection types follow the Relay pagination pattern with ` edges ` and ` pageInfo ` fields
107+ - ** edge-structure** : Ensures Edge types have the required ` node ` and ` cursor ` fields
108+ - ** connection-arguments** : Suggests adding ` first ` and ` after ` arguments to fields returning Connection types
109+ - ** pagination-argument-types** : Enforces correct types for pagination arguments (` first: Int! ` , ` after: String ` )
93110
94111## Usage
95112
0 commit comments