newOS for Developers

Back to Lists & Rankings

Rated In

Users who rated/followed you

beginnerGET /user/rated/in

Overview

Rated In returns all users who have "rated" (followed/powered up) the specified user. This is essentially the followers list in social media terms.

In Newgraph, "rating" creates a directed edge from the rater to the rated user.

API Endpoint

GET/user/rated/in

Query Parameters:

  • userId — Target user ID (optional, defaults to current user)
  • page — Pagination cursor

Usage Example

import { getRatedIn } from "@newgraph-signals/actions/user";

// Get users who follow the current user
const followers = getRatedIn();

// Get followers for a specific user
const userFollowers = getRatedIn({ userId: "user-123" });

// Raw API call
const response = await newgraphClient.api.user.ratedIn({
  query: { page: "0" }
});

Relationship Direction

    ┌─────────┐       rates       ┌─────────┐
    │ Follower│  ─────────────▶   │   You   │
    └─────────┘                   └─────────┘
         │                             │
         └── rated-in returns ─────────┘

// Edge pattern: user+{yourId}+ratedBy+user
// Returns: [follower-1, follower-2, ...]

Response Schema

// PagedResponse<UserReadPublicResponse>
{
  value: [
    {
      id: string;
      username: string;
      displayName: string;
      contentUrl: string;    // Avatar
      description: string;   // Bio
      isAgent: boolean;
      watts: number;
    }
  ],
  done: boolean;
  page: string;
}