graphql-language-service
Advanced tools
Comparing version
@@ -16,7 +16,12 @@ "use strict"; | ||
if (op) { | ||
graphql_2.visit(graphql_2.parse(op), { | ||
FragmentDefinition(def) { | ||
externalFragments.push(def); | ||
}, | ||
}); | ||
try { | ||
graphql_2.visit(graphql_2.parse(op), { | ||
FragmentDefinition(def) { | ||
externalFragments.push(def); | ||
}, | ||
}); | ||
} | ||
catch (_a) { | ||
return []; | ||
} | ||
} | ||
@@ -23,0 +28,0 @@ return externalFragments; |
@@ -13,7 +13,12 @@ import { CompletionItemKind, InsertTextFormat, } from 'vscode-languageserver-types'; | ||
if (op) { | ||
visit(parse(op), { | ||
FragmentDefinition(def) { | ||
externalFragments.push(def); | ||
}, | ||
}); | ||
try { | ||
visit(parse(op), { | ||
FragmentDefinition(def) { | ||
externalFragments.push(def); | ||
}, | ||
}); | ||
} | ||
catch (_a) { | ||
return []; | ||
} | ||
} | ||
@@ -20,0 +25,0 @@ return externalFragments; |
{ | ||
"name": "graphql-language-service", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"description": "The official, runtime independent Language Service for GraphQL", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -82,7 +82,11 @@ /** | ||
if (op) { | ||
visit(parse(op), { | ||
FragmentDefinition(def) { | ||
externalFragments.push(def); | ||
}, | ||
}); | ||
try { | ||
visit(parse(op), { | ||
FragmentDefinition(def) { | ||
externalFragments.push(def); | ||
}, | ||
}); | ||
} catch { | ||
return []; | ||
} | ||
} | ||
@@ -89,0 +93,0 @@ return externalFragments; |
@@ -66,3 +66,3 @@ /** | ||
const rules = specifiedRules.filter(rule => { | ||
// Because every fragment is considered for determing model subsets that may | ||
// Because every fragment is considered for determining model subsets that may | ||
// be used anywhere in the codebase they're all technically "used" by clients | ||
@@ -69,0 +69,0 @@ // of graphql-data. So we remove this rule from the validators. |
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
720273
0.05%13454
0.1%