我有这种类型的列表(Address是我的java类):List<Address> addresses = new ArrayList<>();public class Address {...}我要执行这种类型的请求:apolloClient = ApolloClient.builder()
.serverUrl(mContext.getString(R.string.graphqlUrl))
.okHttpClient(okHttpClient)
.addCustomTypeAdapter(CustomType.LISTOFMAPTOOBJECT, new AddressCustomTypeAdapter().customTypeAdapter())
.build();apolloClient.mutate(
UpdateProfileAddressesMutation.builder()
.addresses(?)
.build()).enqueue(new ApolloCall.Callback<UpdateProfileAddressesMutation.Data>() {...});但我不知道我要将什么作为参数发送到.addresses (?)。此方法要求我发送一个AddressInput的ArrayList,它是一个graphql类autogenerate。public final class AddressInput implements InputType { ... }如何在AddressInput中转换我的地址?如果我尝试类似的东西AddressInput ad = new AddressInput();我有以下错误“无法从外部包访问”
添加回答
举报
0/150
提交
取消