[Error: Amity SDK (500000): skip, limit and sorting are not supported in query type scrollable]

I’m getting the error above trying to get comments using the TS SDK in react native. My code is below which seems correct…?

const unSubscribe = CommentRepository.getComments(
  {
    referenceType,
    referenceId,
  },
  ({ data: comments, onNextPage, hasNextPage, loading, error }) => {
    if (error) {
      setError(error);
    }
    if (loading) {
      setLoading(true);
    }
    if (comments) {
      setComments(comments);
    }
    setHasMore(hasNextPage);
    prevNextPageFn.current = onNextPage;
  },
);

Hello @BenGannaway , could you also confirm your current TS SDK version, please?

@amityco/ts-sdk-react-native”: “^7.5.0”,

Hello @BenGannaway , please put sortBy: 'lastCreated' in the param like the example below:

{ referenceType, referenceId, sortBy: 'lastCreated' }

Please let us know if you have any questions.