Skip to content

Commit 93d6cf2

Browse files
committed
chore: address nits
1 parent 6055503 commit 93d6cf2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/appsync-modelgen-plugin/src/__tests__/utils/process-connections-v2.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ describe('Connection process with custom Primary Key support tests', () => {
955955
});
956956
});
957957

958-
it('With shouldUseFieldsInAssociatedWithInHasOne and CPK enabled, should return correct connection info for bi-directional has-one with CPK', () => {
958+
it('With shouldUseFieldsInAssociatedWithInHasOne and CPK enabled, should return correct connection info for bi-directional has-one with composite primary key', () => {
959959
const schema = /* GraphQL */ `
960960
type CompositeOwner @model {
961961
lastName: ID! @primaryKey(sortKeyFields: ["firstName"])
@@ -994,7 +994,7 @@ describe('Connection process with custom Primary Key support tests', () => {
994994
});
995995
});
996996

997-
it('With shouldUseFieldsInAssociatedWithInHasOne and CPK enabled, should return correct connection info for bi-directional has-one without CPK', () => {
997+
it('With shouldUseFieldsInAssociatedWithInHasOne and CPK enabled, should return correct connection info for bi-directional has-one without Composite primary key', () => {
998998
const schema = /* GraphQL */ `
999999
type BoringOwner @model {
10001000
id: ID!

packages/appsync-modelgen-plugin/src/utils/process-has-one.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export function processHasOneConnection(
5858
* Get connected fields for hasOne relation
5959
* @param otherSideBelongsToField belongsTo field on other side
6060
* @param otherSide other side model of hasOne connection
61+
* @param shouldUseFieldsInAssociatedWithInHasOne Return the connected fields instead of the connected model
6162
* @returns Array of connected fields. Return belongsTo field when in bi direction connenction. Otherwise return child pk and sk fields
6263
*/
6364
export function getConnectedFieldsForHasOne(otherSideBelongsToField: CodeGenField | undefined, otherSide: CodeGenModel, shouldUseFieldsInAssociatedWithInHasOne: boolean = false): CodeGenField[] {

0 commit comments

Comments
 (0)