-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(business-unit): graphql transformers for Company and Division m…
…odels (#439) * chore(business-unit): add proper graphql transformer for Company and Division models * fix(business-unit): fix types * fix(business-unit): fix types and tests * chore(business-unit): split final types into company and division * chore(business-unit): refactor draft types
- Loading branch information
1 parent
da33775
commit 291a0ea
Showing
18 changed files
with
283 additions
and
101 deletions.
There are no files selected for viewing
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,5 @@ | ||
--- | ||
'@commercetools-test-data/business-unit': minor | ||
--- | ||
|
||
Replaced graphql scaffolding with real implementation for Company and Division |
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
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
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
16 changes: 6 additions & 10 deletions
16
models/business-unit/src/company/company-draft/transformers.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 |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import { Transformer } from '@commercetools-test-data/core'; | ||
import type { | ||
TBusinessUnitDraft, | ||
TBusinessUnitDraftGraphql, | ||
} from '../../types'; | ||
import type { TCompanyDraft, TCompanyDraftGraphql } from '../../types'; | ||
|
||
const transformers = { | ||
default: Transformer<TBusinessUnitDraft, TBusinessUnitDraft>('default', { | ||
default: Transformer<TCompanyDraft, TCompanyDraft>('default', { | ||
buildFields: ['addresses'], | ||
}), | ||
rest: Transformer<TBusinessUnitDraft, TBusinessUnitDraft>('rest', { | ||
rest: Transformer<TCompanyDraft, TCompanyDraft>('rest', { | ||
buildFields: ['addresses'], | ||
}), | ||
//only scaffolding provided at this time | ||
graphql: Transformer<TBusinessUnitDraft, TBusinessUnitDraftGraphql>( | ||
'graphql', | ||
{ buildFields: [] } | ||
), | ||
graphql: Transformer<TCompanyDraft, TCompanyDraftGraphql>('graphql', { | ||
buildFields: [], | ||
}), | ||
}; | ||
|
||
export default transformers; |
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
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
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
Oops, something went wrong.