VSCODE中的Graphql文件路径自动补全

问题描述 投票:0回答:1

好像我的vscode拒绝在.graphql文件导入路径上给我自动补全…你知道为什么吗?error

我已经激活了特定的Gql扩展程序...

Name: GraphQL for VSCode
Id: kumar-harsh.graphql-for-vscode
Description: GraphQL syntax highlighting, linting, auto-complete, and more!
Version: 1.15.3
Publisher: Kumar Harsh
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode

也定义TS

declare module '*/get-course.gql' {
  import { DocumentNode } from 'graphql';
  const defaultDocument: DocumentNode;
  export const GetCourses: DocumentNode;

  export default defaultDocument;
}

它也不会在js文件中提供自动完成功能…

提前感谢...

javascript typescript visual-studio-code graphql
1个回答
0
投票

外观.graphql文件类型不包含在默认vs代码自动完成插件中。

您可以安装GraphQL pyramida.vscode-graphql或类似的插件来实现。

© www.soinside.com 2019 - 2024. All rights reserved.