From 72cb424e9b69811ba849df146bdff2f78f23d1c7 Mon Sep 17 00:00:00 2001 From: Christopher Sundersingh Date: Fri, 19 Aug 2022 11:47:53 -0700 Subject: [PATCH 1/4] chore(graphql): cleanup removing subscriptions filter argument --- .../src/graphql-model-transformer.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts index 6dbbd8a7a8..d7fdc6a9ad 100644 --- a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts +++ b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts @@ -1010,19 +1010,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme case SubscriptionFieldType.ON_CREATE: case SubscriptionFieldType.ON_DELETE: case SubscriptionFieldType.ON_UPDATE: - const filterInputName = toPascalCase(['ModelSubscription', type.name.value, 'FilterInput']); - const filterInputs = createEnumModelFilters(ctx, type); - filterInputs.push(makeSubscriptionQueryFilterInput(ctx, filterInputName, type)); - filterInputs.forEach(input => { - const conditionInputName = input.name.value; - if (!ctx.output.getType(conditionInputName)) { - ctx.output.addInput(input); - } - }); - - return [ - makeInputValueDefinition('filter', makeNamedType(filterInputName)), - ]; + return []; default: throw new Error('Unknown operation type'); From a9070987818f010a2037cc25a651ba5a67f3dc97 Mon Sep 17 00:00:00 2001 From: Christopher Sundersingh Date: Fri, 19 Aug 2022 12:03:01 -0700 Subject: [PATCH 2/4] update snapshots --- ...hql-default-value-transformer.test.ts.snap | 40 +- .../model-transformer.test.ts.snap | 139 +- ...-graphql-has-many-transformer.test.ts.snap | 2232 ++++++----------- ...phql-many-to-many-transformer.test.ts.snap | 164 +- ...raphql-searchable-transformer.test.ts.snap | 99 +- 5 files changed, 790 insertions(+), 1884 deletions(-) diff --git a/packages/amplify-graphql-default-value-transformer/src/__tests__/__snapshots__/amplify-grapphql-default-value-transformer.test.ts.snap b/packages/amplify-graphql-default-value-transformer/src/__tests__/__snapshots__/amplify-grapphql-default-value-transformer.test.ts.snap index 528b0647c3..0b71fd26c6 100644 --- a/packages/amplify-graphql-default-value-transformer/src/__tests__/__snapshots__/amplify-grapphql-default-value-transformer.test.ts.snap +++ b/packages/amplify-graphql-default-value-transformer/src/__tests__/__snapshots__/amplify-grapphql-default-value-transformer.test.ts.snap @@ -204,17 +204,10 @@ type Mutation { deleteTest(input: DeleteTestInput!, condition: ModelTestConditionInput): Test } -input ModelSubscriptionTestFilterInput { - id: ModelSubscriptionIDInput - stringValue: ModelSubscriptionStringInput - and: [ModelSubscriptionTestFilterInput] - or: [ModelSubscriptionTestFilterInput] -} - type Subscription { - onCreateTest(filter: ModelSubscriptionTestFilterInput): Test @aws_subscribe(mutations: [\\"createTest\\"]) - onUpdateTest(filter: ModelSubscriptionTestFilterInput): Test @aws_subscribe(mutations: [\\"updateTest\\"]) - onDeleteTest(filter: ModelSubscriptionTestFilterInput): Test @aws_subscribe(mutations: [\\"deleteTest\\"]) + onCreateTest: Test @aws_subscribe(mutations: [\\"createTest\\"]) + onUpdateTest: Test @aws_subscribe(mutations: [\\"updateTest\\"]) + onDeleteTest: Test @aws_subscribe(mutations: [\\"deleteTest\\"]) } " @@ -504,31 +497,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - stringValue: ModelSubscriptionStringInput - intVal: ModelSubscriptionIntInput - floatValue: ModelSubscriptionFloatInput - booleanValue: ModelSubscriptionBooleanInput - awsJsonValue: ModelSubscriptionStringInput - awsDateValue: ModelSubscriptionStringInput - awsTimestampValue: ModelSubscriptionIntInput - awsEmailValue: ModelSubscriptionStringInput - awsURLValue: ModelSubscriptionStringInput - awsPhoneValue: ModelSubscriptionStringInput - awsIPAddressValue1: ModelSubscriptionStringInput - awsIPAddressValue2: ModelSubscriptionStringInput - enumValue: ModelSubscriptionStringInput - awsTimeValue: ModelSubscriptionStringInput - awsDateTime: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } " diff --git a/packages/amplify-graphql-model-transformer/src/__tests__/__snapshots__/model-transformer.test.ts.snap b/packages/amplify-graphql-model-transformer/src/__tests__/__snapshots__/model-transformer.test.ts.snap index 737f6d472d..e59e35a865 100644 --- a/packages/amplify-graphql-model-transformer/src/__tests__/__snapshots__/model-transformer.test.ts.snap +++ b/packages/amplify-graphql-model-transformer/src/__tests__/__snapshots__/model-transformer.test.ts.snap @@ -211,19 +211,13 @@ type Mutation { deleteEmail(input: DeleteEmailInput!, condition: ModelEmailConditionInput): Email } -input ModelSubscriptionTestFilterInput { - id: ModelSubscriptionIDInput - and: [ModelSubscriptionTestFilterInput] - or: [ModelSubscriptionTestFilterInput] -} - type Subscription { - onCreateTest(filter: ModelSubscriptionTestFilterInput): Test @aws_subscribe(mutations: [\\"createTest\\"]) - onUpdateTest(filter: ModelSubscriptionTestFilterInput): Test @aws_subscribe(mutations: [\\"updateTest\\"]) - onDeleteTest(filter: ModelSubscriptionTestFilterInput): Test @aws_subscribe(mutations: [\\"deleteTest\\"]) - onCreateEmail(filter: ModelSubscriptionEmailFilterInput): Email @aws_subscribe(mutations: [\\"createEmail\\"]) - onUpdateEmail(filter: ModelSubscriptionEmailFilterInput): Email @aws_subscribe(mutations: [\\"updateEmail\\"]) - onDeleteEmail(filter: ModelSubscriptionEmailFilterInput): Email @aws_subscribe(mutations: [\\"deleteEmail\\"]) + onCreateTest: Test @aws_subscribe(mutations: [\\"createTest\\"]) + onUpdateTest: Test @aws_subscribe(mutations: [\\"updateTest\\"]) + onDeleteTest: Test @aws_subscribe(mutations: [\\"deleteTest\\"]) + onCreateEmail: Email @aws_subscribe(mutations: [\\"createEmail\\"]) + onUpdateEmail: Email @aws_subscribe(mutations: [\\"updateEmail\\"]) + onDeleteEmail: Email @aws_subscribe(mutations: [\\"deleteEmail\\"]) } type ModelEmailConnection { @@ -256,12 +250,6 @@ input DeleteEmailInput { id: ID! } -input ModelSubscriptionEmailFilterInput { - id: ModelSubscriptionIDInput - and: [ModelSubscriptionEmailFilterInput] - or: [ModelSubscriptionEmailFilterInput] -} - " `; @@ -577,30 +565,19 @@ type Mutation { deleteComment(input: DeleteCommentInput!, condition: ModelCommentConditionInput): Comment } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - appearsIn: ModelSubscriptionStringInput - episode: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) - onCreateAuthor(filter: ModelSubscriptionAuthorFilterInput): Author @aws_subscribe(mutations: [\\"createAuthor\\"]) - onUpdateAuthor(filter: ModelSubscriptionAuthorFilterInput): Author @aws_subscribe(mutations: [\\"updateAuthor\\"]) - onDeleteAuthor(filter: ModelSubscriptionAuthorFilterInput): Author @aws_subscribe(mutations: [\\"deleteAuthor\\"]) - onCreateRequire(filter: ModelSubscriptionRequireFilterInput): Require @aws_subscribe(mutations: [\\"createRequire\\"]) - onUpdateRequire(filter: ModelSubscriptionRequireFilterInput): Require @aws_subscribe(mutations: [\\"updateRequire\\"]) - onDeleteRequire(filter: ModelSubscriptionRequireFilterInput): Require @aws_subscribe(mutations: [\\"deleteRequire\\"]) - onCreateComment(filter: ModelSubscriptionCommentFilterInput): Comment @aws_subscribe(mutations: [\\"createComment\\"]) - onUpdateComment(filter: ModelSubscriptionCommentFilterInput): Comment @aws_subscribe(mutations: [\\"updateComment\\"]) - onDeleteComment(filter: ModelSubscriptionCommentFilterInput): Comment @aws_subscribe(mutations: [\\"deleteComment\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreateAuthor: Author @aws_subscribe(mutations: [\\"createAuthor\\"]) + onUpdateAuthor: Author @aws_subscribe(mutations: [\\"updateAuthor\\"]) + onDeleteAuthor: Author @aws_subscribe(mutations: [\\"deleteAuthor\\"]) + onCreateRequire: Require @aws_subscribe(mutations: [\\"createRequire\\"]) + onUpdateRequire: Require @aws_subscribe(mutations: [\\"updateRequire\\"]) + onDeleteRequire: Require @aws_subscribe(mutations: [\\"deleteRequire\\"]) + onCreateComment: Comment @aws_subscribe(mutations: [\\"createComment\\"]) + onUpdateComment: Comment @aws_subscribe(mutations: [\\"updateComment\\"]) + onDeleteComment: Comment @aws_subscribe(mutations: [\\"deleteComment\\"]) } type ModelAuthorConnection { @@ -641,13 +618,6 @@ input DeleteAuthorInput { id: ID! } -input ModelSubscriptionAuthorFilterInput { - id: ModelSubscriptionIDInput - name: ModelSubscriptionStringInput - and: [ModelSubscriptionAuthorFilterInput] - or: [ModelSubscriptionAuthorFilterInput] -} - type ModelRequireConnection { items: [Require]! nextToken: String @@ -686,14 +656,6 @@ input DeleteRequireInput { id: ID! } -input ModelSubscriptionRequireFilterInput { - id: ModelSubscriptionIDInput - requiredField: ModelSubscriptionStringInput - notRequiredField: ModelSubscriptionStringInput - and: [ModelSubscriptionRequireFilterInput] - or: [ModelSubscriptionRequireFilterInput] -} - type ModelCommentConnection { items: [Comment]! nextToken: String @@ -736,15 +698,6 @@ input DeleteCommentInput { id: ID! } -input ModelSubscriptionCommentFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - content: ModelSubscriptionStringInput - updatedOn: ModelSubscriptionIntInput - and: [ModelSubscriptionCommentFilterInput] - or: [ModelSubscriptionCommentFilterInput] -} - " `; @@ -2559,19 +2512,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - str: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } " @@ -3226,19 +3170,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - str: ModelSubscriptionStringInput - createdAt: ModelSubscriptionIntInput - updatedAt: ModelSubscriptionIntInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } " @@ -3648,17 +3583,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - str: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } " @@ -4070,17 +3998,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - str: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } " diff --git a/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-has-many-transformer.test.ts.snap b/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-has-many-transformer.test.ts.snap index 6ad1ca9449..8aaf691162 100644 --- a/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-has-many-transformer.test.ts.snap +++ b/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-has-many-transformer.test.ts.snap @@ -7026,206 +7026,7 @@ Object { "directives": Array [], "fields": Array [ Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4374, - "start": 4346, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4348, - "start": 4346, - }, - "value": "id", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4374, - "start": 4350, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4374, - "start": 4350, - }, - "value": "ModelSubscriptionIDInput", - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4412, - "start": 4377, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4382, - "start": 4377, - }, - "value": "title", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4412, - "start": 4384, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4412, - "start": 4384, - }, - "value": "ModelSubscriptionStringInput", - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4454, - "start": 4415, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4418, - "start": 4415, - }, - "value": "and", - }, - "type": Object { - "kind": "ListType", - "loc": Object { - "end": 4454, - "start": 4420, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4453, - "start": 4421, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4453, - "start": 4421, - }, - "value": "ModelSubscriptionPostFilterInput", - }, - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4495, - "start": 4457, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4459, - "start": 4457, - }, - "value": "or", - }, - "type": Object { - "kind": "ListType", - "loc": Object { - "end": 4495, - "start": 4461, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4494, - "start": 4462, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4494, - "start": 4462, - }, - "value": "ModelSubscriptionPostFilterInput", - }, - }, - }, - }, - ], - "kind": "InputObjectTypeDefinition", - "loc": Object { - "end": 4497, - "start": 4303, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4341, - "start": 4309, - }, - "value": "ModelSubscriptionPostFilterInput", - }, - }, - Object { - "description": undefined, - "directives": Array [], - "fields": Array [ - Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4574, - "start": 4534, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4540, - "start": 4534, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4574, - "start": 4542, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4574, - "start": 4542, - }, - "value": "ModelSubscriptionPostFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7233,30 +7034,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 4622, - "start": 4597, + "end": 4384, + "start": 4359, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4606, - "start": 4597, + "end": 4368, + "start": 4359, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 4622, - "start": 4608, + "end": 4384, + "start": 4370, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 4621, - "start": 4609, + "end": 4383, + "start": 4371, }, "value": "createPost", }, @@ -7266,14 +7067,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 4623, - "start": 4582, + "end": 4385, + "start": 4344, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4596, - "start": 4583, + "end": 4358, + "start": 4345, }, "value": "aws_subscribe", }, @@ -7281,69 +7082,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 4623, - "start": 4521, + "end": 4385, + "start": 4325, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4533, - "start": 4521, + "end": 4337, + "start": 4325, }, "value": "onCreatePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4581, - "start": 4577, + "end": 4343, + "start": 4339, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4581, - "start": 4577, + "end": 4343, + "start": 4339, }, "value": "Post", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4679, - "start": 4639, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4645, - "start": 4639, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4679, - "start": 4647, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4679, - "start": 4647, - }, - "value": "ModelSubscriptionPostFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7351,30 +7118,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 4727, - "start": 4702, + "end": 4447, + "start": 4422, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4711, - "start": 4702, + "end": 4431, + "start": 4422, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 4727, - "start": 4713, + "end": 4447, + "start": 4433, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 4726, - "start": 4714, + "end": 4446, + "start": 4434, }, "value": "updatePost", }, @@ -7384,14 +7151,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 4728, - "start": 4687, + "end": 4448, + "start": 4407, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4701, - "start": 4688, + "end": 4421, + "start": 4408, }, "value": "aws_subscribe", }, @@ -7399,69 +7166,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 4728, - "start": 4626, + "end": 4448, + "start": 4388, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4638, - "start": 4626, + "end": 4400, + "start": 4388, }, "value": "onUpdatePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4686, - "start": 4682, + "end": 4406, + "start": 4402, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4686, - "start": 4682, + "end": 4406, + "start": 4402, }, "value": "Post", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4784, - "start": 4744, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4750, - "start": 4744, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4784, - "start": 4752, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4784, - "start": 4752, - }, - "value": "ModelSubscriptionPostFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7469,30 +7202,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 4832, - "start": 4807, + "end": 4510, + "start": 4485, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4816, - "start": 4807, + "end": 4494, + "start": 4485, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 4832, - "start": 4818, + "end": 4510, + "start": 4496, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 4831, - "start": 4819, + "end": 4509, + "start": 4497, }, "value": "deletePost", }, @@ -7502,14 +7235,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 4833, - "start": 4792, + "end": 4511, + "start": 4470, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4806, - "start": 4793, + "end": 4484, + "start": 4471, }, "value": "aws_subscribe", }, @@ -7517,69 +7250,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 4833, - "start": 4731, + "end": 4511, + "start": 4451, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4743, - "start": 4731, + "end": 4463, + "start": 4451, }, "value": "onDeletePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4791, - "start": 4787, + "end": 4469, + "start": 4465, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4791, - "start": 4787, + "end": 4469, + "start": 4465, }, "value": "Post", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 4901, - "start": 4855, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4861, - "start": 4855, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 4901, - "start": 4863, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4901, - "start": 4863, - }, - "value": "ModelSubscriptionPostEditorFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7587,30 +7286,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 4961, - "start": 4930, + "end": 4591, + "start": 4560, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4939, - "start": 4930, + "end": 4569, + "start": 4560, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 4961, - "start": 4941, + "end": 4591, + "start": 4571, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 4960, - "start": 4942, + "end": 4590, + "start": 4572, }, "value": "createPostEditor", }, @@ -7620,14 +7319,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 4962, - "start": 4915, + "end": 4592, + "start": 4545, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4929, - "start": 4916, + "end": 4559, + "start": 4546, }, "value": "aws_subscribe", }, @@ -7635,69 +7334,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 4962, - "start": 4836, + "end": 4592, + "start": 4514, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4854, - "start": 4836, + "end": 4532, + "start": 4514, }, "value": "onCreatePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4914, - "start": 4904, + "end": 4544, + "start": 4534, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4914, - "start": 4904, + "end": 4544, + "start": 4534, }, "value": "PostEditor", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5030, - "start": 4984, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 4990, - "start": 4984, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5030, - "start": 4992, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5030, - "start": 4992, - }, - "value": "ModelSubscriptionPostEditorFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7705,30 +7370,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5090, - "start": 5059, + "end": 4672, + "start": 4641, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5068, - "start": 5059, + "end": 4650, + "start": 4641, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5090, - "start": 5070, + "end": 4672, + "start": 4652, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5089, - "start": 5071, + "end": 4671, + "start": 4653, }, "value": "updatePostEditor", }, @@ -7738,14 +7403,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5091, - "start": 5044, + "end": 4673, + "start": 4626, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5058, - "start": 5045, + "end": 4640, + "start": 4627, }, "value": "aws_subscribe", }, @@ -7753,69 +7418,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5091, - "start": 4965, + "end": 4673, + "start": 4595, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4983, - "start": 4965, + "end": 4613, + "start": 4595, }, "value": "onUpdatePostEditor", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5043, - "start": 5033, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5043, - "start": 5033, - }, - "value": "PostEditor", - }, - }, - }, - Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5159, - "start": 5113, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5119, - "start": 5113, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5159, - "start": 5121, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5159, - "start": 5121, - }, - "value": "ModelSubscriptionPostEditorFilterInput", - }, + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 4625, + "start": 4615, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 4625, + "start": 4615, }, + "value": "PostEditor", }, - ], + }, + }, + Object { + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7823,30 +7454,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5219, - "start": 5188, + "end": 4753, + "start": 4722, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5197, - "start": 5188, + "end": 4731, + "start": 4722, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5219, - "start": 5199, + "end": 4753, + "start": 4733, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5218, - "start": 5200, + "end": 4752, + "start": 4734, }, "value": "deletePostEditor", }, @@ -7856,14 +7487,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5220, - "start": 5173, + "end": 4754, + "start": 4707, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5187, - "start": 5174, + "end": 4721, + "start": 4708, }, "value": "aws_subscribe", }, @@ -7871,69 +7502,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5220, - "start": 5094, + "end": 4754, + "start": 4676, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5112, - "start": 5094, + "end": 4694, + "start": 4676, }, "value": "onDeletePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5172, - "start": 5162, + "end": 4706, + "start": 4696, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5172, - "start": 5162, + "end": 4706, + "start": 4696, }, "value": "PostEditor", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5276, - "start": 5236, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5242, - "start": 5236, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5276, - "start": 5244, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5276, - "start": 5244, - }, - "value": "ModelSubscriptionUserFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -7941,30 +7538,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5324, - "start": 5299, + "end": 4816, + "start": 4791, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5308, - "start": 5299, + "end": 4800, + "start": 4791, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5324, - "start": 5310, + "end": 4816, + "start": 4802, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5323, - "start": 5311, + "end": 4815, + "start": 4803, }, "value": "createUser", }, @@ -7974,14 +7571,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5325, - "start": 5284, + "end": 4817, + "start": 4776, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5298, - "start": 5285, + "end": 4790, + "start": 4777, }, "value": "aws_subscribe", }, @@ -7989,69 +7586,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5325, - "start": 5223, + "end": 4817, + "start": 4757, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5235, - "start": 5223, + "end": 4769, + "start": 4757, }, "value": "onCreateUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5283, - "start": 5279, + "end": 4775, + "start": 4771, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5283, - "start": 5279, + "end": 4775, + "start": 4771, }, "value": "User", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5381, - "start": 5341, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5347, - "start": 5341, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5381, - "start": 5349, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5381, - "start": 5349, - }, - "value": "ModelSubscriptionUserFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -8059,30 +7622,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5429, - "start": 5404, + "end": 4879, + "start": 4854, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5413, - "start": 5404, + "end": 4863, + "start": 4854, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5429, - "start": 5415, + "end": 4879, + "start": 4865, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5428, - "start": 5416, + "end": 4878, + "start": 4866, }, "value": "updateUser", }, @@ -8092,14 +7655,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5430, - "start": 5389, + "end": 4880, + "start": 4839, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5403, - "start": 5390, + "end": 4853, + "start": 4840, }, "value": "aws_subscribe", }, @@ -8107,69 +7670,35 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5430, - "start": 5328, + "end": 4880, + "start": 4820, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5340, - "start": 5328, + "end": 4832, + "start": 4820, }, "value": "onUpdateUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5388, - "start": 5384, + "end": 4838, + "start": 4834, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5388, - "start": 5384, + "end": 4838, + "start": 4834, }, "value": "User", }, }, }, Object { - "arguments": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5486, - "start": 5446, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5452, - "start": 5446, - }, - "value": "filter", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5486, - "start": 5454, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5486, - "start": 5454, - }, - "value": "ModelSubscriptionUserFilterInput", - }, - }, - }, - ], + "arguments": Array [], "description": undefined, "directives": Array [ Object { @@ -8177,30 +7706,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5534, - "start": 5509, + "end": 4942, + "start": 4917, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5518, - "start": 5509, + "end": 4926, + "start": 4917, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5534, - "start": 5520, + "end": 4942, + "start": 4928, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5533, - "start": 5521, + "end": 4941, + "start": 4929, }, "value": "deleteUser", }, @@ -8210,14 +7739,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5535, - "start": 5494, + "end": 4943, + "start": 4902, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5508, - "start": 5495, + "end": 4916, + "start": 4903, }, "value": "aws_subscribe", }, @@ -8225,28 +7754,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5535, - "start": 5433, + "end": 4943, + "start": 4883, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5445, - "start": 5433, + "end": 4895, + "start": 4883, }, "value": "onDeleteUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5493, - "start": 5489, + "end": 4901, + "start": 4897, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5493, - "start": 5489, + "end": 4901, + "start": 4897, }, "value": "User", }, @@ -8256,14 +7785,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 5537, - "start": 4499, + "end": 4945, + "start": 4303, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4516, - "start": 4504, + "end": 4320, + "start": 4308, }, "value": "Subscription", }, @@ -8278,28 +7807,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5599, - "start": 5579, + "end": 5007, + "start": 4987, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5585, - "start": 5579, + "end": 4993, + "start": 4987, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5599, - "start": 5587, + "end": 5007, + "start": 4995, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5599, - "start": 5587, + "end": 5007, + "start": 4995, }, "value": "ModelIDInput", }, @@ -8311,28 +7840,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5624, - "start": 5602, + "end": 5032, + "start": 5010, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5610, - "start": 5602, + "end": 5018, + "start": 5010, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5624, - "start": 5612, + "end": 5032, + "start": 5020, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5624, - "start": 5612, + "end": 5032, + "start": 5020, }, "value": "ModelIDInput", }, @@ -8344,34 +7873,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5663, - "start": 5627, + "end": 5071, + "start": 5035, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5630, - "start": 5627, + "end": 5038, + "start": 5035, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 5663, - "start": 5632, + "end": 5071, + "start": 5040, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5662, - "start": 5633, + "end": 5070, + "start": 5041, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5662, - "start": 5633, + "end": 5070, + "start": 5041, }, "value": "ModelPostEditorConditionInput", }, @@ -8384,34 +7913,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5701, - "start": 5666, + "end": 5109, + "start": 5074, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5668, - "start": 5666, + "end": 5076, + "start": 5074, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 5701, - "start": 5670, + "end": 5109, + "start": 5078, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5700, - "start": 5671, + "end": 5108, + "start": 5079, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5700, - "start": 5671, + "end": 5108, + "start": 5079, }, "value": "ModelPostEditorConditionInput", }, @@ -8424,252 +7953,80 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5738, - "start": 5704, + "end": 5146, + "start": 5112, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5707, - "start": 5704, + "end": 5115, + "start": 5112, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5738, - "start": 5709, + "end": 5146, + "start": 5117, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5738, - "start": 5709, + "end": 5146, + "start": 5117, }, "value": "ModelPostEditorConditionInput", }, }, }, - ], - "kind": "InputObjectTypeDefinition", - "loc": Object { - "end": 5740, - "start": 5539, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5574, - "start": 5545, - }, - "value": "ModelPostEditorConditionInput", - }, - }, - Object { - "description": undefined, - "directives": Array [], - "fields": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5780, - "start": 5774, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5776, - "start": 5774, - }, - "value": "id", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5780, - "start": 5778, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5780, - "start": 5778, - }, - "value": "ID", - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5794, - "start": 5783, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5789, - "start": 5783, - }, - "value": "postID", - }, - "type": Object { - "kind": "NonNullType", - "loc": Object { - "end": 5794, - "start": 5791, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5793, - "start": 5791, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5793, - "start": 5791, - }, - "value": "ID", - }, - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5810, - "start": 5797, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5805, - "start": 5797, - }, - "value": "editorID", - }, - "type": Object { - "kind": "NonNullType", - "loc": Object { - "end": 5810, - "start": 5807, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5809, - "start": 5807, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5809, - "start": 5807, - }, - "value": "ID", - }, - }, - }, - }, - ], - "kind": "InputObjectTypeDefinition", - "loc": Object { - "end": 5812, - "start": 5742, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5769, - "start": 5748, - }, - "value": "CreatePostEditorInput", - }, - }, - Object { - "description": undefined, - "directives": Array [], - "fields": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 5853, - "start": 5846, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5848, - "start": 5846, - }, - "value": "id", - }, - "type": Object { - "kind": "NonNullType", - "loc": Object { - "end": 5853, - "start": 5850, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 5852, - "start": 5850, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5852, - "start": 5850, - }, - "value": "ID", - }, - }, - }, - }, + ], + "kind": "InputObjectTypeDefinition", + "loc": Object { + "end": 5148, + "start": 4947, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 4982, + "start": 4953, + }, + "value": "ModelPostEditorConditionInput", + }, + }, + Object { + "description": undefined, + "directives": Array [], + "fields": Array [ Object { "defaultValue": undefined, "description": undefined, "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5866, - "start": 5856, + "end": 5188, + "start": 5182, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5862, - "start": 5856, + "end": 5184, + "start": 5182, }, - "value": "postID", + "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5866, - "start": 5864, + "end": 5188, + "start": 5186, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5866, - "start": 5864, + "end": 5188, + "start": 5186, }, "value": "ID", }, @@ -8681,86 +8038,74 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5881, - "start": 5869, + "end": 5202, + "start": 5191, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5877, - "start": 5869, + "end": 5197, + "start": 5191, }, - "value": "editorID", + "value": "postID", }, "type": Object { - "kind": "NamedType", + "kind": "NonNullType", "loc": Object { - "end": 5881, - "start": 5879, + "end": 5202, + "start": 5199, }, - "name": Object { - "kind": "Name", + "type": Object { + "kind": "NamedType", "loc": Object { - "end": 5881, - "start": 5879, + "end": 5201, + "start": 5199, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5201, + "start": 5199, + }, + "value": "ID", }, - "value": "ID", }, }, }, - ], - "kind": "InputObjectTypeDefinition", - "loc": Object { - "end": 5883, - "start": 5814, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 5841, - "start": 5820, - }, - "value": "UpdatePostEditorInput", - }, - }, - Object { - "description": undefined, - "directives": Array [], - "fields": Array [ Object { "defaultValue": undefined, "description": undefined, "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5924, - "start": 5917, + "end": 5218, + "start": 5205, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5919, - "start": 5917, + "end": 5213, + "start": 5205, }, - "value": "id", + "value": "editorID", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 5924, - "start": 5921, + "end": 5218, + "start": 5215, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5923, - "start": 5921, + "end": 5217, + "start": 5215, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5923, - "start": 5921, + "end": 5217, + "start": 5215, }, "value": "ID", }, @@ -8770,16 +8115,16 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 5926, - "start": 5885, + "end": 5220, + "start": 5150, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5912, - "start": 5891, + "end": 5177, + "start": 5156, }, - "value": "DeletePostEditorInput", + "value": "CreatePostEditorInput", }, }, Object { @@ -8792,30 +8137,37 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6005, - "start": 5977, + "end": 5261, + "start": 5254, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5979, - "start": 5977, + "end": 5256, + "start": 5254, }, "value": "id", }, "type": Object { - "kind": "NamedType", + "kind": "NonNullType", "loc": Object { - "end": 6005, - "start": 5981, + "end": 5261, + "start": 5258, }, - "name": Object { - "kind": "Name", + "type": Object { + "kind": "NamedType", "loc": Object { - "end": 6005, - "start": 5981, + "end": 5260, + "start": 5258, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5260, + "start": 5258, + }, + "value": "ID", }, - "value": "ModelSubscriptionIDInput", }, }, }, @@ -8825,30 +8177,30 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6040, - "start": 6008, + "end": 5274, + "start": 5264, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6014, - "start": 6008, + "end": 5270, + "start": 5264, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6040, - "start": 6016, + "end": 5274, + "start": 5272, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6040, - "start": 6016, + "end": 5274, + "start": 5272, }, - "value": "ModelSubscriptionIDInput", + "value": "ID", }, }, }, @@ -8858,109 +8210,88 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6077, - "start": 6043, + "end": 5289, + "start": 5277, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6051, - "start": 6043, + "end": 5285, + "start": 5277, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6077, - "start": 6053, + "end": 5289, + "start": 5287, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6077, - "start": 6053, + "end": 5289, + "start": 5287, }, - "value": "ModelSubscriptionIDInput", + "value": "ID", }, }, }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 6125, - "start": 6080, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6083, - "start": 6080, - }, - "value": "and", - }, - "type": Object { - "kind": "ListType", - "loc": Object { - "end": 6125, - "start": 6085, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 6124, - "start": 6086, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6124, - "start": 6086, - }, - "value": "ModelSubscriptionPostEditorFilterInput", - }, - }, - }, + ], + "kind": "InputObjectTypeDefinition", + "loc": Object { + "end": 5291, + "start": 5222, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5249, + "start": 5228, }, + "value": "UpdatePostEditorInput", + }, + }, + Object { + "description": undefined, + "directives": Array [], + "fields": Array [ Object { "defaultValue": undefined, "description": undefined, "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6172, - "start": 6128, + "end": 5332, + "start": 5325, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6130, - "start": 6128, + "end": 5327, + "start": 5325, }, - "value": "or", + "value": "id", }, "type": Object { - "kind": "ListType", + "kind": "NonNullType", "loc": Object { - "end": 6172, - "start": 6132, + "end": 5332, + "start": 5329, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6171, - "start": 6133, + "end": 5331, + "start": 5329, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6171, - "start": 6133, + "end": 5331, + "start": 5329, }, - "value": "ModelSubscriptionPostEditorFilterInput", + "value": "ID", }, }, }, @@ -8968,16 +8299,16 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6174, - "start": 5928, + "end": 5334, + "start": 5293, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5972, - "start": 5934, + "end": 5320, + "start": 5299, }, - "value": "ModelSubscriptionPostEditorFilterInput", + "value": "DeletePostEditorInput", }, }, Object { @@ -8990,40 +8321,40 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 6219, - "start": 6205, + "end": 5379, + "start": 5365, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6210, - "start": 6205, + "end": 5370, + "start": 5365, }, "value": "items", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6219, - "start": 6212, + "end": 5379, + "start": 5372, }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6218, - "start": 6212, + "end": 5378, + "start": 5372, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6217, - "start": 6213, + "end": 5377, + "start": 5373, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6217, - "start": 6213, + "end": 5377, + "start": 5373, }, "value": "User", }, @@ -9037,28 +8368,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 6239, - "start": 6222, + "end": 5399, + "start": 5382, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6231, - "start": 6222, + "end": 5391, + "start": 5382, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6239, - "start": 6233, + "end": 5399, + "start": 5393, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6239, - "start": 6233, + "end": 5399, + "start": 5393, }, "value": "String", }, @@ -9068,14 +8399,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 6241, - "start": 6176, + "end": 5401, + "start": 5336, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6200, - "start": 6181, + "end": 5360, + "start": 5341, }, "value": "ModelUserConnection", }, @@ -9090,28 +8421,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6290, - "start": 6274, + "end": 5450, + "start": 5434, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6276, - "start": 6274, + "end": 5436, + "start": 5434, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6290, - "start": 6278, + "end": 5450, + "start": 5438, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6290, - "start": 6278, + "end": 5450, + "start": 5438, }, "value": "ModelIDInput", }, @@ -9123,28 +8454,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6319, - "start": 6293, + "end": 5479, + "start": 5453, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6301, - "start": 6293, + "end": 5461, + "start": 5453, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6319, - "start": 6303, + "end": 5479, + "start": 5463, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6319, - "start": 6303, + "end": 5479, + "start": 5463, }, "value": "ModelStringInput", }, @@ -9156,34 +8487,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6349, - "start": 6322, + "end": 5509, + "start": 5482, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6325, - "start": 6322, + "end": 5485, + "start": 5482, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6349, - "start": 6327, + "end": 5509, + "start": 5487, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6348, - "start": 6328, + "end": 5508, + "start": 5488, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6348, - "start": 6328, + "end": 5508, + "start": 5488, }, "value": "ModelUserFilterInput", }, @@ -9196,34 +8527,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6378, - "start": 6352, + "end": 5538, + "start": 5512, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6354, - "start": 6352, + "end": 5514, + "start": 5512, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6378, - "start": 6356, + "end": 5538, + "start": 5516, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6377, - "start": 6357, + "end": 5537, + "start": 5517, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6377, - "start": 6357, + "end": 5537, + "start": 5517, }, "value": "ModelUserFilterInput", }, @@ -9236,28 +8567,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6406, - "start": 6381, + "end": 5566, + "start": 5541, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6384, - "start": 6381, + "end": 5544, + "start": 5541, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6406, - "start": 6386, + "end": 5566, + "start": 5546, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6406, - "start": 6386, + "end": 5566, + "start": 5546, }, "value": "ModelUserFilterInput", }, @@ -9266,14 +8597,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6408, - "start": 6243, + "end": 5568, + "start": 5403, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6269, - "start": 6249, + "end": 5429, + "start": 5409, }, "value": "ModelUserFilterInput", }, @@ -9288,28 +8619,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6470, - "start": 6444, + "end": 5630, + "start": 5604, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6452, - "start": 6444, + "end": 5612, + "start": 5604, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6470, - "start": 6454, + "end": 5630, + "start": 5614, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6470, - "start": 6454, + "end": 5630, + "start": 5614, }, "value": "ModelStringInput", }, @@ -9321,34 +8652,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6503, - "start": 6473, + "end": 5663, + "start": 5633, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6476, - "start": 6473, + "end": 5636, + "start": 5633, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6503, - "start": 6478, + "end": 5663, + "start": 5638, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6502, - "start": 6479, + "end": 5662, + "start": 5639, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6502, - "start": 6479, + "end": 5662, + "start": 5639, }, "value": "ModelUserConditionInput", }, @@ -9361,34 +8692,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6535, - "start": 6506, + "end": 5695, + "start": 5666, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6508, - "start": 6506, + "end": 5668, + "start": 5666, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6535, - "start": 6510, + "end": 5695, + "start": 5670, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6534, - "start": 6511, + "end": 5694, + "start": 5671, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6534, - "start": 6511, + "end": 5694, + "start": 5671, }, "value": "ModelUserConditionInput", }, @@ -9401,28 +8732,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6566, - "start": 6538, + "end": 5726, + "start": 5698, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6541, - "start": 6538, + "end": 5701, + "start": 5698, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6566, - "start": 6543, + "end": 5726, + "start": 5703, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6566, - "start": 6543, + "end": 5726, + "start": 5703, }, "value": "ModelUserConditionInput", }, @@ -9431,14 +8762,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6568, - "start": 6410, + "end": 5728, + "start": 5570, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6439, - "start": 6416, + "end": 5599, + "start": 5576, }, "value": "ModelUserConditionInput", }, @@ -9453,28 +8784,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6602, - "start": 6596, + "end": 5762, + "start": 5756, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6598, - "start": 6596, + "end": 5758, + "start": 5756, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6602, - "start": 6600, + "end": 5762, + "start": 5760, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6602, - "start": 6600, + "end": 5762, + "start": 5760, }, "value": "ID", }, @@ -9486,34 +8817,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6622, - "start": 6605, + "end": 5782, + "start": 5765, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6613, - "start": 6605, + "end": 5773, + "start": 5765, }, "value": "username", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6622, - "start": 6615, + "end": 5782, + "start": 5775, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6621, - "start": 6615, + "end": 5781, + "start": 5775, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6621, - "start": 6615, + "end": 5781, + "start": 5775, }, "value": "String", }, @@ -9523,14 +8854,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6624, - "start": 6570, + "end": 5784, + "start": 5730, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6591, - "start": 6576, + "end": 5751, + "start": 5736, }, "value": "CreateUserInput", }, @@ -9545,34 +8876,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6659, - "start": 6652, + "end": 5819, + "start": 5812, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6654, - "start": 6652, + "end": 5814, + "start": 5812, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6659, - "start": 6656, + "end": 5819, + "start": 5816, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6658, - "start": 6656, + "end": 5818, + "start": 5816, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6658, - "start": 6656, + "end": 5818, + "start": 5816, }, "value": "ID", }, @@ -9585,28 +8916,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6678, - "start": 6662, + "end": 5838, + "start": 5822, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6670, - "start": 6662, + "end": 5830, + "start": 5822, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6678, - "start": 6672, + "end": 5838, + "start": 5832, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6678, - "start": 6672, + "end": 5838, + "start": 5832, }, "value": "String", }, @@ -9615,14 +8946,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6680, - "start": 6626, + "end": 5840, + "start": 5786, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6647, - "start": 6632, + "end": 5807, + "start": 5792, }, "value": "UpdateUserInput", }, @@ -9637,34 +8968,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6715, - "start": 6708, + "end": 5875, + "start": 5868, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6710, - "start": 6708, + "end": 5870, + "start": 5868, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6715, - "start": 6712, + "end": 5875, + "start": 5872, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6714, - "start": 6712, + "end": 5874, + "start": 5872, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6714, - "start": 6712, + "end": 5874, + "start": 5872, }, "value": "ID", }, @@ -9674,14 +9005,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6717, - "start": 6682, + "end": 5877, + "start": 5842, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6703, - "start": 6688, + "end": 5863, + "start": 5848, }, "value": "DeleteUserInput", }, @@ -9696,193 +9027,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6790, - "start": 6762, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6764, - "start": 6762, - }, - "value": "id", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 6790, - "start": 6766, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6790, - "start": 6766, - }, - "value": "ModelSubscriptionIDInput", - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 6831, - "start": 6793, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6801, - "start": 6793, - }, - "value": "username", - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 6831, - "start": 6803, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6831, - "start": 6803, - }, - "value": "ModelSubscriptionStringInput", - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 6873, - "start": 6834, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6837, - "start": 6834, - }, - "value": "and", - }, - "type": Object { - "kind": "ListType", - "loc": Object { - "end": 6873, - "start": 6839, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 6872, - "start": 6840, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6872, - "start": 6840, - }, - "value": "ModelSubscriptionUserFilterInput", - }, - }, - }, - }, - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 6914, - "start": 6876, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6878, - "start": 6876, - }, - "value": "or", - }, - "type": Object { - "kind": "ListType", - "loc": Object { - "end": 6914, - "start": 6880, - }, - "type": Object { - "kind": "NamedType", - "loc": Object { - "end": 6913, - "start": 6881, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6913, - "start": 6881, - }, - "value": "ModelSubscriptionUserFilterInput", - }, - }, - }, - }, - ], - "kind": "InputObjectTypeDefinition", - "loc": Object { - "end": 6916, - "start": 6719, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 6757, - "start": 6725, - }, - "value": "ModelSubscriptionUserFilterInput", - }, - }, - Object { - "description": undefined, - "directives": Array [], - "fields": Array [ - Object { - "defaultValue": undefined, - "description": undefined, - "directives": Array [], - "kind": "InputValueDefinition", - "loc": Object { - "end": 6959, - "start": 6953, + "end": 5920, + "start": 5914, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6955, - "start": 6953, + "end": 5916, + "start": 5914, }, "value": "eq", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6959, - "start": 6957, + "end": 5920, + "start": 5918, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6959, - "start": 6957, + "end": 5920, + "start": 5918, }, "value": "ID", }, @@ -9894,28 +9060,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6968, - "start": 6962, + "end": 5929, + "start": 5923, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6964, - "start": 6962, + "end": 5925, + "start": 5923, }, "value": "le", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6968, - "start": 6966, + "end": 5929, + "start": 5927, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6968, - "start": 6966, + "end": 5929, + "start": 5927, }, "value": "ID", }, @@ -9927,28 +9093,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6977, - "start": 6971, + "end": 5938, + "start": 5932, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6973, - "start": 6971, + "end": 5934, + "start": 5932, }, "value": "lt", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6977, - "start": 6975, + "end": 5938, + "start": 5936, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6977, - "start": 6975, + "end": 5938, + "start": 5936, }, "value": "ID", }, @@ -9960,28 +9126,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6986, - "start": 6980, + "end": 5947, + "start": 5941, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6982, - "start": 6980, + "end": 5943, + "start": 5941, }, "value": "ge", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6986, - "start": 6984, + "end": 5947, + "start": 5945, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6986, - "start": 6984, + "end": 5947, + "start": 5945, }, "value": "ID", }, @@ -9993,28 +9159,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6995, - "start": 6989, + "end": 5956, + "start": 5950, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6991, - "start": 6989, + "end": 5952, + "start": 5950, }, "value": "gt", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6995, - "start": 6993, + "end": 5956, + "start": 5954, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6995, - "start": 6993, + "end": 5956, + "start": 5954, }, "value": "ID", }, @@ -10026,34 +9192,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7011, - "start": 6998, + "end": 5972, + "start": 5959, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7005, - "start": 6998, + "end": 5966, + "start": 5959, }, "value": "between", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7011, - "start": 7007, + "end": 5972, + "start": 5968, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7010, - "start": 7008, + "end": 5971, + "start": 5969, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7010, - "start": 7008, + "end": 5971, + "start": 5969, }, "value": "ID", }, @@ -10066,28 +9232,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7028, - "start": 7014, + "end": 5989, + "start": 5975, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7024, - "start": 7014, + "end": 5985, + "start": 5975, }, "value": "beginsWith", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7028, - "start": 7026, + "end": 5989, + "start": 5987, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7028, - "start": 7026, + "end": 5989, + "start": 5987, }, "value": "ID", }, @@ -10096,14 +9262,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7030, - "start": 6918, + "end": 5991, + "start": 5879, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6948, - "start": 6924, + "end": 5909, + "start": 5885, }, "value": "ModelIDKeyConditionInput", }, @@ -10118,40 +9284,40 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 7087, - "start": 7067, + "end": 6048, + "start": 6028, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7072, - "start": 7067, + "end": 6033, + "start": 6028, }, "value": "items", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 7087, - "start": 7074, + "end": 6048, + "start": 6035, }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7086, - "start": 7074, + "end": 6047, + "start": 6035, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7085, - "start": 7075, + "end": 6046, + "start": 6036, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7085, - "start": 7075, + "end": 6046, + "start": 6036, }, "value": "PostEditor", }, @@ -10165,28 +9331,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 7107, - "start": 7090, + "end": 6068, + "start": 6051, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7099, - "start": 7090, + "end": 6060, + "start": 6051, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7107, - "start": 7101, + "end": 6068, + "start": 6062, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7107, - "start": 7101, + "end": 6068, + "start": 6062, }, "value": "String", }, @@ -10196,14 +9362,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 7109, - "start": 7032, + "end": 6070, + "start": 5993, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7062, - "start": 7037, + "end": 6023, + "start": 5998, }, "value": "ModelPostEditorConnection", }, @@ -10218,28 +9384,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7164, - "start": 7148, + "end": 6125, + "start": 6109, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7150, - "start": 7148, + "end": 6111, + "start": 6109, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7164, - "start": 7152, + "end": 6125, + "start": 6113, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7164, - "start": 7152, + "end": 6125, + "start": 6113, }, "value": "ModelIDInput", }, @@ -10251,28 +9417,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7187, - "start": 7167, + "end": 6148, + "start": 6128, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7173, - "start": 7167, + "end": 6134, + "start": 6128, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7187, - "start": 7175, + "end": 6148, + "start": 6136, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7187, - "start": 7175, + "end": 6148, + "start": 6136, }, "value": "ModelIDInput", }, @@ -10284,28 +9450,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7212, - "start": 7190, + "end": 6173, + "start": 6151, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7198, - "start": 7190, + "end": 6159, + "start": 6151, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7212, - "start": 7200, + "end": 6173, + "start": 6161, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7212, - "start": 7200, + "end": 6173, + "start": 6161, }, "value": "ModelIDInput", }, @@ -10317,34 +9483,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7248, - "start": 7215, + "end": 6209, + "start": 6176, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7218, - "start": 7215, + "end": 6179, + "start": 6176, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7248, - "start": 7220, + "end": 6209, + "start": 6181, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7247, - "start": 7221, + "end": 6208, + "start": 6182, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7247, - "start": 7221, + "end": 6208, + "start": 6182, }, "value": "ModelPostEditorFilterInput", }, @@ -10357,34 +9523,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7283, - "start": 7251, + "end": 6244, + "start": 6212, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7253, - "start": 7251, + "end": 6214, + "start": 6212, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7283, - "start": 7255, + "end": 6244, + "start": 6216, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7282, - "start": 7256, + "end": 6243, + "start": 6217, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7282, - "start": 7256, + "end": 6243, + "start": 6217, }, "value": "ModelPostEditorFilterInput", }, @@ -10397,28 +9563,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7317, - "start": 7286, + "end": 6278, + "start": 6247, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7289, - "start": 7286, + "end": 6250, + "start": 6247, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7317, - "start": 7291, + "end": 6278, + "start": 6252, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7317, - "start": 7291, + "end": 6278, + "start": 6252, }, "value": "ModelPostEditorFilterInput", }, @@ -10427,14 +9593,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7319, - "start": 7111, + "end": 6280, + "start": 6072, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7143, - "start": 7117, + "end": 6104, + "start": 6078, }, "value": "ModelPostEditorFilterInput", }, @@ -10442,7 +9608,7 @@ Object { ], "kind": "Document", "loc": Object { - "end": 7321, + "end": 6282, "start": 0, }, } diff --git a/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-many-to-many-transformer.test.ts.snap b/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-many-to-many-transformer.test.ts.snap index cd3f1151a3..fe8af14829 100644 --- a/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-many-to-many-transformer.test.ts.snap +++ b/packages/amplify-graphql-relational-transformer/src/__tests__/__snapshots__/amplify-graphql-many-to-many-transformer.test.ts.snap @@ -235,23 +235,16 @@ type Mutation { deleteModelAModelB(input: DeleteModelAModelBInput!, condition: ModelModelAModelBConditionInput): ModelAModelB } -input ModelSubscriptionModelAFilterInput { - id: ModelSubscriptionIDInput - sortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelAFilterInput] - or: [ModelSubscriptionModelAFilterInput] -} - type Subscription { - onCreateModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"createModelA\\"]) - onUpdateModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"updateModelA\\"]) - onDeleteModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"deleteModelA\\"]) - onCreateModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"createModelB\\"]) - onUpdateModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"updateModelB\\"]) - onDeleteModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"deleteModelB\\"]) - onCreateModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"createModelAModelB\\"]) - onUpdateModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"updateModelAModelB\\"]) - onDeleteModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"deleteModelAModelB\\"]) + onCreateModelA: ModelA @aws_subscribe(mutations: [\\"createModelA\\"]) + onUpdateModelA: ModelA @aws_subscribe(mutations: [\\"updateModelA\\"]) + onDeleteModelA: ModelA @aws_subscribe(mutations: [\\"deleteModelA\\"]) + onCreateModelB: ModelB @aws_subscribe(mutations: [\\"createModelB\\"]) + onUpdateModelB: ModelB @aws_subscribe(mutations: [\\"updateModelB\\"]) + onDeleteModelB: ModelB @aws_subscribe(mutations: [\\"deleteModelB\\"]) + onCreateModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"createModelAModelB\\"]) + onUpdateModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"updateModelAModelB\\"]) + onDeleteModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"deleteModelAModelB\\"]) } type ModelModelBConnection { @@ -288,13 +281,6 @@ input DeleteModelBInput { sortId: ID! } -input ModelSubscriptionModelBFilterInput { - id: ModelSubscriptionIDInput - sortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelBFilterInput] - or: [ModelSubscriptionModelBFilterInput] -} - type ModelModelAModelBConnection { items: [ModelAModelB]! nextToken: String @@ -341,16 +327,6 @@ input DeleteModelAModelBInput { id: ID! } -input ModelSubscriptionModelAModelBFilterInput { - id: ModelSubscriptionIDInput - modelAID: ModelSubscriptionIDInput - modelAsortId: ModelSubscriptionIDInput - modelBID: ModelSubscriptionIDInput - modelBsortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelAModelBFilterInput] - or: [ModelSubscriptionModelAModelBFilterInput] -} - input ModelIDKeyConditionInput { eq: ID le: ID @@ -3491,24 +3467,16 @@ type Mutation { deleteModelAModelB(input: DeleteModelAModelBInput!, condition: ModelModelAModelBConditionInput): ModelAModelB } -input ModelSubscriptionModelAFilterInput { - id: ModelSubscriptionIDInput - sortId: ModelSubscriptionIDInput - secondSortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelAFilterInput] - or: [ModelSubscriptionModelAFilterInput] -} - type Subscription { - onCreateModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"createModelA\\"]) - onUpdateModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"updateModelA\\"]) - onDeleteModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"deleteModelA\\"]) - onCreateModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"createModelB\\"]) - onUpdateModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"updateModelB\\"]) - onDeleteModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"deleteModelB\\"]) - onCreateModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"createModelAModelB\\"]) - onUpdateModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"updateModelAModelB\\"]) - onDeleteModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"deleteModelAModelB\\"]) + onCreateModelA: ModelA @aws_subscribe(mutations: [\\"createModelA\\"]) + onUpdateModelA: ModelA @aws_subscribe(mutations: [\\"updateModelA\\"]) + onDeleteModelA: ModelA @aws_subscribe(mutations: [\\"deleteModelA\\"]) + onCreateModelB: ModelB @aws_subscribe(mutations: [\\"createModelB\\"]) + onUpdateModelB: ModelB @aws_subscribe(mutations: [\\"updateModelB\\"]) + onDeleteModelB: ModelB @aws_subscribe(mutations: [\\"deleteModelB\\"]) + onCreateModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"createModelAModelB\\"]) + onUpdateModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"updateModelAModelB\\"]) + onDeleteModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"deleteModelAModelB\\"]) } type ModelModelBConnection { @@ -3545,13 +3513,6 @@ input DeleteModelBInput { sortId: ID! } -input ModelSubscriptionModelBFilterInput { - id: ModelSubscriptionIDInput - sortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelBFilterInput] - or: [ModelSubscriptionModelBFilterInput] -} - type ModelModelAModelBConnection { items: [ModelAModelB]! nextToken: String @@ -3602,17 +3563,6 @@ input DeleteModelAModelBInput { id: ID! } -input ModelSubscriptionModelAModelBFilterInput { - id: ModelSubscriptionIDInput - modelAID: ModelSubscriptionIDInput - modelAsortId: ModelSubscriptionIDInput - modelAsecondSortId: ModelSubscriptionIDInput - modelBID: ModelSubscriptionIDInput - modelBsortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelAModelBFilterInput] - or: [ModelSubscriptionModelAModelBFilterInput] -} - input ModelModelAPrimaryCompositeKeyConditionInput { eq: ModelModelAPrimaryCompositeKeyInput le: ModelModelAPrimaryCompositeKeyInput @@ -3889,23 +3839,16 @@ type Mutation { deleteModelAModelB(input: DeleteModelAModelBInput!, condition: ModelModelAModelBConditionInput): ModelAModelB } -input ModelSubscriptionModelAFilterInput { - id: ModelSubscriptionIDInput - sortId: ModelSubscriptionIDInput - and: [ModelSubscriptionModelAFilterInput] - or: [ModelSubscriptionModelAFilterInput] -} - type Subscription { - onCreateModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"createModelA\\"]) - onUpdateModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"updateModelA\\"]) - onDeleteModelA(filter: ModelSubscriptionModelAFilterInput): ModelA @aws_subscribe(mutations: [\\"deleteModelA\\"]) - onCreateModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"createModelB\\"]) - onUpdateModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"updateModelB\\"]) - onDeleteModelB(filter: ModelSubscriptionModelBFilterInput): ModelB @aws_subscribe(mutations: [\\"deleteModelB\\"]) - onCreateModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"createModelAModelB\\"]) - onUpdateModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"updateModelAModelB\\"]) - onDeleteModelAModelB(filter: ModelSubscriptionModelAModelBFilterInput): ModelAModelB @aws_subscribe(mutations: [\\"deleteModelAModelB\\"]) + onCreateModelA: ModelA @aws_subscribe(mutations: [\\"createModelA\\"]) + onUpdateModelA: ModelA @aws_subscribe(mutations: [\\"updateModelA\\"]) + onDeleteModelA: ModelA @aws_subscribe(mutations: [\\"deleteModelA\\"]) + onCreateModelB: ModelB @aws_subscribe(mutations: [\\"createModelB\\"]) + onUpdateModelB: ModelB @aws_subscribe(mutations: [\\"updateModelB\\"]) + onDeleteModelB: ModelB @aws_subscribe(mutations: [\\"deleteModelB\\"]) + onCreateModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"createModelAModelB\\"]) + onUpdateModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"updateModelAModelB\\"]) + onDeleteModelAModelB: ModelAModelB @aws_subscribe(mutations: [\\"deleteModelAModelB\\"]) } type ModelModelBConnection { @@ -3938,12 +3881,6 @@ input DeleteModelBInput { id: ID! } -input ModelSubscriptionModelBFilterInput { - id: ModelSubscriptionIDInput - and: [ModelSubscriptionModelBFilterInput] - or: [ModelSubscriptionModelBFilterInput] -} - type ModelModelAModelBConnection { items: [ModelAModelB]! nextToken: String @@ -3986,15 +3923,6 @@ input DeleteModelAModelBInput { id: ID! } -input ModelSubscriptionModelAModelBFilterInput { - id: ModelSubscriptionIDInput - modelAID: ModelSubscriptionIDInput - modelAsortId: ModelSubscriptionIDInput - modelBID: ModelSubscriptionIDInput - and: [ModelSubscriptionModelAModelBFilterInput] - or: [ModelSubscriptionModelAModelBFilterInput] -} - input ModelIDKeyConditionInput { eq: ID le: ID @@ -4235,22 +4163,16 @@ type Mutation { deleteFooBar(input: DeleteFooBarInput!, condition: ModelFooBarConditionInput): FooBar } -input ModelSubscriptionFooFilterInput { - id: ModelSubscriptionIDInput - and: [ModelSubscriptionFooFilterInput] - or: [ModelSubscriptionFooFilterInput] -} - type Subscription { - onCreateFoo(filter: ModelSubscriptionFooFilterInput): Foo @aws_subscribe(mutations: [\\"createFoo\\"]) - onUpdateFoo(filter: ModelSubscriptionFooFilterInput): Foo @aws_subscribe(mutations: [\\"updateFoo\\"]) - onDeleteFoo(filter: ModelSubscriptionFooFilterInput): Foo @aws_subscribe(mutations: [\\"deleteFoo\\"]) - onCreateBar(filter: ModelSubscriptionBarFilterInput): Bar @aws_subscribe(mutations: [\\"createBar\\"]) - onUpdateBar(filter: ModelSubscriptionBarFilterInput): Bar @aws_subscribe(mutations: [\\"updateBar\\"]) - onDeleteBar(filter: ModelSubscriptionBarFilterInput): Bar @aws_subscribe(mutations: [\\"deleteBar\\"]) - onCreateFooBar(filter: ModelSubscriptionFooBarFilterInput): FooBar @aws_subscribe(mutations: [\\"createFooBar\\"]) - onUpdateFooBar(filter: ModelSubscriptionFooBarFilterInput): FooBar @aws_subscribe(mutations: [\\"updateFooBar\\"]) - onDeleteFooBar(filter: ModelSubscriptionFooBarFilterInput): FooBar @aws_subscribe(mutations: [\\"deleteFooBar\\"]) + onCreateFoo: Foo @aws_subscribe(mutations: [\\"createFoo\\"]) + onUpdateFoo: Foo @aws_subscribe(mutations: [\\"updateFoo\\"]) + onDeleteFoo: Foo @aws_subscribe(mutations: [\\"deleteFoo\\"]) + onCreateBar: Bar @aws_subscribe(mutations: [\\"createBar\\"]) + onUpdateBar: Bar @aws_subscribe(mutations: [\\"updateBar\\"]) + onDeleteBar: Bar @aws_subscribe(mutations: [\\"deleteBar\\"]) + onCreateFooBar: FooBar @aws_subscribe(mutations: [\\"createFooBar\\"]) + onUpdateFooBar: FooBar @aws_subscribe(mutations: [\\"updateFooBar\\"]) + onDeleteFooBar: FooBar @aws_subscribe(mutations: [\\"deleteFooBar\\"]) } type ModelBarConnection { @@ -4283,12 +4205,6 @@ input DeleteBarInput { id: ID! } -input ModelSubscriptionBarFilterInput { - id: ModelSubscriptionIDInput - and: [ModelSubscriptionBarFilterInput] - or: [ModelSubscriptionBarFilterInput] -} - type ModelFooBarConnection { items: [FooBar]! nextToken: String @@ -4327,14 +4243,6 @@ input DeleteFooBarInput { id: ID! } -input ModelSubscriptionFooBarFilterInput { - id: ModelSubscriptionIDInput - fooID: ModelSubscriptionIDInput - barID: ModelSubscriptionIDInput - and: [ModelSubscriptionFooBarFilterInput] - or: [ModelSubscriptionFooBarFilterInput] -} - " `; diff --git a/packages/amplify-graphql-searchable-transformer/src/__tests__/__snapshots__/amplify-graphql-searchable-transformer.test.ts.snap b/packages/amplify-graphql-searchable-transformer/src/__tests__/__snapshots__/amplify-graphql-searchable-transformer.test.ts.snap index 1c99690c85..4225f7d25a 100644 --- a/packages/amplify-graphql-searchable-transformer/src/__tests__/__snapshots__/amplify-graphql-searchable-transformer.test.ts.snap +++ b/packages/amplify-graphql-searchable-transformer/src/__tests__/__snapshots__/amplify-graphql-searchable-transformer.test.ts.snap @@ -252,19 +252,10 @@ type Mutation { deleteEmployee(input: DeleteEmployeeInput!, condition: ModelEmployeeConditionInput): Employee } -input ModelSubscriptionEmployeeFilterInput { - id: ModelSubscriptionIDInput - firstName: ModelSubscriptionStringInput - lastName: ModelSubscriptionStringInput - type: ModelSubscriptionStringInput - and: [ModelSubscriptionEmployeeFilterInput] - or: [ModelSubscriptionEmployeeFilterInput] -} - type Subscription { - onCreateEmployee(filter: ModelSubscriptionEmployeeFilterInput): Employee @aws_subscribe(mutations: [\\"createEmployee\\"]) - onUpdateEmployee(filter: ModelSubscriptionEmployeeFilterInput): Employee @aws_subscribe(mutations: [\\"updateEmployee\\"]) - onDeleteEmployee(filter: ModelSubscriptionEmployeeFilterInput): Employee @aws_subscribe(mutations: [\\"deleteEmployee\\"]) + onCreateEmployee: Employee @aws_subscribe(mutations: [\\"createEmployee\\"]) + onUpdateEmployee: Employee @aws_subscribe(mutations: [\\"updateEmployee\\"]) + onDeleteEmployee: Employee @aws_subscribe(mutations: [\\"deleteEmployee\\"]) } input SearchableStringFilterInput { @@ -622,19 +613,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } input SearchableStringFilterInput { @@ -1901,22 +1883,13 @@ type Mutation { deleteUser(input: DeleteUserInput!, condition: ModelUserConditionInput): User } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) - onCreateUser(filter: ModelSubscriptionUserFilterInput): User @aws_subscribe(mutations: [\\"createUser\\"]) - onUpdateUser(filter: ModelSubscriptionUserFilterInput): User @aws_subscribe(mutations: [\\"updateUser\\"]) - onDeleteUser(filter: ModelSubscriptionUserFilterInput): User @aws_subscribe(mutations: [\\"deleteUser\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreateUser: User @aws_subscribe(mutations: [\\"createUser\\"]) + onUpdateUser: User @aws_subscribe(mutations: [\\"updateUser\\"]) + onDeleteUser: User @aws_subscribe(mutations: [\\"deleteUser\\"]) } type ModelUserConnection { @@ -1953,13 +1926,6 @@ input DeleteUserInput { id: ID! } -input ModelSubscriptionUserFilterInput { - id: ModelSubscriptionIDInput - name: ModelSubscriptionStringInput - and: [ModelSubscriptionUserFilterInput] - or: [ModelSubscriptionUserFilterInput] -} - input SearchableStringFilterInput { ne: String gt: String @@ -2332,17 +2298,8 @@ type Mutation { customCreatePost(input: CreatePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"customCreatePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"customCreatePost\\"]) } input SearchableStringFilterInput { @@ -2695,19 +2652,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } input SearchableStringFilterInput { @@ -3060,19 +3008,10 @@ type Mutation { deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post } -input ModelSubscriptionPostFilterInput { - id: ModelSubscriptionIDInput - title: ModelSubscriptionStringInput - createdAt: ModelSubscriptionStringInput - updatedAt: ModelSubscriptionStringInput - and: [ModelSubscriptionPostFilterInput] - or: [ModelSubscriptionPostFilterInput] -} - type Subscription { - onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) - onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) - onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) + onCreatePost: Post @aws_subscribe(mutations: [\\"createPost\\"]) + onUpdatePost: Post @aws_subscribe(mutations: [\\"updatePost\\"]) + onDeletePost: Post @aws_subscribe(mutations: [\\"deletePost\\"]) } input SearchableStringFilterInput { From 1454cec1532245c9d753da8d7ae22abb07a175c0 Mon Sep 17 00:00:00 2001 From: Christopher Sundersingh Date: Mon, 22 Aug 2022 15:39:15 -0700 Subject: [PATCH 3/4] test(graphql): add subscription tests with variable syntax --- .../SubscriptionsWithAuthTest.e2e.test.ts | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/packages/graphql-transformers-e2e-tests/src/__tests__/SubscriptionsWithAuthTest.e2e.test.ts b/packages/graphql-transformers-e2e-tests/src/__tests__/SubscriptionsWithAuthTest.e2e.test.ts index 72f823b7eb..a5c109c1c2 100644 --- a/packages/graphql-transformers-e2e-tests/src/__tests__/SubscriptionsWithAuthTest.e2e.test.ts +++ b/packages/graphql-transformers-e2e-tests/src/__tests__/SubscriptionsWithAuthTest.e2e.test.ts @@ -1261,6 +1261,86 @@ test('test that subscription with apiKey onDelete', async () => { }); }); +// This scenario is a bug on AppSync. AppSync is working to accept optional arguments in subscriptions. +// This needs to be updated once AppSync change the behavior +test('Test subscriptions with variable syntax and does not include optional argument - should throw an error', async () => { + reconfigureAmplifyAPI('AMAZON_COGNITO_USER_POOLS'); + await Auth.signIn(USERNAME1, REAL_PASSWORD); + const observer = API.graphql({ + // @ts-ignore + query: gql` + subscription OnCreateStudent($owner: String) { + onCreateStudent(owner: $owner) { + id + name + email + ssn + owner + } + } + `, + authMode: GRAPHQL_AUTH_MODE.AMAZON_COGNITO_USER_POOLS, + }) as unknown as Observable; + let subscription: ZenObservable.Subscription; + const subscriptionPromise = new Promise((resolve, _) => { + subscription = observer.subscribe({ + error: (err: any) => { + expect(err.error.errors.length).toEqual(1); + expect(err.error.errors[0].message).toEqual( + 'Connection failed: {"errors":[{"message":"Validation error of type UndefinedVariable: variable not found"}]}', + ); + resolve(undefined); + }, + }); + }); +}); + +test('Test subscriptions with variable syntax', async () => { + reconfigureAmplifyAPI('AMAZON_COGNITO_USER_POOLS'); + await Auth.signIn(USERNAME1, REAL_PASSWORD); + const observer = API.graphql({ + // @ts-ignore + query: gql` + subscription OnCreateStudent($owner: String) { + onCreateStudent(owner: $owner) { + id + name + email + ssn + owner + } + } + `, + variables: { + owner: USERNAME1, + }, + authMode: GRAPHQL_AUTH_MODE.AMAZON_COGNITO_USER_POOLS, + }) as unknown as Observable; + let subscription: ZenObservable.Subscription; + const subscriptionPromise = new Promise((resolve, _) => { + subscription = observer.subscribe((event: any) => { + const student = event.value.data.onCreateStudent; + subscription.unsubscribe(); + expect(student.name).toEqual('student_variable_1'); + expect(student.email).toEqual('student1@domain.com'); + expect(student.ssn).toBeNull(); + resolve(undefined); + }); + }); + + await new Promise(res => setTimeout(res, SUBSCRIPTION_DELAY)); + + await createStudent(GRAPHQL_CLIENT_1, { + name: 'student_variable_1', + email: 'student1@domain.com', + ssn: 'AAA-01-SSSS', + }); + + return withTimeOut(subscriptionPromise, SUBSCRIPTION_TIMEOUT, 'OnCreateStudent Subscription timed out', () => { + subscription?.unsubscribe(); + }); +}); + function reconfigureAmplifyAPI(appSyncAuthType: string, apiKey?: string) { if (appSyncAuthType === 'API_KEY') { API.configure({ From 3da2ce604469d87160de1374f944a891ca9f476b Mon Sep 17 00:00:00 2001 From: Al Harris <91494052+alharris-at@users.noreply.github.com> Date: Tue, 23 Aug 2022 09:46:59 -0700 Subject: [PATCH 4/4] Revert "Undo change to directive merge that broke tests" (#756) This reverts commit 9a070c6984d0c0cc8b95557aaa9d60a242b044c9. Revert "Remove test enforcing bugged behavior" This reverts commit 3fa19b2599abb78c7d0df787a43ef579562fd44c. Revert "Fix feature flag usage" This reverts commit 4a60931eb55bbd272b147b3dd8ded5d54adf2b24. Revert "Remove unneeded FF prefix" This reverts commit 2d7e37b59ce70dda94a503a297d9355ee0835463. Revert "Correct some linting mistakes" This reverts commit 4e80008541018c13c49d12489916eb3bf2f18898. Revert "Fix value overwrite in unit tests" This reverts commit 52de86c21480dfb781751d584de7dcdf859bfad8. Revert "Tests: add tests for directive config merge" This reverts commit 8b83c8c23d3eba6ebf8083aa2c43e390bd3b9fd7. Revert "Allow public subscriptions to be created" This reverts commit eba6acd474a464ed53c3a428fff95bc56eaa346d. Revert "Feature: enable deep merge default directive config with FF" This reverts commit b1fdf5907799d8f0446a8f0e38108942f3ea88d5. --- .../src/graphql-auth-transformer.ts | 14 ++-- .../src/utils/index.ts | 6 +- .../src/utils/schema.ts | 17 ++-- .../src/utils/validations.ts | 4 +- .../src/graphql-default-value-transformer.ts | 2 +- .../src/graphql-function-transformer.ts | 2 +- .../src/graphql-http-transformer.ts | 2 +- .../src/graphql-index-transformer.ts | 2 +- .../src/graphql-primary-key-transformer.ts | 2 +- .../src/__tests__/model-transformer.test.ts | 28 +++++-- .../src/graphql-model-transformer.ts | 65 ++++---------- .../src/graphql-predictions-transformer.ts | 2 +- .../src/graphql-belongs-to-transformer.ts | 2 +- .../src/graphql-has-many-transformer.ts | 2 +- .../src/graphql-has-one-transformer.ts | 2 +- .../src/graphql-many-to-many-transformer.ts | 2 +- .../src/graphql-searchable-transformer.ts | 2 +- .../__tests__/utils/directive-wrapper-test.ts | 84 ------------------- .../src/utils/directive-wrapper.ts | 7 +- 19 files changed, 69 insertions(+), 178 deletions(-) delete mode 100644 packages/amplify-graphql-transformer-core/src/__tests__/utils/directive-wrapper-test.ts diff --git a/packages/amplify-graphql-auth-transformer/src/graphql-auth-transformer.ts b/packages/amplify-graphql-auth-transformer/src/graphql-auth-transformer.ts index 46f50fbad8..3d8b4a224b 100644 --- a/packages/amplify-graphql-auth-transformer/src/graphql-auth-transformer.ts +++ b/packages/amplify-graphql-auth-transformer/src/graphql-auth-transformer.ts @@ -170,7 +170,7 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA if (context.metadata.has('joinTypeList')) { isJoinType = context.metadata.get>('joinTypeList')!.includes(typeName); } - this.rules = getAuthDirectiveRules(new DirectiveWrapper(directive), context.featureFlags); + this.rules = getAuthDirectiveRules(new DirectiveWrapper(directive)); // validate rules validateRules(this.rules, this.configuredAuthProviders, def.name.value); @@ -187,7 +187,7 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA this.addTypeToResourceReferences(def.name.value, this.rules); // turn rules into roles and add into acm and roleMap this.convertRulesToRoles(acm, this.rules, isJoinType, undefined, undefined, context); - this.modelDirectiveConfig.set(typeName, getModelConfig(modelDirective, typeName, context.featureFlags, context.isProjectUsingDataStore())); + this.modelDirectiveConfig.set(typeName, getModelConfig(modelDirective, typeName, context.isProjectUsingDataStore())); this.authModelConfig.set(typeName, acm); }; @@ -225,8 +225,8 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA const modelDirective = parent.directives?.find(dir => dir.name.value === 'model'); const typeName = parent.name.value; const fieldName = field.name.value; - const rules: AuthRule[] = getAuthDirectiveRules(new DirectiveWrapper(directive), context.featureFlags, true); - validateFieldRules(new DirectiveWrapper(directive), isParentTypeBuiltinType, modelDirective !== undefined, field.name.value, context.featureFlags); + const rules: AuthRule[] = getAuthDirectiveRules(new DirectiveWrapper(directive), true); + validateFieldRules(new DirectiveWrapper(directive), isParentTypeBuiltinType, modelDirective !== undefined, field.name.value); validateRules(rules, this.configuredAuthProviders, field.name.value); // regardless if a model directive is used we generate the policy for iam auth @@ -239,7 +239,7 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA let acm: AccessControlMatrix; // check if the parent is already in the model config if not add it if (!this.modelDirectiveConfig.has(typeName)) { - this.modelDirectiveConfig.set(typeName, getModelConfig(modelDirective, typeName, context.featureFlags, context.isProjectUsingDataStore())); + this.modelDirectiveConfig.set(typeName, getModelConfig(modelDirective, typeName, context.isProjectUsingDataStore())); acm = new AccessControlMatrix({ name: parent.name.value, operations: MODEL_OPERATIONS, @@ -345,7 +345,7 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA // check if searchable if included in the typeName if (searchableDirective) { // protect search query - const config = getSearchableConfig(searchableDirective, modelName, context.featureFlags); + const config = getSearchableConfig(searchableDirective, modelName); this.protectSearchResolver(context, def, context.output.getQueryTypeName()!, config.queries.search, acm); } // get fields specified in the schema @@ -515,7 +515,7 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA } // @searchable if (searchableDirective) { - const config = getSearchableConfig(searchableDirective, def.name.value, ctx.featureFlags); + const config = getSearchableConfig(searchableDirective, def.name.value); addServiceDirective(ctx.output.getQueryTypeName(), 'search', config.queries.search); } diff --git a/packages/amplify-graphql-auth-transformer/src/utils/index.ts b/packages/amplify-graphql-auth-transformer/src/utils/index.ts index 0fb118cb1c..23f7569b9c 100644 --- a/packages/amplify-graphql-auth-transformer/src/utils/index.ts +++ b/packages/amplify-graphql-auth-transformer/src/utils/index.ts @@ -1,5 +1,5 @@ import { DirectiveWrapper, InvalidDirectiveError } from '@aws-amplify/graphql-transformer-core'; -import { AppSyncAuthMode, FeatureFlagProvider, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces'; +import { AppSyncAuthMode, TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { Stack } from '@aws-cdk/core'; import { ObjectTypeDefinitionNode } from 'graphql'; import { MODEL_OPERATIONS, READ_MODEL_OPERATIONS } from './constants'; @@ -35,7 +35,7 @@ export const splitRoles = (roles: Array): RolesByProvider => ({ /** * returns @auth directive rules */ -export const getAuthDirectiveRules = (authDir: DirectiveWrapper, featureFlags: FeatureFlagProvider, isField = false): AuthRule[] => { +export const getAuthDirectiveRules = (authDir: DirectiveWrapper, isField = false): AuthRule[] => { const splitReadOperation = (rule: AuthRule): void => { const operations: (ModelOperation | 'read')[] = rule.operations ?? []; const indexOfRead = operations.indexOf('read', 0); @@ -51,7 +51,7 @@ export const getAuthDirectiveRules = (authDir: DirectiveWrapper, featureFlags: F } }; - const { rules } = authDir.getArguments<{ rules: Array }>({ rules: [] }, featureFlags); + const { rules } = authDir.getArguments<{ rules: Array }>({ rules: [] }); rules.forEach(rule => { const operations: (ModelOperation | 'read')[] = rule.operations ?? MODEL_OPERATIONS; diff --git a/packages/amplify-graphql-auth-transformer/src/utils/schema.ts b/packages/amplify-graphql-auth-transformer/src/utils/schema.ts index 9ad41c2f09..62ba204fd6 100644 --- a/packages/amplify-graphql-auth-transformer/src/utils/schema.ts +++ b/packages/amplify-graphql-auth-transformer/src/utils/schema.ts @@ -9,7 +9,6 @@ import { MutationFieldType, TransformerTransformSchemaStepContextProvider, TransformerContextProvider, - FeatureFlagProvider, } from '@aws-amplify/graphql-transformer-interfaces'; import { ObjectTypeDefinitionNode, FieldDefinitionNode, DirectiveNode, NamedTypeNode, @@ -43,7 +42,7 @@ export const fieldIsList = (fields: ReadonlyArray, fieldNam /** * getModelConfig */ -export const getModelConfig = (directive: DirectiveNode, typeName: string, featureFlags: FeatureFlagProvider, isDataStoreEnabled = false): ModelDirectiveConfiguration => { +export const getModelConfig = (directive: DirectiveNode, typeName: string, isDataStoreEnabled = false): ModelDirectiveConfiguration => { const directiveWrapped: DirectiveWrapper = new DirectiveWrapper(directive); const options = directiveWrapped.getArguments({ queries: { @@ -66,20 +65,20 @@ export const getModelConfig = (directive: DirectiveNode, typeName: string, featu createdAt: 'createdAt', updatedAt: 'updatedAt', }, - }, featureFlags); + }); return options; }; /** * getSearchableConfig */ -export const getSearchableConfig = (directive: DirectiveNode, typeName: string, featureFlags: FeatureFlagProvider): SearchableConfig | null => { +export const getSearchableConfig = (directive: DirectiveNode, typeName: string): SearchableConfig | null => { const directiveWrapped: DirectiveWrapper = new DirectiveWrapper(directive); const options = directiveWrapped.getArguments({ queries: { search: graphqlName(`search${plurality(toUpper(typeName), true)}`), }, - }, featureFlags); + }); return options; }; /* @@ -112,7 +111,7 @@ export const getRelationalPrimaryMap = ( const args = directiveWrapped.getArguments({ indexName: undefined, fields: undefined, - }, ctx.featureFlags); + }); // we only generate a primary map if a index name or field is specified // if both are undefined then @hasMany will create a new gsi with a new readonly field // we don't need a primary map since this readonly field is not a auth field @@ -136,10 +135,10 @@ export const getRelationalPrimaryMap = ( fields: [ getConnectionAttributeName(ctx.featureFlags, def.name.value, field.name.value, relatedModel.name.value), ...getSortKeyFieldNames(relatedModel).map( - (it) => getSortKeyConnectionAttributeName(def.name.value, field.name.value, it), - ), + it => getSortKeyConnectionAttributeName(def.name.value, field.name.value, it), + ) ], - }, ctx.featureFlags); + }); const relatedPrimaryFields = getKeyFields(ctx, relatedModel); // the fields provided by the directive (implicit/explicit) need to match the total amount of fields used for the primary key in the related table // otherwise the get request is incomplete diff --git a/packages/amplify-graphql-auth-transformer/src/utils/validations.ts b/packages/amplify-graphql-auth-transformer/src/utils/validations.ts index 1fbc16c271..3f96032fb7 100644 --- a/packages/amplify-graphql-auth-transformer/src/utils/validations.ts +++ b/packages/amplify-graphql-auth-transformer/src/utils/validations.ts @@ -1,6 +1,5 @@ import { DirectiveWrapper, InvalidDirectiveError } from '@aws-amplify/graphql-transformer-core'; import { AuthRule, ConfiguredAuthProviders } from './definitions'; -import {FeatureFlagProvider} from "@aws-amplify/graphql-transformer-interfaces"; export const validateRuleAuthStrategy = (rule: AuthRule, configuredAuthProviders: ConfiguredAuthProviders) => { // @@ -104,9 +103,8 @@ export const validateFieldRules = ( isParentTypeBuiltinType: boolean, parentHasModelDirective: boolean, fieldName: string, - featureFlags: FeatureFlagProvider, ) => { - const rules = authDir.getArguments<{ rules: Array }>({ rules: [] }, featureFlags).rules; + const rules = authDir.getArguments<{ rules: Array }>({ rules: [] }).rules; if (rules.length === 0) { throw new InvalidDirectiveError(`@auth on ${fieldName} does not have any auth rules.`); diff --git a/packages/amplify-graphql-default-value-transformer/src/graphql-default-value-transformer.ts b/packages/amplify-graphql-default-value-transformer/src/graphql-default-value-transformer.ts index 1919f8f84f..a87677bd70 100644 --- a/packages/amplify-graphql-default-value-transformer/src/graphql-default-value-transformer.ts +++ b/packages/amplify-graphql-default-value-transformer/src/graphql-default-value-transformer.ts @@ -107,7 +107,7 @@ export class DefaultValueTransformer extends TransformerPluginBase { object: parent as ObjectTypeDefinitionNode, field: definition, directive, - } as DefaultValueDirectiveConfiguration, ctx.featureFlags); + } as DefaultValueDirectiveConfiguration); validate(ctx, config); if (!this.directiveMap.has(parent.name.value)) { diff --git a/packages/amplify-graphql-function-transformer/src/graphql-function-transformer.ts b/packages/amplify-graphql-function-transformer/src/graphql-function-transformer.ts index 7983df6bc6..2003318b9b 100644 --- a/packages/amplify-graphql-function-transformer/src/graphql-function-transformer.ts +++ b/packages/amplify-graphql-function-transformer/src/graphql-function-transformer.ts @@ -42,7 +42,7 @@ export class FunctionTransformer extends TransformerPluginBase { const args = directiveWrapped.getArguments({ resolverTypeName: parent.name.value, resolverFieldName: definition.name.value, - } as FunctionDirectiveConfiguration, acc.featureFlags); + } as FunctionDirectiveConfiguration); let resolver = this.resolverGroups.get(definition); if (resolver === undefined) { diff --git a/packages/amplify-graphql-http-transformer/src/graphql-http-transformer.ts b/packages/amplify-graphql-http-transformer/src/graphql-http-transformer.ts index 801a8eafba..acc3a3dee5 100644 --- a/packages/amplify-graphql-http-transformer/src/graphql-http-transformer.ts +++ b/packages/amplify-graphql-http-transformer/src/graphql-http-transformer.ts @@ -107,7 +107,7 @@ export class HttpTransformer extends TransformerPluginBase { resolverTypeName: parent.name.value, resolverFieldName: definition.name.value, supportsBody: false, - } as HttpDirectiveConfiguration, context.featureFlags); + } as HttpDirectiveConfiguration); if (!VALID_PROTOCOLS_REGEX.test(args.url)) { throw new TransformerContractError( diff --git a/packages/amplify-graphql-index-transformer/src/graphql-index-transformer.ts b/packages/amplify-graphql-index-transformer/src/graphql-index-transformer.ts index 4ca3eb980a..131ae19e42 100644 --- a/packages/amplify-graphql-index-transformer/src/graphql-index-transformer.ts +++ b/packages/amplify-graphql-index-transformer/src/graphql-index-transformer.ts @@ -47,7 +47,7 @@ export class IndexTransformer extends TransformerPluginBase { object: parent as ObjectTypeDefinitionNode, field: definition, directive, - } as IndexDirectiveConfiguration, context.featureFlags); + } as IndexDirectiveConfiguration); /** * Impute Optional Fields diff --git a/packages/amplify-graphql-index-transformer/src/graphql-primary-key-transformer.ts b/packages/amplify-graphql-index-transformer/src/graphql-primary-key-transformer.ts index f5c04e2cf5..47c2481e24 100644 --- a/packages/amplify-graphql-index-transformer/src/graphql-primary-key-transformer.ts +++ b/packages/amplify-graphql-index-transformer/src/graphql-primary-key-transformer.ts @@ -59,7 +59,7 @@ export class PrimaryKeyTransformer extends TransformerPluginBase { object: parent as ObjectTypeDefinitionNode, field: definition, directive, - } as PrimaryKeyDirectiveConfiguration, context.featureFlags); + } as PrimaryKeyDirectiveConfiguration); if (!args.sortKeyFields) { args.sortKeyFields = []; diff --git a/packages/amplify-graphql-model-transformer/src/__tests__/model-transformer.test.ts b/packages/amplify-graphql-model-transformer/src/__tests__/model-transformer.test.ts index 8cd6a056b2..f710a906ec 100644 --- a/packages/amplify-graphql-model-transformer/src/__tests__/model-transformer.test.ts +++ b/packages/amplify-graphql-model-transformer/src/__tests__/model-transformer.test.ts @@ -613,11 +613,16 @@ describe('ModelTransformer: ', () => { expect(verifyInputCount(parsed, 'ModelPostFilterInput', 1)).toBeTruthy(); }); - it('Should support public level subscriptions without defining custom names', () => { - const validSchema = ` - type Post @model(subscriptions: { level: public }) { - id: ID! - title: String! + it('should support advanced subscriptions', () => { + const validSchema = `type Post @model(subscriptions: { + onCreate: ["onFeedUpdated", "onCreatePost"], + onUpdate: ["onFeedUpdated"], + onDelete: ["onFeedUpdated"] + }) { + id: ID! + title: String! + createdAt: String + updatedAt: String } `; const transformer = new GraphQLTransform({ @@ -633,7 +638,16 @@ describe('ModelTransformer: ', () => { const subscriptionType = getObjectType(parsed, 'Subscription'); expect(subscriptionType).toBeDefined(); - expectFields(subscriptionType!, ['onUpdatePost', 'onCreatePost', 'onDeletePost']); + expectFields(subscriptionType!, ['onFeedUpdated', 'onCreatePost']); + const subField = subscriptionType!.fields!.find(f => f.name.value === 'onFeedUpdated'); + expect(subField!.directives!.length).toEqual(1); + expect(subField!.directives![0].name!.value).toEqual('aws_subscribe'); + const mutationsList = subField!.directives![0].arguments!.find(a => a.name.value === 'mutations')!.value as ListValueNode; + const mutList = mutationsList.values.map((v: any) => v.value); + expect(mutList.length).toEqual(3); + expect(mutList).toContain('createPost'); + expect(mutList).toContain('updatePost'); + expect(mutList).toContain('deletePost'); }); it('should not generate superfluous input and filter types', () => { @@ -1269,7 +1283,7 @@ describe('ModelTransformer: ', () => { expect(Object.keys(result.stacks.Blog.Resources!).includes('CreateBlogResolver')).toBe(false); expect(Object.keys(result.stacks.Blog.Resources!).includes('UpdateBlogResolver')).toBe(false); }); - + it('allow aws_lambda to pass through', () => { const validSchema = ` type Todo @aws_lambda { diff --git a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts index 6dbbd8a7a8..8d86a02528 100644 --- a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts +++ b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts @@ -1,15 +1,15 @@ import { DirectiveWrapper, - FieldWrapper, - getFieldNameFor, - InputObjectDefinitionWrapper, InvalidDirectiveError, MappingTemplate, - ObjectDefinitionWrapper, SyncConfig, SyncUtils, TransformerModelBase, TransformerNestedStack, + FieldWrapper, + InputObjectDefinitionWrapper, + ObjectDefinitionWrapper, + getFieldNameFor, } from '@aws-amplify/graphql-transformer-core'; import { AppSyncDataSourceType, @@ -18,7 +18,6 @@ import { MutationFieldType, QueryFieldType, SubscriptionFieldType, - TransformerBeforeStepContextProvider, TransformerContextProvider, TransformerModelProvider, TransformerPrepareStepContextProvider, @@ -26,17 +25,12 @@ import { TransformerSchemaVisitStepContextProvider, TransformerTransformSchemaStepContextProvider, TransformerValidationStepContextProvider, + TransformerBeforeStepContextProvider, } from '@aws-amplify/graphql-transformer-interfaces'; import { - AttributeType, - CfnTable, - ITable, - StreamViewType, - Table, - TableEncryption, + AttributeType, CfnTable, ITable, StreamViewType, Table, TableEncryption, } from '@aws-cdk/aws-dynamodb'; import * as iam from '@aws-cdk/aws-iam'; -import { CfnRole } from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; import { CfnDataSource } from '@aws-cdk/aws-appsync'; import { @@ -63,6 +57,7 @@ import { toCamelCase, toPascalCase, } from 'graphql-transformer-common'; +import { CfnRole } from '@aws-cdk/aws-iam'; import { addDirectivesToOperation, addModelConditionInputs, @@ -97,7 +92,7 @@ import { generateSyncRequestTemplate, } from './resolvers/query'; import { API_KEY_DIRECTIVE } from './definitions'; -import { ModelDirectiveConfiguration, SubscriptionLevel } from './directive'; +import { SubscriptionLevel, ModelDirectiveConfiguration } from './directive'; /** * Nullable @@ -230,31 +225,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme createdAt: 'createdAt', updatedAt: 'updatedAt', }, - }, ctx.featureFlags); - - // This property override is specifically to address parity between V1 and V2 when the FF is disabled - // If one subscription is defined, just let the others go to null without FF. But if public and none defined, default all subs - if (!ctx.featureFlags.getBoolean('shouldDeepMergeDirectiveConfigDefaults', false)) { - const publicSubscriptionDefaults = { - onCreate: [getFieldNameFor('onCreate', typeName)], - onDelete: [getFieldNameFor('onDelete', typeName)], - onUpdate: [getFieldNameFor('onUpdate', typeName)], - }; - - const baseArgs = directiveWrapped.getArguments( - { - subscriptions: { - level: SubscriptionLevel.on, - ...publicSubscriptionDefaults, - }, - }, - ctx.featureFlags, - ); - if (baseArgs?.subscriptions?.level === SubscriptionLevel.public - && !(baseArgs?.subscriptions?.onCreate || baseArgs?.subscriptions?.onDelete || baseArgs?.subscriptions?.onUpdate)) { - options.subscriptions = { level: SubscriptionLevel.public, ...publicSubscriptionDefaults }; - } - } + }); if (options.subscriptions?.onCreate && !Array.isArray(options.subscriptions.onCreate)) { options.subscriptions.onCreate = [options.subscriptions.onCreate]; @@ -395,7 +366,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme const subscriptionLevel = this.modelDirectiveConfig.get(def.name.value)?.subscriptions?.level; // in order to create subscription resolvers the level needs to be on - if (subscriptionLevel !== SubscriptionLevel.off) { + if (subscriptionLevel === SubscriptionLevel.on) { const subscriptionFields = this.getSubscriptionFieldNames(def!); subscriptionFields.forEach(subscription => { let resolver; @@ -427,15 +398,13 @@ export class ModelTransformer extends TransformerModelBase implements Transforme default: throw new Error('Unknown subscription field type'); } - if (subscriptionLevel === SubscriptionLevel.on) { - resolver.addToSlot( - 'postAuth', - MappingTemplate.s3MappingTemplateFromString( - generateAuthExpressionForSandboxMode(context.sandboxModeEnabled), - `${subscription.typeName}.${subscription.fieldName}.{slotName}.{slotIndex}.req.vtl`, - ), - ); - } + resolver.addToSlot( + 'postAuth', + MappingTemplate.s3MappingTemplateFromString( + generateAuthExpressionForSandboxMode(context.sandboxModeEnabled), + `${subscription.typeName}.${subscription.fieldName}.{slotName}.{slotIndex}.req.vtl`, + ), + ); resolver.mapToStack(context.stackManager.getStackFor(subscription.resolverLogicalId, def!.name.value)); context.resolvers.addResolver(subscription.typeName, subscription.fieldName, resolver); }); diff --git a/packages/amplify-graphql-predictions-transformer/src/graphql-predictions-transformer.ts b/packages/amplify-graphql-predictions-transformer/src/graphql-predictions-transformer.ts index 5a3c277eaf..31c1b4aa14 100644 --- a/packages/amplify-graphql-predictions-transformer/src/graphql-predictions-transformer.ts +++ b/packages/amplify-graphql-predictions-transformer/src/graphql-predictions-transformer.ts @@ -96,7 +96,7 @@ export class PredictionsTransformer extends TransformerPluginBase { const args = directiveWrapped.getArguments({ resolverTypeName: parent.name.value, resolverFieldName: definition.name.value, - } as PredictionsDirectiveConfiguration, context.featureFlags); + } as PredictionsDirectiveConfiguration); if (!Array.isArray(args.actions)) { args.actions = [args.actions as unknown as string]; diff --git a/packages/amplify-graphql-relational-transformer/src/graphql-belongs-to-transformer.ts b/packages/amplify-graphql-relational-transformer/src/graphql-belongs-to-transformer.ts index d5285c3dc3..47e55ad6f2 100644 --- a/packages/amplify-graphql-relational-transformer/src/graphql-belongs-to-transformer.ts +++ b/packages/amplify-graphql-relational-transformer/src/graphql-belongs-to-transformer.ts @@ -65,7 +65,7 @@ export class BelongsToTransformer extends TransformerPluginBase { object: parent as ObjectTypeDefinitionNode, field: definition, directive, - } as BelongsToDirectiveConfiguration, context.featureFlags); + } as BelongsToDirectiveConfiguration); validate(args, context as TransformerContextProvider); this.directiveList.push(args); diff --git a/packages/amplify-graphql-relational-transformer/src/graphql-has-many-transformer.ts b/packages/amplify-graphql-relational-transformer/src/graphql-has-many-transformer.ts index 963eadb91e..35a05a50d9 100644 --- a/packages/amplify-graphql-relational-transformer/src/graphql-has-many-transformer.ts +++ b/packages/amplify-graphql-relational-transformer/src/graphql-has-many-transformer.ts @@ -68,7 +68,7 @@ export class HasManyTransformer extends TransformerPluginBase { field: definition, directive, limit: defaultLimit, - } as HasManyDirectiveConfiguration, context.featureFlags); + } as HasManyDirectiveConfiguration); validate(args, context as TransformerContextProvider); this.directiveList.push(args); diff --git a/packages/amplify-graphql-relational-transformer/src/graphql-has-one-transformer.ts b/packages/amplify-graphql-relational-transformer/src/graphql-has-one-transformer.ts index a5e87e02b3..fa0c408998 100644 --- a/packages/amplify-graphql-relational-transformer/src/graphql-has-one-transformer.ts +++ b/packages/amplify-graphql-relational-transformer/src/graphql-has-one-transformer.ts @@ -74,7 +74,7 @@ export class HasOneTransformer extends TransformerPluginBase { object: parent as ObjectTypeDefinitionNode, field: definition, directive, - } as HasOneDirectiveConfiguration, context.featureFlags); + } as HasOneDirectiveConfiguration); validate(args, context as TransformerContextProvider); this.directiveList.push(args); diff --git a/packages/amplify-graphql-relational-transformer/src/graphql-many-to-many-transformer.ts b/packages/amplify-graphql-relational-transformer/src/graphql-many-to-many-transformer.ts index ee2a1935d0..ca39ef4dd0 100644 --- a/packages/amplify-graphql-relational-transformer/src/graphql-many-to-many-transformer.ts +++ b/packages/amplify-graphql-relational-transformer/src/graphql-many-to-many-transformer.ts @@ -95,7 +95,7 @@ export class ManyToManyTransformer extends TransformerPluginBase { field: definition, directive, limit: defaultLimit, - } as ManyToManyDirectiveConfiguration, context.featureFlags); + } as ManyToManyDirectiveConfiguration); validateModelDirective(args); args.connectionFields = []; diff --git a/packages/amplify-graphql-searchable-transformer/src/graphql-searchable-transformer.ts b/packages/amplify-graphql-searchable-transformer/src/graphql-searchable-transformer.ts index 8a3d0e846c..d7d4dbce1c 100644 --- a/packages/amplify-graphql-searchable-transformer/src/graphql-searchable-transformer.ts +++ b/packages/amplify-graphql-searchable-transformer/src/graphql-searchable-transformer.ts @@ -383,7 +383,7 @@ export class SearchableModelTransformer extends TransformerPluginBase { } const directiveWrapped = new DirectiveWrapper(directive); - const directiveArguments = directiveWrapped.getArguments({}, ctx.featureFlags) as any; + const directiveArguments = directiveWrapped.getArguments({}) as any; let shouldMakeSearch = true; let searchFieldNameOverride; diff --git a/packages/amplify-graphql-transformer-core/src/__tests__/utils/directive-wrapper-test.ts b/packages/amplify-graphql-transformer-core/src/__tests__/utils/directive-wrapper-test.ts deleted file mode 100644 index 1eeb5e5e8b..0000000000 --- a/packages/amplify-graphql-transformer-core/src/__tests__/utils/directive-wrapper-test.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - DirectiveNode, - ObjectTypeDefinitionNode, - parse, -} from 'graphql'; -import { cloneDeep } from 'lodash'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; -import { getFieldNameFor } from '../../utils/operation-names'; -import { DirectiveWrapper } from '../../utils'; - -const generateFeatureFlagWithBooleanOverrides = (overrides: Record): FeatureFlagProvider => ({ - getBoolean: (name: string, defaultValue?: boolean): boolean => { - const overrideValue = Object.entries(overrides).find(([overrideName]) => overrideName === name)?.[1]; - return overrideValue ?? defaultValue ?? false; - }, - getNumber: jest.fn(), - getObject: jest.fn(), -}); - -describe('Transformer Core Util Tests', () => { - describe(': Directive Wrapper tests', () => { - const schema = ` - type Todo @model(subscriptions: {level: public}) { - id: ID! - name: String! - } - `; - const typeName = 'Todo'; - const defaultArgs = { - queries: { - get: getFieldNameFor('get', typeName), - list: getFieldNameFor('list', typeName), - }, - mutations: { - create: getFieldNameFor('create', typeName), - update: getFieldNameFor('update', typeName), - delete: getFieldNameFor('delete', typeName), - }, - subscriptions: { - level: 'on', - onCreate: [getFieldNameFor('onCreate', typeName)], - onDelete: [getFieldNameFor('onDelete', typeName)], - onUpdate: [getFieldNameFor('onUpdate', typeName)], - }, - timestamps: { - createdAt: 'createdAt', - updatedAt: 'updatedAt', - }, - }; - it(': Should shallow merge with deep merge flag disabled', () => { - const parsedDoc = parse(schema); - const objNode = parsedDoc?.definitions?.[0] as ObjectTypeDefinitionNode; - const modelDir = objNode?.directives?.[0] as DirectiveNode; - const wrappedDir = new DirectiveWrapper(modelDir); - - const newArgs = wrappedDir.getArguments(cloneDeep(defaultArgs), generateFeatureFlagWithBooleanOverrides({})); - expect(newArgs.subscriptions).toEqual({ level: 'public' }); - expect(newArgs.timestamps).toEqual(defaultArgs.timestamps); - expect(newArgs.queries).toEqual(defaultArgs.queries); - expect(newArgs.mutations).toEqual(defaultArgs.mutations); - }); - - it(': Should deep merge with deep merge flag enabled', () => { - const parsedDoc = parse(schema); - const objNode = parsedDoc?.definitions?.[0] as ObjectTypeDefinitionNode; - const modelDir = objNode?.directives?.[0] as DirectiveNode; - const wrappedDir = new DirectiveWrapper(modelDir); - - const newArgs = wrappedDir.getArguments( - cloneDeep(defaultArgs), - generateFeatureFlagWithBooleanOverrides({ shouldDeepMergeDirectiveConfigDefaults: true }), - ); - expect(newArgs.subscriptions).toEqual({ - level: 'public', - onCreate: [getFieldNameFor('onCreate', typeName)], - onDelete: [getFieldNameFor('onDelete', typeName)], - onUpdate: [getFieldNameFor('onUpdate', typeName)], - }); - expect(newArgs.timestamps).toEqual(defaultArgs.timestamps); - expect(newArgs.queries).toEqual(defaultArgs.queries); - expect(newArgs.mutations).toEqual(defaultArgs.mutations); - }); - }); -}); diff --git a/packages/amplify-graphql-transformer-core/src/utils/directive-wrapper.ts b/packages/amplify-graphql-transformer-core/src/utils/directive-wrapper.ts index fbd1a2f87c..be2254855d 100644 --- a/packages/amplify-graphql-transformer-core/src/utils/directive-wrapper.ts +++ b/packages/amplify-graphql-transformer-core/src/utils/directive-wrapper.ts @@ -1,6 +1,4 @@ import { ArgumentNode, DirectiveNode, NameNode, valueFromASTUntyped, ValueNode, Location } from 'graphql'; -import _ from 'lodash'; -import { FeatureFlagProvider } from '@aws-amplify/graphql-transformer-interfaces'; export class ArgumentWrapper { public readonly name: NameNode; @@ -34,7 +32,7 @@ export class DirectiveWrapper { arguments: this.arguments.map(arg => arg.serialize()), }; }; - public getArguments = (defaultValue: Required, featureFlags: FeatureFlagProvider): Required => { + public getArguments = (defaultValue: Required): Required => { const argValues = this.arguments.reduce( (acc: Record, arg: ArgumentWrapper) => ({ ...acc, @@ -42,9 +40,6 @@ export class DirectiveWrapper { }), {}, ); - if (featureFlags.getBoolean('shouldDeepMergeDirectiveConfigDefaults', false)) { - return _.merge(defaultValue, argValues); - } return Object.assign(defaultValue, argValues); }; }