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

cleanup NodeInstance in generated code #1593

Merged
merged 2 commits into from
Aug 11, 2023
Merged

Conversation

lolopinto
Copy link
Owner

it's annoying, have had to clean it up/maintain it as we support different types use "obj" consistently instead of trying to map it to the type of ent

this also fixes a weird bug if a separate object was defined in another file and has a field whose graphql name is different from the field name e.g. EmailInfoType.firstName in contact_type.ts where the NodeInstance value wasn't consistent because the file is passing "contact" and the code was expecting "obj"

the types are currently defined in the base ent file if they are returned from a custom field in that.

it's just sadness over time as things changed/evolved/haven't been cleaned up yet.

it's annoying, have had to clean it up/maintain it as we support different types
use "obj" consistently instead of trying to map it to the type of ent

this also fixes a weird bug if a separate object was defined in another file e.g. `EmailInfoType` in `contact_type.ts` where the NodeInstance value wasn't consistent because the file is passing "contact" and the code was expecting "obj"

the types are currently defined in the base ent file if they are returned from a custom field in that.

it's just sadness over time as things changed/evolved/haven't been cleaned up yet.
@lolopinto lolopinto merged commit b4b20bd into main Aug 11, 2023
@lolopinto lolopinto deleted the cleanup-node-instance branch August 11, 2023 21:37
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