Unknown directive “model” when setting up AWS Amplify GraphQL in Android

huangapple go评论69阅读模式
英文:

Unknown directive "model" when setting up AWS Amplify GraphQL in Android

问题

我一直在尝试在我的Android Kotlin项目中使用AWS Amplify设置GraphQL,但在@model以及AuthRule和allow上出现了红色警告:

Unknown directive “model” when setting up AWS Amplify GraphQL in Android

这是一个示例的TODO GraphQL模式,但当我编辑模式时,问题仍然存在。我在想是否有其他我在文档中没有看到的东西?

当我悬停在@model上时,我看到一个**未知指令"model"**的错误消息。

我尝试卸载和重新安装amplify add api,但错误仍然存在,而在在线搜索后,我没有看到最近的任何可以解决这个问题的解决方案。

英文:

I've been trying to set up GraphQL for my android kotlin project with AWS Amplify, but I am getting red warning for @model as well as AuthRule & allow in:

Unknown directive “model” when setting up AWS Amplify GraphQL in Android

This is the example TODO GraphQL schema, but when I do edit the schema, the issue still occurs. I'm wondering if I am missing something else that I didn't see in the documentation?

When I hover over @model, I see a Unknown directive "model" error message.

I tried to uninstalling and installing again the amplify add api. The error continues, and after searching through online, I don't see any solutions that are recent that can help with this.

答案1

得分: 0

发现有一个JS GraphQL插件导致在Android项目中出现红色错误。只需要禁用它。

英文:

Found that there was a JS GraphQL Plugin that was causing the red errors to occur in the Android Project. Just had to disable it.

huangapple
  • 本文由 发表于 2023年2月6日 06:45:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75356025.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定