Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sixty-rings-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-eslint/eslint-plugin': patch
---

graphql-js migrate to .ts, fix links
2 changes: 1 addition & 1 deletion docs/rules/executable-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ExecutableDefinitionsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ExecutableDefinitionsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/fields-on-correct-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as __typename.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/FieldsOnCorrectTypeRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/FieldsOnCorrectTypeRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/fragments-on-composite-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/FragmentsOnCompositeTypesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/FragmentsOnCompositeTypesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/known-argument-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL field is only valid if all supplied arguments are defined by that field.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownArgumentNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownArgumentNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/known-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all `@directives` are known by the schema and legally positioned.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownDirectivesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownDirectivesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/known-fragment-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownFragmentNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownFragmentNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/known-type-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownTypeNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownTypeNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/lone-anonymous-operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if when it contains an anonymous operation (the query short-hand) that it contains only that one operation definition.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/LoneAnonymousOperationRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/LoneAnonymousOperationRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/lone-schema-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if it contains only one schema definition.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/LoneSchemaDefinitionRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/LoneSchemaDefinitionRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/no-fragment-cycles.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL fragment is only valid when it does not have cycles in fragments usage.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoFragmentCyclesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoFragmentCyclesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/no-undefined-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoUndefinedVariablesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoUndefinedVariablesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/no-unused-fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoUnusedFragmentsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoUnusedFragmentsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/no-unused-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoUnusedVariablesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/NoUnusedVariablesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/one-field-subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL subscription is valid only if it contains a single root field.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/SingleFieldSubscriptionsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/SingleFieldSubscriptionsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/overlapping-fields-can-be-merged.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/OverlappingFieldsCanBeMergedRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/possible-fragment-spread.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/PossibleFragmentSpreadsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/PossibleFragmentSpreadsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/possible-type-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A type extension is only valid if the type is defined and has the same kind.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/PossibleTypeExtensionsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/PossibleTypeExtensionsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/provided-required-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ProvidedRequiredArgumentsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ProvidedRequiredArgumentsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/scalar-leafs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ScalarLeafsRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ScalarLeafsRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-argument-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL field or directive is only valid if all supplied arguments are uniquely named.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueArgumentNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueArgumentNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-directive-names-per-location.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueDirectivesPerLocationRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueDirectivesPerLocationRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-directive-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all defined directives have unique names.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueDirectiveNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueDirectiveNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-enum-value-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL enum type is only valid if all its values are uniquely named.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueEnumValueNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueEnumValueNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-field-definition-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL complex type is only valid if all its fields are uniquely named.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueFieldDefinitionNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueFieldDefinitionNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-input-field-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL input object value is only valid if all supplied fields are uniquely named.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueInputFieldNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueInputFieldNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-operation-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if it has only one type per operation.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueOperationTypesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueOperationTypesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-type-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all defined types have unique names.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueTypeNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueTypeNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/unique-variable-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL operation is only valid if all its variables are uniquely named.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueVariableNamesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/UniqueVariableNamesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/value-literals-of-correct-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL document is only valid if all value literals are of the type expected at their position.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ValuesOfCorrectTypeRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/ValuesOfCorrectTypeRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/variables-are-input-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesAreInputTypesRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesAreInputTypesRule.ts).
2 changes: 1 addition & 1 deletion docs/rules/variables-in-allowed-position.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

Variables passed to field arguments conform to type.

> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesInAllowedPositionRule.js).
> This rule is a wrapper around a `graphql-js` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/VariablesInAllowedPositionRule.ts).
2 changes: 1 addition & 1 deletion packages/plugin/src/rules/graphql-js-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const validationToRule = (
...meta.docs,
description:
meta.docs.description +
`\n\n> This rule is a wrapper around a \`graphql-js\` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/${ruleName}Rule.js).`,
`\n\n> This rule is a wrapper around a \`graphql-js\` validation function. [You can find it's source code here](https://github.com/graphql/graphql-js/blob/main/src/validation/rules/${ruleName}Rule.ts).`,
},
},
create: context => {
Expand Down