我有這種類型的列表(Address是我的java類):List<Address> addresses = new ArrayList<>();public class Address {...}我要執(zhí)行這種類型的請求: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>() {...});但我不知道我要將什么作為參數(shù)發(fā)送到.addresses (?)。此方法要求我發(fā)送一個AddressInput的ArrayList,它是一個graphql類autogenerate。public final class AddressInput implements InputType { ... }如何在AddressInput中轉(zhuǎn)換我的地址?如果我嘗試類似的東西AddressInput ad = new AddressInput();我有以下錯誤“無法從外部包訪問”
添加回答
舉報
0/150
提交
取消