KlimaDAO / klimadao

Monorepo for the official KlimaDAO site, dApp, components and design system.
https://klimadao.finance
MIT License
92 stars 72 forks source link

Align project id attributes across subgraph schemas #1582

Open 0xemc opened 11 months ago

0xemc commented 11 months ago

https://github.com/KlimaDAO/klimadao/blob/a8cf0bf62b4f6953ecd51500f059f8fa26e22d22/carbonmark-api/src/graphql/marketplace.fragments.gql#L18-L21

There are currently 3 different project entity types across 3 subgraphs schemas (projects,carbonOffsets, carbonProjects)

Though not all identical in shape they all contain id,projectId and sometimes vintage.

These ids currently have different formats across the different schemas:

Screenshot 2023-09-26 at 4 16 37 pm

This make things tricky when trying to match project entities across subgraphs with each other.

Proposal:

projectId -> the unique identifier used by the registry itself (eg. 112 in VCS-112) vintage -> the year (or documented unix timestamp) e.g 2007 id -> the complete concatenation of registry-projectid-vintage e.g VCS-112-2007 (or VCS-112-1199059200 with timestamp)

The above is only a suggestion but the format should be the same across subgraphs

0xemc commented 11 months ago

@Atmosfearful FYI