Releases: graphql-hive/graphql-eslint
March 26, 2025
@graphql-eslint/[email protected]
Minor Changes
-
#2902
86af780
Thanks @dotansimha! - ImproveparseForESLintAPI and allow to
pass context schema as inline string.You can now use it this way:
parseForESLint(code, { schemaSdl: 'type Query { foo: String }', filePath: 'test.graphql' })
-
#2838
10b9975
Thanks @dimaMachina! - - allow to confignaming-conventionfor
Relay fragment convention<module_name>_<property_name>viarequiredPatternoption- replace
requiredPatterns: RegEx[]byrequiredPattern: RegExoption
- replace
Patch Changes
- #2845
00b4617
Thanks @dimaMachina! - add"./*"toexportsfield in
package.json
December 05, 2024
@graphql-eslint/[email protected]
Minor Changes
- #2814
ccc302d
Thanks @dimaMachina! - lint federation subgraphs schemas without
parse errors
Patch Changes
-
#2814
ccc302d
Thanks @dimaMachina! - dependencies updates:- Updated dependency
@graphql-tools/graphql-tag-pluck@^8.3.4↗︎
(from8.3.4, independencies) - Added dependency
@apollo/subgraph@^2↗︎ (to
peerDependencies)
- Updated dependency
-
#2797
b904515
Thanks @dimaMachina! - removetruthyhelper function
December 03, 2024
@graphql-eslint/[email protected]
Patch Changes
- #2805
fc2bf85
Thanks @FloEdelmann! - fix(deps): increase minimum
graphql-config version
November 29, 2024
@graphql-eslint/[email protected]
Minor Changes
- #2790
438078d
Thanks @dimaMachina! - feat(require-selectionsrule):
introduce new optionrequireAllFieldsto require all values offieldName: string[]option
November 29, 2024
@graphql-eslint/[email protected]
Patch Changes
-
#2785
99b0703
Thanks @dimaMachina! -allowLeadingUnderscoreand
allowTrailingUnderscoreshould not conflict withignorePatterninnaming-conventionrule -
#2787
f370359
Thanks @dimaMachina! - add an example with
custom graphql rules
November 29, 2024
@graphql-eslint/[email protected]
Minor Changes
-
#2780
98e0b56
Thanks @dimaMachina! - introduceforbiddenPatternsand
requiredPatternsoptions fornaming-conventionrule and deprecateforbiddenPrefixes,
forbiddenSuffixesandrequiredPrefixesandrequiredSuffixes -
#2782
4c20cdd
Thanks @dimaMachina! - add new optionignoredSelectorsfor
require-descriptionrule, to ignore eslint selectors, e.g. types which ends withConnectionor
Edge -
#2783
6e354c9
Thanks @dimaMachina! - addjson-schema-to-tsas optional peer
dependency
Patch Changes
- #2783
6e354c9
Thanks @dimaMachina! - dependencies updates:- Added dependency
json-schema-to-ts@^3↗︎ (to
peerDependencies)
- Added dependency
November 27, 2024
@graphql-eslint/[email protected]
Patch Changes
- #2775
84d78b7
Thanks @dimaMachina! - fix error
TypeError: Cannot read properties of undefined (reading 'type')inrequire-descriptionrule
November 26, 2024
@graphql-eslint/[email protected]
Major Changes
-
#2598
e771499
Thanks @bmulholland! - 1. graphql plugin can now we be specified
asplugins: { - '@graphql-eslint': { - graphqlPlugin.rules - } + '@graphql-eslint': graphqlPlugin }-
Config rules should now be accessed through the
rulespropertyrules: { - ...graphqlESLint.configs['flat/operations-recommended'] + ...graphqlESLint.configs['flat/operations-recommended'].rules -
processor can now be specified with accessing
processorproperty- processor: graphql.processors.graphql + processor: graphqlPlugin.processor
-
The plugin can now be imported using a default import
- import * as graphql from '@graphql-eslint/eslint-plugin' + import graphqlPlugin from '@graphql-eslint/eslint-plugin'
-
-
#1813
1c2d220
Thanks @dimaMachina! - - bring backpossible-type-extension
rule toschema-recommendedconfig- add
unique-operation-nameandunique-fragment-namerules tooperations-recommendedconfig
The concept of sibling operations provided by graphql-config's
documentsfields is based on
uniquely named operations and fragments, for omitting false-positive/negative cases when
operations and fragments are located in separate files. For this reason, these rules must be
included in the recommended config- rename
relayconfig toschema-relay
To avoid confusing when users extend this config for executable definitions (operations and
fragments) - add
-
#1813
1c2d220
Thanks @dimaMachina! - -alphabetizerule changes-
add
definitions: trueoption forschema-all/operations-allconfigs -
rename
values: ['EnumTypeDefinition']tovalues: true -
rename
variables: ['OperationDefinition']tovariables: true -
add
groups: ['id', '*', 'createdAt', 'updatedAt']forschema-all/operations-allconfigs -
require-id-when-availablerule changes- rename rule to
require-selections
- rename rule to
-
update
schema-all/operations-allconfigs -
require-descriptionrule changes- add
rootField: trueoption forschema-recommendedconfig
- add
-
require
eslintat least>=8.44.0as peerDependency -
naming-convention- add new options for
schema-recommendedconfig
{ 'EnumTypeDefinition,EnumTypeExtension': { forbiddenPrefixes: ['Enum'], forbiddenSuffixes: ['Enum'] }, 'InterfaceTypeDefinition,InterfaceTypeExtension': { forbiddenPrefixes: ['Interface'], forbiddenSuffixes: ['Interface'] }, 'UnionTypeDefinition,UnionTypeExtension': { forbiddenPrefixes: ['Union'], forbiddenSuffixes: ['Union'] }, 'ObjectTypeDefinition,ObjectTypeExtension': { forbiddenPrefixes: ['Type'], forbiddenSuffixes: ['Type'] } }
- add new options for
-
remove graphql-js'
unique-enum-value-namesrule -
rename
no-case-insensitive-enum-values-duplicatestounique-enum-value-namesSince this rule reports case-insensitive enum values duplicates too
-
require-nullable-result-in-rootrule changesDo not check subscriptions
-
-
#1813
1c2d220
Thanks @dimaMachina! - - removeparserOptions.schema- remove
parserOptions.documents - remove
parserOptions.extensions - remove
parserOptions.include - remove
parserOptions.exclude - remove
parserOptions.projects - remove
parserOptions.schemaOptions - remove
parserOptions.graphQLParserOptions - remove
parserOptions.skipGraphQLConfig - remove
parserOptions.operations - add
parserOptions.graphQLConfig?: IGraphQLConfigfor programmatic usage
- remove
-
#2281
c53cb4e
Thanks @maciesielka! - Add new config option
ignoredFieldSelectorstono-unused-fieldsrule to ignore all the relay pagination fields for
every connection exposed in schema for example -
#1813
1c2d220
Thanks @dimaMachina! - drop support of Node.js 12/14/16, GraphQL
14/15 -
#2418
c2d5386
Thanks @comatory! - exposing GraphQLESTreeNode type -
#2768
241936a
Thanks @dimaMachina! - - renamerequireSiblingsOperationsto
requireGraphQLOperations- rename
requireGraphQLSchemaFromContexttorequireGraphQLSchema
- rename
-
#1813
1c2d220
Thanks @dimaMachina! - RemoveGraphQLRuleTesterfrom bundle,
to test your rules use regularRuleTesterfrom eslintNote: with this change unnecessary dependency
@babel/code-framewas removed tooimport { RuleTester } from 'eslint' const ruleTester = new RuleTester({ parser: require.resolve('@graphql-eslint/eslint-plugin') })
-
#2319
b3c73dc
Thanks @maciesielka! - Enforcerequire-selectionson
FragmentSpreads withinGraphQLUnionTypes
Minor Changes
-
#2385
afa8b8a
Thanks @deathemperor! - feat: add a new option{for
alphabetize rule to sort fieldsselection set -
#2293
01f7087
Thanks @yoavsion! - Support the fragment spread group when defining
alphabetize rule's groups with new option... -
#2719
57d6edf
Thanks @dimaMachina! - check for deprecated arguments and object
field nodes in graphql operations inno-deprecatedrule
Patch Changes
-
#1813
1c2d220
Thanks @dimaMachina! - dependencies updates:- Removed dependency
@babel/code-frame@^7.18.6↗︎
(fromdependencies)
- Removed dependency
-
#1813
1c2d220
Thanks @dimaMachina! - dependencies updates:- Updated dependency
graphql-config@^4.5.0↗︎ (from
^4.4.0, independencies) - Removed dependency
@babel/code-frame@^7.18.6↗︎
(fromdependencies) - Removed dependency
chalk@^4.1.2↗︎ (from
dependencies) - Removed dependency
tslib@^2.4.1↗︎ (from
dependencies) - Updated dependency
graphql@^16↗︎ (from
^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0,
inpeerDependencies) - Added dependency
eslint@>=8.44.0↗︎ (to
peerDependencies)
- Updated dependency
November 23, 2024
@graphql-eslint/[email protected]
Patch Changes
- #2752
1e3e966
Thanks @dimaMachina! - fix - Config types don't satisfy
FlatConfig.Config
November 21, 2024
@graphql-eslint/[email protected]
Patch Changes
-
#2743
03ccb9d
Thanks @dimaMachina! - fix error fromno-deprecatedrule
4.0.0-alpha.13: node.typeInfo(...).inputType.getFields is not a function -
#2735
ccd9303
Thanks @dimaMachina! - fix reporting lint issues not on first
char of file for.vueand support ESLint fixes and suggestions for them. Use
new official example