Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: indexed props #4

Merged
merged 2 commits into from
Aug 24, 2021

Conversation

hbarcelos
Copy link
Contributor

This PR includes item props into the subgraph. Since there's defined no schema for items in a list, parameters are defined roughly as if they were in the 4th Normal Form.

A query for items with props will look like:

{
  items {
    id
    props {
      type
      label
      description
      isIdentifier
      value
    }
  }
}

A couple of things to consider:

  • There is no support for union types, so value is always a string. It's up to the UI to figure out the right type based on the type prop.
  • There is no support for value objects in The Graph, so every prop is an entity whose ID is <gtcr_addr>@<item_id>@<prop_label>. I'm not sure how this impacts performance.

The output could be null, so the new name better reflects that.
@hbarcelos
Copy link
Contributor Author

Also notice that this feature is dependent on PR #177 on the GTCR UI repo, since the file must be available at the managed The Graph IPFS node.

@eccentricexit eccentricexit merged commit 54cb5e7 into feat/light-curate Aug 24, 2021
@hbarcelos hbarcelos deleted the feat/light-curate-indexing-props branch August 24, 2021 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants