@mo36924/graphql-plugin 5.1.14 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +2 -2
- package/dist/index.js +3 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
@@ -65,9 +65,9 @@ const init = ({ typescript: ts })=>{
|
|
65
65
|
};
|
66
66
|
return {
|
67
67
|
create (info) {
|
68
|
-
const {
|
68
|
+
const { schema } = graphql.getSchema(info.project.getCurrentDirectory());
|
69
69
|
const languageService = info.languageService;
|
70
|
-
if (!
|
70
|
+
if (!schema) {
|
71
71
|
return languageService;
|
72
72
|
}
|
73
73
|
const getSourceFile = (fileName)=>languageService.getProgram()?.getSourceFile(fileName);
|
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { getSchema } from '@mo36924/graphql';
|
2
2
|
import { GraphQLError } from 'graphql';
|
3
3
|
import { getDiagnostics, DIAGNOSTIC_SEVERITY, Position, getAutocompleteSuggestions, CompletionItemKind, getTokenAtPosition, getHoverInformation } from 'graphql-language-service';
|
4
4
|
|
@@ -63,9 +63,9 @@ const init = ({ typescript: ts })=>{
|
|
63
63
|
};
|
64
64
|
return {
|
65
65
|
create (info) {
|
66
|
-
const {
|
66
|
+
const { schema } = getSchema(info.project.getCurrentDirectory());
|
67
67
|
const languageService = info.languageService;
|
68
|
-
if (!
|
68
|
+
if (!schema) {
|
69
69
|
return languageService;
|
70
70
|
}
|
71
71
|
const getSourceFile = (fileName)=>languageService.getProgram()?.getSourceFile(fileName);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mo36924/graphql-plugin",
|
3
3
|
"type": "module",
|
4
|
-
"version": "5.
|
4
|
+
"version": "5.4.0",
|
5
5
|
"description": "graphql-plugin",
|
6
6
|
"author": "mo36924",
|
7
7
|
"license": "MIT",
|
@@ -41,11 +41,11 @@
|
|
41
41
|
"dist"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@mo36924/graphql": "^5.
|
44
|
+
"@mo36924/graphql": "^5.4.0",
|
45
45
|
"graphql": "^16.9.0",
|
46
46
|
"graphql-language-service": "^5.3.0",
|
47
47
|
"typescript": "^5.6.3",
|
48
48
|
"vscode-languageserver-types": "^3.17.5"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "f1f8c8063a21b7aed3f6c29f6d574420abc25324"
|
51
51
|
}
|