简体   繁体   English

错误的相对目录路径:无法导入 GraphQl 文件

[英]Wrong Relative Directory Path: Unable to Import GraphQl files

I am trying to import a mutation from my GraphQL file into my LoginPage file like this:我正在尝试将我的 GraphQL 文件中的突变导入到我的 LoginPage 文件中,如下所示:

import LoginMutation from '../../graphql/login-mutation';

but I keep getting an error that:但我不断收到错误消息:

import LoginMutation from '../../graphql/login-mutation';

The mutation is present in the login-mutation file of my GraphQL folder.突变存在于我的 GraphQL 文件夹的登录突变文件中。 So most probably the path I am entering is wrong.所以很可能我进入的路径是错误的。 Could someone please have a look at the picture of my directory structure and help me correct the path?有人可以看看我的目录结构图片并帮助我更正路径吗?

在此处输入图片说明

尝试在路由的末尾添加文件的扩展名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM