Closed pradheepkaliraj closed 3 years ago
Hi @pradheepkaliraj,
You can access the nextToken
with your GraphQLCall.Callback<ListRecipesQuery.Data>
. There is no need to try and create a GraphQLCall.Callback<ListRecipesQuery.Variables>
Try this:
private GrapQLCall.Callback<ListRecipesQuery.Data> queryCallback = new GraphQLCall.Callback<ListRecipesQuery.Data>() {
@Override
public void onResponse(@Nonnull Response<ListRecipesQuery.Data> response) {
Log.d(TAG, "nextToken: " + response.data().listRecipes().nextToken());
}
@Override
public void onFailure(@Nonnull ApolloException e) {
Log.e(TAG, e.toString(), e);
}
});
Thanks @richardmcclellan. I am able to get the nextToken now.
State your question I am writing an app that queries data from Dynamodb. The query limit is set to 10, and I have a filter to search for the name "tom". I want to get the next 10 items, hence I am trying to use nextToken in the query. However, I don't know how to get the nextToken, from the previous query. I would greatly appreciate any help here
Provide code snippets (if applicable)
Environment(please complete the following information): appsync:2.6.+
Device Information (please complete the following information):