How to write SimpleGraphQLRequest for listPost?

0

I saw amplify documentation there a sample to get a single post like this:

private GraphQLRequest<Todo> getTodoRequest(String id) {
    String document = "query getTodo($id: ID!) { "
        + "getTodo(id: $id) { "
            + "id "
            + "name "
        + "}"
    + "}";
    return new SimpleGraphQLRequest<>(
            document,
            Collections.singletonMap("id", id),
            Todo.class,
            new GsonVariablesSerializer());
}

How to write the same code for list post?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions