简体   繁体   English

Apollo-Kotlin:创建 schema.graphql android studio 后显示不支持的令牌 `!` 错误

[英]Apollo-Kotlin: After creating schema.graphql android studio is showing Unsupported token `!` error

Steps that I made so far.到目前为止我所做的步骤。

  • Downloaded an install the graphql plugin to execute the queries internally.下载并安装 graphql 插件以在内部执行查询。 来自插件-> 市场的 graphql 插件

  • Created this config file for executing local queries for the expected behavior.创建此配置文件以针对预期行为执行本地查询。 参考

  • Which is working fine with performing general query.这在执行一般查询时效果很好。 But with this config I am getting following error while building project and run it on a device.但是使用此配置,我在构建项目并在设备上运行它时遇到以下错误。 得到这样的错误

     Failed to parse GraphQL file E:\...\src\main\graphql\schema.graphql (9:13) Unsupported token `!`

FYI, I have already gone through this ticket from apollo-kotlin github page.仅供参考,我已经从 apollo-kotlin github 页面浏览了这张票 Doesn't resolve my problem or I don't understand the solution there.不能解决我的问题,或者我不明白那里的解决方案。

For now, By deleting the E:\...\src\main\graphql\schema.graphql file, the project builds and runs just fine.现在,通过删除E:\...\src\main\graphql\schema.graphql文件,项目可以正常构建和运行。

If anyone has more idea on this, let me know and I will update if I find anything else as well.如果有人对此有更多想法,请告诉我,如果我发现其他任何内容,我也会更新。 Thanks谢谢

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

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