-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Support new object ref returned from plugin configuration fn
Fixes #2906
- Loading branch information
1 parent
b393538
commit 45df738
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
packages/core/e2e/fixtures/test-plugins/with-new-config-object-reference.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Query, Resolver } from '@nestjs/graphql'; | ||
import { VendurePlugin } from '@vendure/core'; | ||
|
||
/** | ||
* https://github.com/vendure-ecommerce/vendure/issues/2906 | ||
*/ | ||
@VendurePlugin({ | ||
configuration: config => { | ||
return { | ||
...config, | ||
customFields: { | ||
...config.customFields, | ||
Customer: [ | ||
{ | ||
name: 'testField', | ||
type: 'string', | ||
}, | ||
], | ||
}, | ||
}; | ||
}, | ||
}) | ||
export class WithNewConfigObjectReferencePlugin {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters