【发布时间】:2020-03-10 11:40:53
【问题描述】:
正如blog 所说
一个要求是必须只有一个根查询,并且 ...
考虑架构
type Post {
id: ID!
title: String!
text: String!
category: String
author: Author!
}
type Author {
id: ID!
name: String!
thumbnail: String
posts: [Post]!
}
# The Root Query for the application
type Query {
recentPosts(count: Int, offset: Int): [Post]!
}
这是否意味着我不能像下面这样声明另一个根查询?除了根查询还有其他查询类型吗?
# Another query
type Query {
getPost(id: Int): [Post]!
}
# Another query
type Query {
getAuthor(id: Int): [Author]!
}
【问题讨论】:
-
它与Java有什么关系?而且链接坏了
标签: graphql