大佬教程收集整理的这篇文章主要介绍了未收到 Apollo graphql 中的所有记录,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在分页代码中,我设置了限制 5,但作为响应,我得到了 1、3、4、5 等随机计数。 在操场上 API 以正确的方式工作。 请帮我解决这个问题。
public liveData<GetPublicPostByUserIDquery.Data> getPublicPost(int userID,int limmit,int offset,int loginUserID) {
final mutablelivedata<GetPublicPostByUserIDquery.Data> data = new mutablelivedata<>();
ApolloConnector.setupApollo().query(GetPublicPostByUserIDquery
.builder()
.userID(userID)
.plimit(limmit)
.pOffset(offset)
.logInUserID(loginUserID)
.build()
)
.enqueue(new ApolloCall.CallBACk<GetPublicPostByUserIDquery.Data>() {
@OverrIDe
public voID onResponse(@NotNull Response<GetPublicPostByUserIDquery.Data> responsE) {
data.postValue(response.data());
}
@OverrIDe
public voID onFailure(ApolloException E) {
Log.e(tag,"webservice fail:: ",E);
}
});
return data;
}
公共类 ApolloConnector {
public static ApolloClIEnt setupApollo(){
normalizedCacheFactory cacheFactory = new LrunormalizedCacheFactory(evictionPolicy.builder().maxSizeBytes(10 * 1024 * 1024).build());
OkhttpClIEnt okhttpClIEnt = new OkhttpClIEnt.builder().build();
return ApolloClIEnt.builder().serverUrl(BASE_URL).normalizedCache(cacheFactory).okhttpClIEnt(okhttpClIEnt).build();
}
}
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的未收到 Apollo graphql 中的所有记录全部内容,希望文章能够帮你解决未收到 Apollo graphql 中的所有记录所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。