Queries examples

Here, we will explore the various queries that you can create.

Get user information by Talent Layer Id

{
  user(id: "59") {
    cid
    handle
    id
    numReviews
    description {
      about
      id
    }
    address
    updatedAt
  }
}

Get the service reviews by service id

{
  reviews {
    description {
      content
      id
    }
    rating
    to {
      id
      handle
    }
    service {
      id
      status
    }
  }
}

Get the first 5 services informations after the 18 March with the open status

{
  services(first: 3, where: {createdAt_gt: "1679149214", status: Opened}) {
    id
    createdAt
    updatedAt
    status
    description {
      about
      rateAmount
      rateToken
      startDate
      title
    }
  }
}

Get the total gain and the platform name of the first 3 users with a rating greater than 4

{
  users(first: 3,where: {rating_gt: "4"}) {
    handle
    id
    numReviews
    platform {
      id
      name
    }
    totalGains {
      totalGain
    }
  }
}

As you can see, you are not limited in your query building. Please feel free to contact us if you cannot find or build exactly what you need.

Last updated