-
Notifications
You must be signed in to change notification settings - Fork 8
feat(typesync | create app form): switch to use @tanstack/react-form. component cleanup #204
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
Conversation
… component cleanup
@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:
To read more about collaboration on Vercel, click here. |
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}`; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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 thanreact-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
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 theSchemaBrowser
back in and fix selecting types/properties from the browser into the schema