-
Notifications
You must be signed in to change notification settings - Fork 73
feat: add ability to perform package override in config #2077
Conversation
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.
src/loadPlugins.ts(16,8): error TS2304: Cannot find name 'config'.
src/loadPlugins.ts(17,20): error TS2304: Cannot find name 'config'.
Did you run this? Want me to take it over?
Pushed some changes to fix this, will add documentation now also. |
I'm looking if that is something you would accept. I see couple issues:
I have made change in node_modules and ported it to repo (but improperly). |
Yes, although I changed the property name from I will look to add docs change in another PR and we can get this merged and released. |
@craicoverflow - I found way out. If I define output file in runtime (schema plugin) I will get schema updated so this is not priority but when we land this I would be able to do proper setup in datasync starter. Thank you so much! |
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.
Cannot approve but amazing work
let pluginName = pluginLabel; | ||
if (pluginLabel.startsWith('graphback-')) { | ||
// Internal graphback plugins needs rename | ||
pluginName = pluginLabel.replace('graphback-', '@graphback/codegen-'); | ||
} | ||
// override package name | ||
if(pluginConfigMap[pluginLabel].packageNameOverride){ | ||
pluginName = pluginConfigMap[pluginLabel].packageNameOverride; |
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.
pluginName = pluginConfigMap[pluginLabel].packageNameOverride; | |
pluginName = pluginConfigMap[pluginLabel].packageName |
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.
Updated now in 0c2dcd6
4c6e563
to
0c2dcd6
Compare
I can approve but should not approve myself, @machi1990 mind taking a look? |
0c2dcd6
to
04fad31
Compare
I have noticed that https://github.com/aerogear/graphback/blob/package-override/docs/plugins/creating-your-own-plugin.md no longer has information about config as well.