Skip to content

Conversation

cmwhited
Copy link
Collaborator

Description

Goal of this update was to be able to resolve the schema if the user selects types to make sure that types properties, that are relations, have the associated type added to the schema.

For example, if a user selects address:

  • address has properties
    • address line 1 -> text
    • address line 2 -> text
    • city -> Relation(City)
    • state -> Relation(State)
    • country -> Relation(Country)

Needs to add types, with properties:

  • City
    • City, the type, is found and has properties:
      • name -> text
      • state -> Relation(State)
        • type already exists in the schema, added by address, do not add
      • country -> Relation(Country)
        • type already exists in the schema, added by address, do not add
      • country -> Relation(County)
        • added to schema as doesn't exist
  • State
  • Country

Also moved the InsertAppSchema domain outside of the client and api as it was duplicated so that the types are shared. And added some type validations.

Notes

The indexer currently indexes the root and crypto spaces, so doesn't have all of the relationValueTypes available. In this case, the type is added to the schema with no properties so the user will need to add. We should add some UI/UX improvements to this to help users find the type and add it, etc.

Copy link

vercel bot commented Jun 12, 2025

@cmwhited is attempting to deploy a commit to the The Graph Foundation team on Vercel, but is not a member of this team. To resolve this issue, you can:

  • Make your repository public. Collaboration is free for open source and public repositories.
  • Add @cmwhited as a member. A Pro subscription is required to access Vercel's collaborative features.
    • If you're the owner of the team, click here and add @cmwhited as a member.
    • If you're the user who initiated this build request, click here to request access.
    • If you're already a member of the The Graph Foundation team, make sure that your Vercel account is connected to your GitHub account.

To read more about collaboration on Vercel, click here.

@cmwhited cmwhited merged commit e998f12 into main Jun 13, 2025
4 of 6 checks passed
@cmwhited cmwhited deleted the chris.whited/fix-typesync-schema-browser branch June 13, 2025 02:44
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.

1 participant