-
Notifications
You must be signed in to change notification settings - Fork 24
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
TypeORM shim to use entities in Next.js frontend #384
Conversation
(coming soon with DB backend, not yet activated)
@@ -0,0 +1,183 @@ | |||
/* eslint-disable */ | |||
|
|||
// columns |
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.
I assume this file is essentially cut & pasted from the shim provided by TypeORM. Do we want to host our own version of this, or should we literally use the shim provided by TypeORM? We could adjust the webpack config to look in node_modules
:
resolve: { // see: https://webpack.js.org/configuration/resolve/
alias: {
typeorm: path.resolve(__dirname, "../node_modules/typeorm/typeorm-model-shim")
}
}
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.
I had to make one modification, but it was something they actually should have included in that file, so theoretically if it got upstreamed we could pull it from the module dir. But for now we need to keep it in-repo.
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.
@jaredcwhite Does this PR resolve the issue?
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.
@bencpeters Unfortunately not — the shim is missing BaseEntity
for some reason, I had to add it in.
Closing this in favor of swagger-axios-codegen and/or its successor. |
(Coming soon with DB backend, not yet activated)
This was part of a previous PR that got overwritten, but since we haven't yet fully switched to the DB backend, we wouldn't have wanted to roll it out without keeping it under wraps for the time being. So this PR adds the functionality for the frontend to potentially use the backend TS interfaces but doesn't yet activate it.