Releases: graphql-hive/graphql-eslint
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! - removetruthy
helper 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-selections
rule):
introduce new optionrequireAllFields
to require all values offieldName: string[]
option
November 29, 2024
@graphql-eslint/[email protected]
Patch Changes
-
#2785
99b0703
Thanks @dimaMachina! -allowLeadingUnderscore
and
allowTrailingUnderscore
should not conflict withignorePattern
innaming-convention
rule -
#2787
f370359
Thanks @dimaMachina! - add an example with
custom graphql rules
November 29, 2024
@graphql-eslint/[email protected]
Minor Changes
-
#2780
98e0b56
Thanks @dimaMachina! - introduceforbiddenPatterns
and
requiredPatterns
options fornaming-convention
rule and deprecateforbiddenPrefixes
,
forbiddenSuffixes
andrequiredPrefixes
andrequiredSuffixes
-
#2782
4c20cdd
Thanks @dimaMachina! - add new optionignoredSelectors
for
require-description
rule, to ignore eslint selectors, e.g. types which ends withConnection
or
Edge
-
#2783
6e354c9
Thanks @dimaMachina! - addjson-schema-to-ts
as 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-description
rule
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
rules
propertyrules: { - ...graphqlESLint.configs['flat/operations-recommended'] + ...graphqlESLint.configs['flat/operations-recommended'].rules
-
processor can now be specified with accessing
processor
property- 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-recommended
config- add
unique-operation-name
andunique-fragment-name
rules tooperations-recommended
config
The concept of sibling operations provided by graphql-config's
documents
fields 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
relay
config toschema-relay
To avoid confusing when users extend this config for executable definitions (operations and
fragments) - add
-
#1813
1c2d220
Thanks @dimaMachina! - -alphabetize
rule changes-
add
definitions: true
option forschema-all
/operations-all
configs -
rename
values: ['EnumTypeDefinition']
tovalues: true
-
rename
variables: ['OperationDefinition']
tovariables: true
-
add
groups: ['id', '*', 'createdAt', 'updatedAt']
forschema-all
/operations-all
configs -
require-id-when-available
rule changes- rename rule to
require-selections
- rename rule to
-
update
schema-all
/operations-all
configs -
require-description
rule changes- add
rootField: true
option forschema-recommended
config
- add
-
require
eslint
at least>=8.44.0
as peerDependency -
naming-convention
- add new options for
schema-recommended
config
{ '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-names
rule -
rename
no-case-insensitive-enum-values-duplicates
tounique-enum-value-names
Since this rule reports case-insensitive enum values duplicates too
-
require-nullable-result-in-root
rule 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?: IGraphQLConfig
for programmatic usage
- remove
-
#2281
c53cb4e
Thanks @maciesielka! - Add new config option
ignoredFieldSelectors
tono-unused-fields
rule 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! - - renamerequireSiblingsOperations
to
requireGraphQLOperations
- rename
requireGraphQLSchemaFromContext
torequireGraphQLSchema
- rename
-
#1813
1c2d220
Thanks @dimaMachina! - RemoveGraphQLRuleTester
from bundle,
to test your rules use regularRuleTester
from eslintNote: with this change unnecessary dependency
@babel/code-frame
was removed tooimport { RuleTester } from 'eslint' const ruleTester = new RuleTester({ parser: require.resolve('@graphql-eslint/eslint-plugin') })
-
#2319
b3c73dc
Thanks @maciesielka! - Enforcerequire-selections
on
FragmentSpread
s withinGraphQLUnionType
s
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-deprecated
rule
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-deprecated
rule
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.vue
and support ESLint fixes and suggestions for them. Use
new official example
November 19, 2024
@graphql-eslint/[email protected]
Patch Changes
- #2721
cda7929
Thanks @dimaMachina! - fixno-unreachable-types
to consider
wrapped request directive argument types