Given an API client method `API.listResults(nextToken?: string): Promise<{ results: Array, nextToken?: string>}` where `nextToken` represents an opaque pagination cursor, write a react-query `useInfiniteQuery` hook crawls and accumulates all of the results by recursively fetching the next page with the nextToken inside onSuccess
user
{"evolved_from": null, "kind": "human", "source": "ewof/sharegpt-instruct-unfiltered-deduped"}
Given an API client method `API.listResults(nextToken?: string): Promise<{ results: Array, nextToken?: string>}` where `nextToken` represents an opaque pagination cursor, write a react-query `useInfiniteQuery` hook crawls and accumulates all of the results by recursively fetching the next page with the nextToken inside onSuccess
user
DUMMY RESPONSE
assistant