@mo36924/graphql-plugin 5.4.2 → 5.4.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs CHANGED
@@ -70,9 +70,6 @@ const graphql = ({ typescript: ts })=>{
70
70
  create (info) {
71
71
  const { schema } = graphql$1.getSchema(info.project.getCurrentDirectory());
72
72
  const languageService = info.languageService;
73
- if (!schema) {
74
- return languageService;
75
- }
76
73
  const getSourceFile = (fileName)=>languageService.getProgram()?.getSourceFile(fileName);
77
74
  const normalizeQuery = (node)=>{
78
75
  const template = node.template;
package/dist/index.js CHANGED
@@ -68,9 +68,6 @@ const graphql = ({ typescript: ts })=>{
68
68
  create (info) {
69
69
  const { schema } = getSchema(info.project.getCurrentDirectory());
70
70
  const languageService = info.languageService;
71
- if (!schema) {
72
- return languageService;
73
- }
74
71
  const getSourceFile = (fileName)=>languageService.getProgram()?.getSourceFile(fileName);
75
72
  const normalizeQuery = (node)=>{
76
73
  const template = node.template;
package/dist/volar.cjs CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  var graphql = require('@mo36924/graphql');
4
4
  var createLanguageServicePlugin = require('@volar/typescript/lib/quickstart/createLanguageServicePlugin');
5
- var graphql$1 = require('graphql');
6
5
  var ts = require('typescript');
7
6
 
8
7
  /// <reference types="@volar/typescript" />
@@ -31,8 +30,7 @@ const getCodeMappings = (text)=>[
31
30
  }
32
31
  ];
33
32
  const getLanguagePlugin = (cwd)=>{
34
- let { schema } = graphql.getSchema(cwd);
35
- schema ?? (schema = graphql$1.buildSchema("scalar _"));
33
+ const { schema } = graphql.getSchema(cwd);
36
34
  const transform = (sourceFile)=>{
37
35
  const code = sourceFile.text;
38
36
  const sourceOffsets = [
package/dist/volar.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { getSchema, getGqlTypeArguments } from '@mo36924/graphql';
2
2
  import { createLanguageServicePlugin } from '@volar/typescript/lib/quickstart/createLanguageServicePlugin';
3
- import { buildSchema } from 'graphql';
4
3
  import ts from 'typescript';
5
4
 
6
5
  /// <reference types="@volar/typescript" />
@@ -29,8 +28,7 @@ const getCodeMappings = (text)=>[
29
28
  }
30
29
  ];
31
30
  const getLanguagePlugin = (cwd)=>{
32
- let { schema } = getSchema(cwd);
33
- schema ?? (schema = buildSchema("scalar _"));
31
+ const { schema } = getSchema(cwd);
34
32
  const transform = (sourceFile)=>{
35
33
  const code = sourceFile.text;
36
34
  const sourceOffsets = [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mo36924/graphql-plugin",
3
3
  "type": "module",
4
- "version": "5.4.2",
4
+ "version": "5.4.4",
5
5
  "description": "graphql-plugin",
6
6
  "author": "mo36924",
7
7
  "license": "MIT",
@@ -47,12 +47,12 @@
47
47
  "dist"
48
48
  ],
49
49
  "dependencies": {
50
- "@mo36924/graphql": "^5.4.2",
50
+ "@mo36924/graphql": "^5.4.4",
51
51
  "@volar/typescript": "^2.4.10",
52
52
  "graphql": "^16.9.0",
53
53
  "graphql-language-service": "^5.3.0",
54
54
  "typescript": "^5.6.3",
55
55
  "vscode-languageserver-types": "^3.17.5"
56
56
  },
57
- "gitHead": "57e62171edc5313ea100277a08cca72130ebca42"
57
+ "gitHead": "d441e61abb10c23ade3abb7217a9044e15fe767c"
58
58
  }