graphql-language-service-interface
Advanced tools
Comparing version 2.10.2-canary-f20fe1e2.0 to 2.10.2
@@ -134,10 +134,10 @@ "use strict"; | ||
} | ||
if (graphql_1.isListType(type)) { | ||
if (graphql_1.isListType(type) && graphql_2.isCompositeType(type.ofType)) { | ||
return insertSuffix; | ||
} | ||
if (graphql_1.isNonNullType(type)) { | ||
if (graphql_1.isObjectType(type.ofType)) { | ||
if (graphql_2.isCompositeType(type.ofType)) { | ||
return insertSuffix; | ||
} | ||
if (graphql_1.isListType(type.ofType)) { | ||
if (graphql_1.isListType(type.ofType) && graphql_2.isCompositeType(type.ofType.ofType)) { | ||
return insertSuffix; | ||
@@ -144,0 +144,0 @@ } |
import { CompletionItemKind, InsertTextFormat, } from 'vscode-languageserver-types'; | ||
import { isInterfaceType, GraphQLInterfaceType, GraphQLObjectType, Kind, DirectiveLocation, isObjectType, isListType, isNonNullType, } from 'graphql'; | ||
import { isInterfaceType, GraphQLInterfaceType, GraphQLObjectType, Kind, DirectiveLocation, isListType, isNonNullType, } from 'graphql'; | ||
import { GraphQLBoolean, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, assertAbstractType, doTypesOverlap, getNamedType, getNullableType, isAbstractType, isCompositeType, isInputType, visit, parse, } from 'graphql'; | ||
@@ -130,10 +130,10 @@ import { CharacterStream, onlineParser, RuleKinds, } from 'graphql-language-service-parser'; | ||
} | ||
if (isListType(type)) { | ||
if (isListType(type) && isCompositeType(type.ofType)) { | ||
return insertSuffix; | ||
} | ||
if (isNonNullType(type)) { | ||
if (isObjectType(type.ofType)) { | ||
if (isCompositeType(type.ofType)) { | ||
return insertSuffix; | ||
} | ||
if (isListType(type.ofType)) { | ||
if (isListType(type.ofType) && isCompositeType(type.ofType.ofType)) { | ||
return insertSuffix; | ||
@@ -140,0 +140,0 @@ } |
{ | ||
"name": "graphql-language-service-interface", | ||
"version": "2.10.2-canary-f20fe1e2.0", | ||
"version": "2.10.2", | ||
"description": "Interface to the GraphQL Language Service", | ||
@@ -32,5 +32,5 @@ "contributors": [ | ||
"graphql-config": "^4.1.0", | ||
"graphql-language-service-parser": "^1.10.5-canary-f20fe1e2.0", | ||
"graphql-language-service-types": "^1.8.8-canary-f20fe1e2.0", | ||
"graphql-language-service-utils": "^2.7.2-canary-f20fe1e2.0", | ||
"graphql-language-service-parser": "^1.10.4", | ||
"graphql-language-service-types": "^1.8.7", | ||
"graphql-language-service-utils": "^2.7.1", | ||
"vscode-languageserver-types": "^3.15.1" | ||
@@ -37,0 +37,0 @@ }, |
@@ -59,6 +59,4 @@ /** | ||
appearsIn: { | ||
...commonInsert, | ||
label: 'appearsIn', | ||
detail: '[Episode]', | ||
insertText: `appearsIn {\n $1\n}`, | ||
}, | ||
@@ -496,2 +494,3 @@ friends: { | ||
{ label: 'id', detail: 'String!' }, | ||
{ label: 'instructions', detail: '[String]!' }, | ||
{ label: 'name', detail: 'String' }, | ||
@@ -498,0 +497,0 @@ { label: 'primaryFunction', detail: 'String' }, |
@@ -30,3 +30,2 @@ /** | ||
GraphQLArgument, | ||
isObjectType, | ||
isListType, | ||
@@ -288,2 +287,7 @@ isNonNullType, | ||
/** | ||
* Choose carefully when to insert the `insertText`! | ||
* @param field | ||
* @returns | ||
*/ | ||
const getInsertText = (field: GraphQLField<null, null>) => { | ||
@@ -294,10 +298,10 @@ const type = field.type; | ||
} | ||
if (isListType(type)) { | ||
if (isListType(type) && isCompositeType(type.ofType)) { | ||
return insertSuffix; | ||
} | ||
if (isNonNullType(type)) { | ||
if (isObjectType(type.ofType)) { | ||
if (isCompositeType(type.ofType)) { | ||
return insertSuffix; | ||
} | ||
if (isListType(type.ofType)) { | ||
if (isListType(type.ofType) && isCompositeType(type.ofType.ofType)) { | ||
return insertSuffix; | ||
@@ -304,0 +308,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
391911
6831
1
+ Addedgraphql-language-service-parser@1.10.4(transitive)
+ Addedgraphql-language-service-types@1.8.7(transitive)
+ Addedgraphql-language-service-utils@2.7.1(transitive)
- Removedgraphql-language-service-parser@1.10.5-canary-f20fe1e2.0(transitive)
- Removedgraphql-language-service-types@1.8.8-canary-f20fe1e2.0(transitive)
- Removedgraphql-language-service-utils@2.7.2-canary-f20fe1e2.0(transitive)