{"id":29219871,"url":"https://github.com/protofire/ray-subgraph","last_synced_at":"2025-07-03T02:07:43.024Z","repository":{"id":41719996,"uuid":"236071622","full_name":"protofire/ray-subgraph","owner":"protofire","description":"Subgraph for Robo-Advisor for Yield (RAY)","archived":false,"fork":false,"pushed_at":"2022-12-10T17:17:07.000Z","size":617,"stargazers_count":2,"open_issues_count":10,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-04-10T04:54:33.775Z","etag":null,"topics":["ethereum","ray","staked","subgraph","thegraphprotocol"],"latest_commit_sha":null,"homepage":"https://thegraph.com/explorer/subgraph/protofire/ray","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protofire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-24T19:43:46.000Z","updated_at":"2021-09-14T06:44:29.000Z","dependencies_parsed_at":"2023-01-26T04:30:21.737Z","dependency_job_id":null,"html_url":"https://github.com/protofire/ray-subgraph","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/protofire/ray-subgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Fray-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Fray-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Fray-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Fray-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protofire","download_url":"https://codeload.github.com/protofire/ray-subgraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Fray-subgraph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263245314,"owners_count":23436515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","ray","staked","subgraph","thegraphprotocol"],"created_at":"2025-07-03T02:07:42.527Z","updated_at":"2025-07-03T02:07:43.010Z","avatar_url":"https://github.com/protofire.png","language":"TypeScript","readme":"## Robo-Advisor for Yield Subgraph\n\nThe subgraph generated by this code can be found at the [protofire/ray](https://thegraph.com/explorer/subgraph/protofire/ray) subgraph in the TheGraph explorer.\n\nThe [schema](schema.graphql) defines all entities to be exposed in the subgraph, as well as any relations between the data entities, and all entity fields that can be queried on the subgraph.\n\n#### Query examples\n\nWe can query anything in the same way we would query a GraphQL backend, for more documentation on that visit the [official GraphQL docs](https://graphql.org/learn/queries/). Below are some of queries we might be interested in using.\n\n###### Assets\nGet all supported assets with its' name, address, symbol and decimals\n\n```graphql\nassets {\n  name\n  address\n  symbol\n  decimals\n}\n```\n\n###### Users\n\nGet all end users with its' respective address, and the value and status of their tokens\n\n```graphql\nusers {\n  id\n  address\n  token {\n    value\n    isActive\n  }\n}\n```\n\n###### Opportunities\n\nGet all opportunities, with its' related portfolio and token\n\n```graphql\nopportunities {\n  id\n  address\n  portfolio {\n    id\n    asset {\n      address\n      name\n    }\n  }\n  token {\n    id\n  }\n}\n```\n\n###### Portfolios\n\nGet all portfolios with its' asset, opportunities and associated raytokens\n\n```graphql\nportfolios {\n  asset {\n    symbol\n    name\n  }\n  opportunities {\n    id\n    address\n    token {\n      id\n    }\n  }\n  raytokens {\n    id\n  }\n}\n```\n\n###### RAYTokens\n\nGet all RAYTokens with its' corresponding owner address, portfolio, asset, value and all its' events.\n\n```graphql\nraytokens {\n  owner {\n    address\n  }\n  portfolio {\n    asset {\n      address\n      name\n    }\n  }\n  value\n  events {\n    __typename\n    value\n  }\n}\n```\n\n###### Token Events\n\nGet all events with basically all of their data. Here we can use inline fragments to query more effectively the different types of events.\n\n```graphql\nraytokenEvents {\n  token {\n    id\n  }\n  value\n  timestamp\n  block\n  transaction\n  __typename\n  ... on MintEvent {\n    minter\n  }\n  ... on DepositEvent {\n    sender\n    tokenValueBefore\n    tokenValueAfter\n  }\n  ... on WithdrawEvent {\n    tokenValueBefore\n    tokenValueAfter\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotofire%2Fray-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotofire%2Fray-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotofire%2Fray-subgraph/lists"}