@ts-gql/eslint-plugin
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -141,2 +141,4 @@ 'use strict'; | ||
type = graphql.getNamedType(type); | ||
if (type instanceof graphql.GraphQLUnionType) { | ||
@@ -146,14 +148,2 @@ return; | ||
if (type instanceof graphql.GraphQLNonNull) { | ||
type = type.ofType; | ||
} | ||
if (type instanceof graphql.GraphQLList) { | ||
type = type.ofType; | ||
if (type instanceof graphql.GraphQLNonNull) { | ||
type = type.ofType; | ||
} | ||
} | ||
if (!(type instanceof graphql.GraphQLInterfaceType || type instanceof graphql.GraphQLObjectType)) { | ||
@@ -160,0 +150,0 @@ throw new Error(`Unexpected SelectionSet on type of ${type.constructor.name}. This is an internal error. If you see this, this is most likely a bug in ts-gql`); |
@@ -141,2 +141,4 @@ 'use strict'; | ||
type = graphql.getNamedType(type); | ||
if (type instanceof graphql.GraphQLUnionType) { | ||
@@ -146,14 +148,2 @@ return; | ||
if (type instanceof graphql.GraphQLNonNull) { | ||
type = type.ofType; | ||
} | ||
if (type instanceof graphql.GraphQLList) { | ||
type = type.ofType; | ||
if (type instanceof graphql.GraphQLNonNull) { | ||
type = type.ofType; | ||
} | ||
} | ||
if (!(type instanceof graphql.GraphQLInterfaceType || type instanceof graphql.GraphQLObjectType)) { | ||
@@ -160,0 +150,0 @@ throw new Error(`Unexpected SelectionSet on type of ${type.constructor.name}. This is an internal error. If you see this, this is most likely a bug in ts-gql`); |
import { ESLintUtils } from '@typescript-eslint/experimental-utils'; | ||
import path from 'path'; | ||
import slash from 'slash'; | ||
import { specifiedRules, NoUnusedFragmentsRule, NoUnusedVariablesRule, KnownFragmentNamesRule, NoUndefinedVariablesRule, parse, validate, GraphQLError, visit, TypeInfo, visitWithTypeInfo, GraphQLUnionType, GraphQLNonNull, GraphQLList, GraphQLInterfaceType, GraphQLObjectType } from 'graphql'; | ||
import { specifiedRules, NoUnusedFragmentsRule, NoUnusedVariablesRule, KnownFragmentNamesRule, NoUndefinedVariablesRule, parse, validate, GraphQLError, visit, TypeInfo, visitWithTypeInfo, getNamedType, GraphQLUnionType, GraphQLInterfaceType, GraphQLObjectType } from 'graphql'; | ||
import { getConfigSync } from '@ts-gql/config'; | ||
@@ -132,2 +132,4 @@ | ||
type = getNamedType(type); | ||
if (type instanceof GraphQLUnionType) { | ||
@@ -137,14 +139,2 @@ return; | ||
if (type instanceof GraphQLNonNull) { | ||
type = type.ofType; | ||
} | ||
if (type instanceof GraphQLList) { | ||
type = type.ofType; | ||
if (type instanceof GraphQLNonNull) { | ||
type = type.ofType; | ||
} | ||
} | ||
if (!(type instanceof GraphQLInterfaceType || type instanceof GraphQLObjectType)) { | ||
@@ -151,0 +141,0 @@ throw new Error(`Unexpected SelectionSet on type of ${type.constructor.name}. This is an internal error. If you see this, this is most likely a bug in ts-gql`); |
{ | ||
"name": "@ts-gql/eslint-plugin", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"main": "dist/eslint-plugin.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/eslint-plugin.esm.js", |
51102
1178