我的架构文件是
type Mutation {
createCustomer(name: String!, email: String!, product: [Product]): Customer
}
input Product {
id: ID!
name: String!
price: Int
}
interface Person {
id: ID!
name: String!
email: String!
}
type Customer implements Person {
id: ID!
name: String!
email: String!
product: [Product]
}
Run Code Online (Sandbox Code Playgroud)
我想在此处插入客户详细信息,其中包含产品列表作为输入.我的疑问是
mutation {
createCustomer(
name: "kitte",
email: "kitte@gmail.com",
product: [
{
name: "soap",
price: 435,
}
]
)
{
id
name
email
product{name}
}
}
Run Code Online (Sandbox Code Playgroud)
但我得到例外
{
"data": null,
"errors": [
{
"validationErrorType": "WrongType", …Run Code Online (Sandbox Code Playgroud) 我正在使用 httpclient 4.5.5 我想获得高达 1 gb 的大文件作为响应。但好像
CloseableHttpResponse response = httpClient.execute(httpGet); HttpEntity entity = response.getEntity();
这将返回整个响应,因此在内存中包含整个响应并不好。有没有办法以流的形式获得响应?