Skip to content

Conversation

cmwhited
Copy link
Collaborator

@cmwhited cmwhited commented Jun 3, 2025

Description

Switch from react-hook-form to @tanstack/react-form. We use tanstack for both the router and the query layer. Made a lot of sense to also use their form library. Also, the api is much cleaner/nicer work with than react-hook-form where I kept running into issues, especially with nested arrays, etc.

Also did a pretty big cleanup of the files/components for a cleaner/more understandable approach.

Notes

  • I intentionally removed the SchemaBrowser from the schema builder step in the form as my next PR is to move to the geo indexer with updated queries. Once I complete that work, I will bring the SchemaBrowser back in and fix selecting types/properties from the browser into the schema

Copy link

vercel bot commented Jun 3, 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.

Comment on lines -16 to +30
case typeName === 'Text':
case type_name === 'Text':
return 'Type.Text';
case typeName === 'Number':
case type_name === 'Number':
return 'Type.Number';
case typeName === 'Boolean':
case type_name === 'Boolean':
return 'Type.Boolean';
case typeName === 'Date':
case type_name === 'Date':
return 'Type.Date';
case typeName === 'Url':
case type_name === 'Url':
return 'Type.Url';
case typeName === 'Point':
case type_name === 'Point':
return 'Type.Point';
case typeName.startsWith('Relation'):
case type_name.startsWith('Relation'):
// renders the type as `Type.Relation(Entity)`
return `Type.${typeName}`;
return `Type.${type_name}`;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikgraf one of my follow-up PRs will be to update the schema type to come over as camelCase, instead of snake_case when the data is pulled from the database. When I do that, this will be updated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 btw also fine to keep snake case if there is a good reason. just was curious

@cmwhited cmwhited requested a review from nikgraf June 3, 2025 22:53
@cmwhited cmwhited merged commit 8cb57dc into main Jun 4, 2025
4 of 6 checks passed
@cmwhited cmwhited deleted the chris.whited/feat-typesync-form-updates branch June 4, 2025 07:13
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