为什么每个GraphQL模式都有根查询和变异类型?
为什么每个GraphQL模式都需要根为什么每个GraphQL模式都有根查询和变异类型?,graphql,Graphql,为什么每个GraphQL模式都需要根查询和变异类型?这似乎是不必要的陈词滥调。模式是否需要以不同的方式编写?这一点陈词滥调不应该很明显吗 schema { query:Query mutation:Mutation } 我也在谷歌上搜索这个,最后手动搜索graphql js源代码,其中有: 所以你可以调用QueryQry?效用是什么?@RyanMarsh好吧,给事物命名很难。。。就我个人而言,我参加了大会。 /** * GraphQL schema define root types
查询
和变异
类型?这似乎是不必要的陈词滥调。模式是否需要以不同的方式编写?这一点陈词滥调不应该很明显吗
schema {
query:Query
mutation:Mutation
}
我也在谷歌上搜索这个,最后手动搜索graphql js源代码,其中有:
所以你可以调用
Query
Qry
?效用是什么?@RyanMarsh好吧,给事物命名很难。。。就我个人而言,我参加了大会。
/**
* GraphQL schema define root types for each type of operation. These types are
* the same as any other type and can be named in any manner, however there is
* a common naming convention:
*
* schema {
* query: Query
* mutation: Mutation
* }
*
* When using this naming convention, the schema description can be omitted.
*/