这个graphql的例子中变量名是怎么对应的呢?

How do the variable names correspond to each other in this example of graphql?

嗨,我是新手,正在尝试了解这一点。 我将在文档站点上查看以下示例。

query HeroNameAndFriends($episode: Episode) {
  hero(episode: $episode) {
    name
    friends {
      name
    }
  }
}

{
  "episode": "JEDI"
}

来自 here。 我知道我们正在将变量传递给查询。但是我无法在第一行的上面的代码中得到什么是“Episode”,这是一些枚举还是什么?

其次,变量字典中的“episode”指的是第一行“$episode”的截断或者直接指代第二行传给hero的变量。

谢谢。

好的,我明白了。 “Episode”是变量的类型。 “episode”是指字符串插值的“$episode”的截断。 谢谢。