我有以下查询
query GetMajorIncidents {
getMajorIncidents {
category
subcategory
dv_cmdb_ci
dv_state
major_incident_state
number
opened_at
short_description
u_clientpriority
u_global_priority
u_clientpriority
u_incident_end
u_incident_start
u_incident_commander
dv_u_business_segments
dv_u_communication_category
duration {
days
hours
minutes
seconds
milliseconds
}
}
}
我已经把缓存代码放在解析器中**(无法粘贴代码)**,info参数设置为
info.cacheControl.setCacheHint({
maxAge: 300,
scope: 'PUBLIC',
});
Redis中没有缓存。
现在,如果我从上面的查询中删除duration对象,它将开始缓存结果。我不知道为什么会这样
我的schema看起来像:
type Data {
category: String
subcategory: String
dv_cmdb_ci: String
dv_state: String
major_incident_state: String
number: String
opened_at: String
short_description: String
u_clientpriority: String
u_global_priority: String
u_clientpriority: String
u_incident_end: String
u_incident_start: String
u_incident_commander: String
dv_u_business_segments: String
dv_u_communication_category: String
duration: Duration
}
type Duration {
days: Int
hours: Float
minutes: Float
seconds: Float
milliseconds: Float
}
有人能帮帮忙吗
1条答案
按热度按时间qhhrdooz1#
已解决!我可以通过向持续时间架构提供该高速缓存参数来修复此问题