From f7ec6014d4eecfede186129a6ea19041780bafb3 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Wed, 28 Feb 2024 08:56:47 -0700 Subject: [PATCH] feat: add implicit fields to filter input (#2236) --- .../__snapshots__/owner-auth.test.ts.snap | 889 ++++ .../src/__tests__/owner-auth.test.ts | 108 +- .../src/graphql-auth-transformer.ts | 42 +- ...hql-default-value-transformer.test.ts.snap | 12 + .../amplify-graphql-model-transformer/API.md | 2 +- .../model-transformer.test.ts.snap | 47 + .../src/graphql-model-transformer.ts | 31 +- .../src/graphql-types/common.ts | 1 + .../src/graphql-types/mutation.ts | 21 +- ...-graphql-has-many-transformer.test.ts.snap | 3566 ++++++++++------- ...phql-many-to-many-transformer.test.ts.snap | 72 + ...-relations-with-custom-primary-key.test.ts | 61 + .../src/schema.ts | 37 +- ...raphql-searchable-transformer.test.ts.snap | 12 + .../amplify-graphql-transformer-core/API.md | 12 + .../transformer-context/output.test.ts | 52 +- .../src/index.ts | 4 + .../src/transformer-context/output.ts | 16 + .../src/utils/index.ts | 8 +- .../src/utils/model-util.ts | 17 + .../API.md | 4 + .../transformer-context-output-provider.ts | 4 + 22 files changed, 3467 insertions(+), 1551 deletions(-) diff --git a/packages/amplify-graphql-auth-transformer/src/__tests__/__snapshots__/owner-auth.test.ts.snap b/packages/amplify-graphql-auth-transformer/src/__tests__/__snapshots__/owner-auth.test.ts.snap index a9588e8431..68afd9dfa5 100644 --- a/packages/amplify-graphql-auth-transformer/src/__tests__/__snapshots__/owner-auth.test.ts.snap +++ b/packages/amplify-graphql-auth-transformer/src/__tests__/__snapshots__/owner-auth.test.ts.snap @@ -600,6 +600,895 @@ exports[`owner based @auth owner where field is "::" delimited with only mutatio ## [End] Parse owner field auth for Get. **" `; +exports[`owner based @auth should not add duplicate implicit field when already included 1`] = ` +"type Todo { + owner: String + content: String + id: ID! + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +input ModelStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelBooleanInput { + ne: Boolean + eq: Boolean + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelSubscriptionStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + in: [String] + notIn: [String] +} + +input ModelSubscriptionIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + in: [Int] + notIn: [Int] +} + +input ModelSubscriptionFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + in: [Float] + notIn: [Float] +} + +input ModelSubscriptionBooleanInput { + ne: Boolean + eq: Boolean +} + +input ModelSubscriptionIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + in: [ID] + notIn: [ID] +} + +enum ModelAttributeTypes { + binary + binarySet + bool + list + map + number + numberSet + string + stringSet + _null +} + +input ModelSizeInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] +} + +enum ModelSortDirection { + ASC + DESC +} + +type ModelTodoConnection { + items: [Todo]! + nextToken: String +} + +input ModelTodoFilterInput { + owner: ModelStringInput + content: ModelStringInput + id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelTodoFilterInput] + or: [ModelTodoFilterInput] + not: ModelTodoFilterInput +} + +type Query { + getTodo(id: ID!): Todo + listTodos(filter: ModelTodoFilterInput, limit: Int, nextToken: String): ModelTodoConnection +} + +input ModelTodoConditionInput { + owner: ModelStringInput + content: ModelStringInput + and: [ModelTodoConditionInput] + or: [ModelTodoConditionInput] + not: ModelTodoConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateTodoInput { + owner: String + content: String + id: ID +} + +input UpdateTodoInput { + owner: String + content: String + id: ID! +} + +input DeleteTodoInput { + id: ID! +} + +type Mutation { + createTodo(input: CreateTodoInput!, condition: ModelTodoConditionInput): Todo + updateTodo(input: UpdateTodoInput!, condition: ModelTodoConditionInput): Todo + deleteTodo(input: DeleteTodoInput!, condition: ModelTodoConditionInput): Todo +} + +input ModelSubscriptionTodoFilterInput { + content: ModelSubscriptionStringInput + id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionTodoFilterInput] + or: [ModelSubscriptionTodoFilterInput] + owner: ModelStringInput +} + +type Subscription { + onCreateTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"createTodo\\"]) + onUpdateTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"updateTodo\\"]) + onDeleteTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"deleteTodo\\"]) +} +" +`; + +exports[`owner based @auth should not add subscription filter with implicit owner field when subscription is disabled 1`] = ` +"type Todo { + owner: String + content: String + id: ID! + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +input ModelStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelBooleanInput { + ne: Boolean + eq: Boolean + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelSubscriptionStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + in: [String] + notIn: [String] +} + +input ModelSubscriptionIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + in: [Int] + notIn: [Int] +} + +input ModelSubscriptionFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + in: [Float] + notIn: [Float] +} + +input ModelSubscriptionBooleanInput { + ne: Boolean + eq: Boolean +} + +input ModelSubscriptionIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + in: [ID] + notIn: [ID] +} + +enum ModelAttributeTypes { + binary + binarySet + bool + list + map + number + numberSet + string + stringSet + _null +} + +input ModelSizeInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] +} + +enum ModelSortDirection { + ASC + DESC +} + +type ModelTodoConnection { + items: [Todo]! + nextToken: String +} + +input ModelTodoFilterInput { + owner: ModelStringInput + content: ModelStringInput + id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelTodoFilterInput] + or: [ModelTodoFilterInput] + not: ModelTodoFilterInput +} + +type Query { + getTodo(id: ID!): Todo + listTodos(filter: ModelTodoFilterInput, limit: Int, nextToken: String): ModelTodoConnection +} + +input ModelTodoConditionInput { + owner: ModelStringInput + content: ModelStringInput + and: [ModelTodoConditionInput] + or: [ModelTodoConditionInput] + not: ModelTodoConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateTodoInput { + owner: String + content: String + id: ID +} + +input UpdateTodoInput { + owner: String + content: String + id: ID! +} + +input DeleteTodoInput { + id: ID! +} + +type Mutation { + createTodo(input: CreateTodoInput!, condition: ModelTodoConditionInput): Todo + updateTodo(input: UpdateTodoInput!, condition: ModelTodoConditionInput): Todo + deleteTodo(input: DeleteTodoInput!, condition: ModelTodoConditionInput): Todo +} +" +`; + +exports[`owner based @auth should successfully transform simple valid schema with implicit fields 1`] = ` +"type Todo { + content: String + id: ID! + createdAt: AWSDateTime! + updatedAt: AWSDateTime! + owner: String +} + +input ModelStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelBooleanInput { + ne: Boolean + eq: Boolean + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelSubscriptionStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + in: [String] + notIn: [String] +} + +input ModelSubscriptionIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + in: [Int] + notIn: [Int] +} + +input ModelSubscriptionFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + in: [Float] + notIn: [Float] +} + +input ModelSubscriptionBooleanInput { + ne: Boolean + eq: Boolean +} + +input ModelSubscriptionIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + in: [ID] + notIn: [ID] +} + +enum ModelAttributeTypes { + binary + binarySet + bool + list + map + number + numberSet + string + stringSet + _null +} + +input ModelSizeInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] +} + +enum ModelSortDirection { + ASC + DESC +} + +type ModelTodoConnection { + items: [Todo]! + nextToken: String +} + +input ModelTodoFilterInput { + content: ModelStringInput + id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelTodoFilterInput] + or: [ModelTodoFilterInput] + not: ModelTodoFilterInput + owner: ModelStringInput +} + +type Query { + getTodo(id: ID!): Todo + listTodos(filter: ModelTodoFilterInput, limit: Int, nextToken: String): ModelTodoConnection +} + +input ModelTodoConditionInput { + content: ModelStringInput + and: [ModelTodoConditionInput] + or: [ModelTodoConditionInput] + not: ModelTodoConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + owner: ModelStringInput +} + +input CreateTodoInput { + content: String + id: ID +} + +input UpdateTodoInput { + content: String + id: ID! +} + +input DeleteTodoInput { + id: ID! +} + +type Mutation { + createTodo(input: CreateTodoInput!, condition: ModelTodoConditionInput): Todo + updateTodo(input: UpdateTodoInput!, condition: ModelTodoConditionInput): Todo + deleteTodo(input: DeleteTodoInput!, condition: ModelTodoConditionInput): Todo +} + +input ModelSubscriptionTodoFilterInput { + content: ModelSubscriptionStringInput + id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionTodoFilterInput] + or: [ModelSubscriptionTodoFilterInput] + owner: ModelStringInput +} + +type Subscription { + onCreateTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"createTodo\\"]) + onUpdateTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"updateTodo\\"]) + onDeleteTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"deleteTodo\\"]) +} +" +`; + +exports[`owner based @auth should successfully transform simple valid schema with implicit fields 2`] = ` +"type Todo { + id: ID! + content: String + owner: String +} + +input ModelStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelBooleanInput { + ne: Boolean + eq: Boolean + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelSubscriptionStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + in: [String] + notIn: [String] +} + +input ModelSubscriptionIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + in: [Int] + notIn: [Int] +} + +input ModelSubscriptionFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + in: [Float] + notIn: [Float] +} + +input ModelSubscriptionBooleanInput { + ne: Boolean + eq: Boolean +} + +input ModelSubscriptionIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + in: [ID] + notIn: [ID] +} + +enum ModelAttributeTypes { + binary + binarySet + bool + list + map + number + numberSet + string + stringSet + _null +} + +input ModelSizeInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] +} + +enum ModelSortDirection { + ASC + DESC +} + +type ModelTodoConnection { + items: [Todo]! + nextToken: String +} + +input ModelTodoFilterInput { + id: ModelIDInput + content: ModelStringInput + and: [ModelTodoFilterInput] + or: [ModelTodoFilterInput] + not: ModelTodoFilterInput +} + +type Query { + getTodo(id: ID!): Todo + listTodos(id: ID, filter: ModelTodoFilterInput, limit: Int, nextToken: String, sortDirection: ModelSortDirection): ModelTodoConnection +} + +input ModelTodoConditionInput { + content: ModelStringInput + and: [ModelTodoConditionInput] + or: [ModelTodoConditionInput] + not: ModelTodoConditionInput +} + +input CreateTodoInput { + id: ID + content: String +} + +input UpdateTodoInput { + id: ID! + content: String +} + +input DeleteTodoInput { + id: ID! +} + +type Mutation { + createTodo(input: CreateTodoInput!, condition: ModelTodoConditionInput): Todo + updateTodo(input: UpdateTodoInput!, condition: ModelTodoConditionInput): Todo + deleteTodo(input: DeleteTodoInput!, condition: ModelTodoConditionInput): Todo +} + +input ModelSubscriptionTodoFilterInput { + id: ModelSubscriptionIDInput + content: ModelSubscriptionStringInput + and: [ModelSubscriptionTodoFilterInput] + or: [ModelSubscriptionTodoFilterInput] +} + +type Subscription { + onCreateTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"createTodo\\"]) + onUpdateTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"updateTodo\\"]) + onDeleteTodo(filter: ModelSubscriptionTodoFilterInput, owner: String): Todo @aws_subscribe(mutations: [\\"deleteTodo\\"]) +} +" +`; + exports[`owner based @auth sort key fields on @auth owner field owner field as part of global secondary index handles ownerfield as GSI field with default identity claim 1`] = ` "## [Start] Authorization Steps. ** $util.qr($ctx.stash.put(\\"hasAuth\\", true)) diff --git a/packages/amplify-graphql-auth-transformer/src/__tests__/owner-auth.test.ts b/packages/amplify-graphql-auth-transformer/src/__tests__/owner-auth.test.ts index cb6e4595d5..76dc22a079 100644 --- a/packages/amplify-graphql-auth-transformer/src/__tests__/owner-auth.test.ts +++ b/packages/amplify-graphql-auth-transformer/src/__tests__/owner-auth.test.ts @@ -1,11 +1,11 @@ import { parse } from 'graphql'; import { ModelTransformer } from '@aws-amplify/graphql-model-transformer'; import { PrimaryKeyTransformer, IndexTransformer } from '@aws-amplify/graphql-index-transformer'; -import { validateModelSchema } from '@aws-amplify/graphql-transformer-core'; +import { validateModelSchema, constructDataSourceStrategies, MYSQL_DB_TYPE } from '@aws-amplify/graphql-transformer-core'; import { ResourceConstants } from 'graphql-transformer-common'; import { AppSyncAuthConfiguration } from '@aws-amplify/graphql-transformer-interfaces'; import { HasManyTransformer } from '@aws-amplify/graphql-relational-transformer'; -import { testTransform } from '@aws-amplify/graphql-transformer-test-utils'; +import { testTransform, mockSqlDataSourceStrategy } from '@aws-amplify/graphql-transformer-test-utils'; import { AuthTransformer } from '../graphql-auth-transformer'; import { getField, getObjectType } from './test-helpers'; @@ -456,6 +456,110 @@ describe('owner based @auth', () => { expect(out.resolvers['Query.listPosts.auth.1.req.vtl']).toMatchSnapshot(); }); + it('should successfully transform simple valid schema with implicit fields', async () => { + const authConfig: AppSyncAuthConfiguration = { + defaultAuthentication: { + authenticationType: 'AMAZON_COGNITO_USER_POOLS', + }, + additionalAuthenticationProviders: [], + }; + const validSchema = ` + type Todo @model @auth(rules: [{ allow: owner }]) { + content: String + } + `; + + const out = testTransform({ + schema: validSchema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }); + expect(out).toBeDefined(); + + validateModelSchema(parse(out.schema)); + parse(out.schema); + expect(out.schema).toMatchSnapshot(); + }); + + it('should not add duplicate implicit field when already included', async () => { + const authConfig: AppSyncAuthConfiguration = { + defaultAuthentication: { + authenticationType: 'AMAZON_COGNITO_USER_POOLS', + }, + additionalAuthenticationProviders: [], + }; + const validSchema = ` + type Todo @model @auth(rules: [{ allow: owner }]) { + owner: String + content: String + } + `; + + const out = testTransform({ + schema: validSchema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }); + expect(out).toBeDefined(); + + validateModelSchema(parse(out.schema)); + parse(out.schema); + expect(out.schema).toMatchSnapshot(); + }); + + it('should successfully transform simple valid schema with implicit fields', async () => { + const authConfig: AppSyncAuthConfiguration = { + defaultAuthentication: { + authenticationType: 'AMAZON_COGNITO_USER_POOLS', + }, + additionalAuthenticationProviders: [], + }; + const validSchema = ` + type Todo @model @auth(rules: [{ allow: owner }]) { + id: ID! @primaryKey + content: String + } + `; + + const out = testTransform({ + schema: validSchema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer(), new PrimaryKeyTransformer()], + dataSourceStrategies: constructDataSourceStrategies(validSchema, mockSqlDataSourceStrategy()), + }); + expect(out).toBeDefined(); + + validateModelSchema(parse(out.schema)); + parse(out.schema); + expect(out.schema).toMatchSnapshot(); + }); + + it('should not add subscription filter with implicit owner field when subscription is disabled', async () => { + const authConfig: AppSyncAuthConfiguration = { + defaultAuthentication: { + authenticationType: 'AMAZON_COGNITO_USER_POOLS', + }, + additionalAuthenticationProviders: [], + }; + const validSchema = ` + type Todo @model(subscriptions: null) @auth(rules: [{ allow: owner }]) { + owner: String + content: String + } + `; + + const out = testTransform({ + schema: validSchema, + authConfig, + transformers: [new ModelTransformer(), new AuthTransformer()], + }); + expect(out).toBeDefined(); + + validateModelSchema(parse(out.schema)); + parse(out.schema); + expect(out.schema).toMatchSnapshot(); + }); + describe('with identity claim feature flag disabled', () => { test('auth transformer validation happy case', () => { const authConfig: AppSyncAuthConfiguration = { 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 e81155e570..9da63ec785 100644 --- a/packages/amplify-graphql-auth-transformer/src/graphql-auth-transformer.ts +++ b/packages/amplify-graphql-auth-transformer/src/graphql-auth-transformer.ts @@ -10,6 +10,12 @@ import { isSqlModel, getModelDataSourceNameForTypeName, isModelType, + getFilterInputName, + getConditionInputName, + getSubscriptionFilterInputName, + getConnectionName, + InputFieldWrapper, + isDynamoDbModel, } from '@aws-amplify/graphql-transformer-core'; import { DataSourceProvider, @@ -42,6 +48,7 @@ import { getBaseType, makeDirective, makeField, + makeInputValueDefinition, makeNamedType, ResourceConstants, ModelResourceIDs, @@ -334,8 +341,41 @@ export class AuthTransformer extends TransformerAuthBase implements TransformerA this.authModelConfig.forEach((acm, modelName) => { const def = context.output.getObject(modelName)!; const modelHasSearchable = def.directives.some((dir) => dir.name.value === 'searchable'); + const ownerFields = getOwnerFields(acm); + if (isDynamoDbModel(context, modelName)) { + const filterInput = context.output.getInput(getFilterInputName(modelName)); + if (filterInput) { + const updatedFilterInput = { ...filterInput, fields: [...filterInput.fields] }; + ownerFields.forEach((ownerField) => { + if (!filterInput.fields.some((field) => field.name.value === ownerField)) { + updatedFilterInput.fields.push(makeInputValueDefinition(ownerField, makeNamedType('ModelStringInput'))); + } + }); + context.output.updateInput(updatedFilterInput); + } + const conditionInput = context.output.getInput(getConditionInputName(modelName)); + if (conditionInput) { + const updatedConditionInput = { ...conditionInput, fields: [...conditionInput.fields] }; + ownerFields.forEach((ownerField) => { + if (!conditionInput.fields.some((field) => field.name.value === ownerField)) { + updatedConditionInput.fields.push(makeInputValueDefinition(ownerField, makeNamedType('ModelStringInput'))); + } + }); + context.output.updateInput(updatedConditionInput); + } + const subscriptionFilterInput = context.output.getInput(getSubscriptionFilterInputName(modelName)); + if (subscriptionFilterInput) { + const updatedSubscriptionFilterInput = { ...subscriptionFilterInput, fields: [...subscriptionFilterInput.fields] }; + ownerFields.forEach((ownerField) => { + if (!subscriptionFilterInput.fields.some((field) => field.name.value === ownerField)) { + updatedSubscriptionFilterInput.fields.push(makeInputValueDefinition(ownerField, makeNamedType('ModelStringInput'))); + } + }); + context.output.updateInput(updatedSubscriptionFilterInput); + } + } // collect ownerFields and them in the model - this.addFieldsToObject(context, modelName, getOwnerFields(acm)); + this.addFieldsToObject(context, modelName, ownerFields); // Get the directives we need to add to the GraphQL nodes const providers = this.getAuthProviders(acm.getRoles()); const addDefaultIfNeeded = providers.length === 0 ? this.configuredAuthProviders.shouldAddDefaultServiceDirective : false; 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 13f6150766..320a27b4e9 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 @@ -166,6 +166,8 @@ type ModelTestConnection { input ModelTestFilterInput { id: ModelIDInput stringValue: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelTestFilterInput] or: [ModelTestFilterInput] not: ModelTestFilterInput @@ -181,6 +183,8 @@ input ModelTestConditionInput { and: [ModelTestConditionInput] or: [ModelTestConditionInput] not: ModelTestConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateTestInput { @@ -206,6 +210,8 @@ type Mutation { input ModelSubscriptionTestFilterInput { id: ModelSubscriptionIDInput stringValue: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionTestFilterInput] or: [ModelSubscriptionTestFilterInput] } @@ -429,6 +435,8 @@ input ModelPostFilterInput { enumValue: ModelTagInput awsTimeValue: ModelStringInput awsDateTime: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelPostFilterInput] or: [ModelPostFilterInput] not: ModelPostFilterInput @@ -458,6 +466,8 @@ input ModelPostConditionInput { and: [ModelPostConditionInput] or: [ModelPostConditionInput] not: ModelPostConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreatePostInput { @@ -525,6 +535,8 @@ input ModelSubscriptionPostFilterInput { enumValue: ModelSubscriptionStringInput awsTimeValue: ModelSubscriptionStringInput awsDateTime: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionPostFilterInput] or: [ModelSubscriptionPostFilterInput] } diff --git a/packages/amplify-graphql-model-transformer/API.md b/packages/amplify-graphql-model-transformer/API.md index 1e47418f6a..267904ff2d 100644 --- a/packages/amplify-graphql-model-transformer/API.md +++ b/packages/amplify-graphql-model-transformer/API.md @@ -120,7 +120,7 @@ export function makeModelScalarFilterInputObject(type: string, supportsCondition export const makeModelSortDirectionEnumObject: () => EnumTypeDefinitionNode; // @public (undocumented) -export const makeMutationConditionInput: (ctx: TransformerTransformSchemaStepContextProvider, name: string, object: ObjectTypeDefinitionNode) => InputObjectTypeDefinitionNode; +export const makeMutationConditionInput: (ctx: TransformerTransformSchemaStepContextProvider, name: string, object: ObjectTypeDefinitionNode, modelDirectiveConfig: ModelDirectiveConfiguration) => InputObjectTypeDefinitionNode; // @public (undocumented) export function makeSizeInputType(): InputObjectTypeDefinitionNode; 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 6e64fab85b..e2ff2b6981 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 @@ -166,6 +166,8 @@ type ModelTaskConnection { input ModelTaskFilterInput { id: ModelIntInput title: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelTaskFilterInput] or: [ModelTaskFilterInput] not: ModelTaskFilterInput @@ -182,6 +184,8 @@ input ModelTaskConditionInput { and: [ModelTaskConditionInput] or: [ModelTaskConditionInput] not: ModelTaskConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateTaskInput { @@ -207,6 +211,8 @@ type Mutation { input ModelSubscriptionTaskFilterInput { id: ModelSubscriptionIntInput title: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionTaskFilterInput] or: [ModelSubscriptionTaskFilterInput] } @@ -397,6 +403,8 @@ type ModelTestConnection { input ModelTestFilterInput { id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelTestFilterInput] or: [ModelTestFilterInput] not: ModelTestFilterInput @@ -417,6 +425,8 @@ input ModelTestConditionInput { or: [ModelTestConditionInput] not: ModelTestConditionInput _deleted: ModelBooleanInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateTestInput { @@ -445,6 +455,8 @@ type Mutation { input ModelSubscriptionTestFilterInput { id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionTestFilterInput] or: [ModelSubscriptionTestFilterInput] _deleted: ModelBooleanInput @@ -467,6 +479,8 @@ type ModelEmailConnection { input ModelEmailFilterInput { id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelEmailFilterInput] or: [ModelEmailFilterInput] not: ModelEmailFilterInput @@ -478,6 +492,8 @@ input ModelEmailConditionInput { or: [ModelEmailConditionInput] not: ModelEmailConditionInput _deleted: ModelBooleanInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateEmailInput { @@ -497,6 +513,8 @@ input DeleteEmailInput { input ModelSubscriptionEmailFilterInput { id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionEmailFilterInput] or: [ModelSubscriptionEmailFilterInput] _deleted: ModelBooleanInput @@ -873,6 +891,8 @@ type ModelAuthorConnection { input ModelAuthorFilterInput { id: ModelIDInput name: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelAuthorFilterInput] or: [ModelAuthorFilterInput] not: ModelAuthorFilterInput @@ -885,6 +905,8 @@ input ModelAuthorConditionInput { or: [ModelAuthorConditionInput] not: ModelAuthorConditionInput _deleted: ModelBooleanInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateAuthorInput { @@ -911,6 +933,8 @@ input DeleteAuthorInput { input ModelSubscriptionAuthorFilterInput { id: ModelSubscriptionIDInput name: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionAuthorFilterInput] or: [ModelSubscriptionAuthorFilterInput] _deleted: ModelBooleanInput @@ -926,6 +950,8 @@ input ModelRequireFilterInput { id: ModelIDInput requiredField: ModelStringInput notRequiredField: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelRequireFilterInput] or: [ModelRequireFilterInput] not: ModelRequireFilterInput @@ -939,6 +965,8 @@ input ModelRequireConditionInput { or: [ModelRequireConditionInput] not: ModelRequireConditionInput _deleted: ModelBooleanInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateRequireInput { @@ -964,6 +992,8 @@ input ModelSubscriptionRequireFilterInput { id: ModelSubscriptionIDInput requiredField: ModelSubscriptionStringInput notRequiredField: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionRequireFilterInput] or: [ModelSubscriptionRequireFilterInput] _deleted: ModelBooleanInput @@ -980,6 +1010,7 @@ input ModelCommentFilterInput { title: ModelStringInput content: ModelStringInput updatedOn: ModelIntInput + createdOn: ModelStringInput and: [ModelCommentFilterInput] or: [ModelCommentFilterInput] not: ModelCommentFilterInput @@ -994,6 +1025,7 @@ input ModelCommentConditionInput { or: [ModelCommentConditionInput] not: ModelCommentConditionInput _deleted: ModelBooleanInput + createdOn: ModelStringInput } input CreateCommentInput { @@ -1022,6 +1054,7 @@ input ModelSubscriptionCommentFilterInput { title: ModelSubscriptionStringInput content: ModelSubscriptionStringInput updatedOn: ModelSubscriptionIntInput + createdOn: ModelSubscriptionStringInput and: [ModelSubscriptionCommentFilterInput] or: [ModelSubscriptionCommentFilterInput] _deleted: ModelBooleanInput @@ -4093,6 +4126,8 @@ input ModelPostConditionInput { or: [ModelPostConditionInput] not: ModelPostConditionInput _deleted: ModelBooleanInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreatePostInput { @@ -5732,6 +5767,8 @@ type ModelModelTypeConnection { input ModelModelTypeFilterInput { id: ModelIDInput title: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelTypeFilterInput] or: [ModelModelTypeFilterInput] not: ModelModelTypeFilterInput @@ -5750,6 +5787,8 @@ input ModelModelTypeConditionInput { or: [ModelModelTypeConditionInput] not: ModelModelTypeConditionInput _deleted: ModelBooleanInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelTypeInput { @@ -5780,6 +5819,8 @@ type Mutation { input ModelSubscriptionModelTypeFilterInput { id: ModelSubscriptionIDInput title: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelTypeFilterInput] or: [ModelSubscriptionModelTypeFilterInput] _deleted: ModelBooleanInput @@ -5963,6 +6004,8 @@ type ModelPostConnection { input ModelPostFilterInput { id: ModelIDInput str: ModelStringInput + createdOn: ModelStringInput + updatedOn: ModelStringInput and: [ModelPostFilterInput] or: [ModelPostFilterInput] not: ModelPostFilterInput @@ -5981,6 +6024,8 @@ input ModelPostConditionInput { or: [ModelPostConditionInput] not: ModelPostConditionInput _deleted: ModelBooleanInput + createdOn: ModelStringInput + updatedOn: ModelStringInput } input CreatePostInput { @@ -6009,6 +6054,8 @@ type Mutation { input ModelSubscriptionPostFilterInput { id: ModelSubscriptionIDInput str: ModelSubscriptionStringInput + createdOn: ModelSubscriptionStringInput + updatedOn: ModelSubscriptionStringInput and: [ModelSubscriptionPostFilterInput] or: [ModelSubscriptionPostFilterInput] _deleted: ModelBooleanInput 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 acbb3d854a..ea2e71c67e 100644 --- a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts +++ b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts @@ -14,6 +14,10 @@ import { ObjectDefinitionWrapper, SyncUtils, TransformerModelBase, + getFilterInputName, + getConditionInputName, + getSubscriptionFilterInputName, + getConnectionName, } from '@aws-amplify/graphql-transformer-core'; import { AppSyncDataSourceType, @@ -51,7 +55,6 @@ import { makeNamedType, makeNonNullType, makeValueNode, - toPascalCase, toUpper, } from 'graphql-transformer-common'; import { @@ -287,6 +290,13 @@ export class ModelTransformer extends TransformerModelBase implements Transforme this.ensureModelSortDirectionEnum(ctx); this.typesWithModelDirective.forEach((type) => { + const defBeforeImplicitFields = ctx.output.getObject(type)!; + const typeName = defBeforeImplicitFields.name.value; + if (isDynamoDbModel(ctx, typeName)) { + // Update the field with auto generatable Fields + this.addAutoGeneratableFields(ctx, type); + } + // get def after implict timestamp fields have been added const def = ctx.output.getObject(type)!; const hasAuth = def.directives!.some((dir) => dir.name.value === 'auth'); @@ -296,17 +306,14 @@ export class ModelTransformer extends TransformerModelBase implements Transforme const queryFields = this.createQueryFields(ctx, def); ctx.output.addQueryFields(queryFields); - const mutationFields = this.createMutationFields(ctx, def); + // use def before implicit timestamp fields are added so that mutation inputs do no include the implicit timestamp fields + const mutationFields = this.createMutationFields(ctx, defBeforeImplicitFields); ctx.output.addMutationFields(mutationFields); const subscriptionsFields = this.createSubscriptionFields(ctx, def!); ctx.output.addSubscriptionFields(subscriptionsFields); - const typeName = def.name.value; if (isDynamoDbModel(ctx, typeName)) { - // Update the field with auto generatable Fields - this.addAutoGeneratableFields(ctx, type); - if (ctx.isProjectUsingDataStore()) { this.addModelSyncFields(ctx, type); } @@ -604,10 +611,10 @@ export class ModelTransformer extends TransformerModelBase implements Transforme const knownModels = this.typesWithModelDirective; let conditionInput: InputObjectTypeDefinitionNode; if ([MutationFieldType.CREATE, MutationFieldType.DELETE, MutationFieldType.UPDATE].includes(operation.type as MutationFieldType)) { - const conditionTypeName = toPascalCase(['Model', type.name.value, 'ConditionInput']); + const conditionTypeName = getConditionInputName(type.name.value); const filterInputs = createEnumModelFilters(ctx, type); - conditionInput = makeMutationConditionInput(ctx, conditionTypeName, type); + conditionInput = makeMutationConditionInput(ctx, conditionTypeName, type, this.modelDirectiveConfig.get(type.name.value)!); filterInputs.push(conditionInput); filterInputs.forEach((input) => { const conditionInputName = input.name.value; @@ -621,7 +628,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme return [makeInputValueDefinition('id', makeNonNullType(makeNamedType('ID')))]; case QueryFieldType.LIST: { - const filterInputName = toPascalCase(['Model', type.name.value, 'FilterInput']); + const filterInputName = getFilterInputName(type.name.value); const filterInputs = createEnumModelFilters(ctx, type); filterInputs.push(makeListQueryFilterInput(ctx, filterInputName, type)); filterInputs.forEach((input) => { @@ -638,7 +645,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme ]; } case QueryFieldType.SYNC: { - const syncFilterInputName = toPascalCase(['Model', type.name.value, 'FilterInput']); + const syncFilterInputName = getFilterInputName(type.name.value); const syncFilterInputs = makeListQueryFilterInput(ctx, syncFilterInputName, type); const conditionInputName = syncFilterInputs.name.value; if (!ctx.output.getType(conditionInputName)) { @@ -699,7 +706,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 filterInputName = getSubscriptionFilterInputName(type.name.value); const filterInputs = createEnumModelFilters(ctx, type); filterInputs.push(makeSubscriptionQueryFilterInput(ctx, filterInputName, type)); filterInputs.forEach((input) => { @@ -740,7 +747,7 @@ export class ModelTransformer extends TransformerModelBase implements Transforme case QueryFieldType.SYNC: case QueryFieldType.LIST: { const isSyncEnabled = ctx.isProjectUsingDataStore(); - const connectionFieldName = toPascalCase(['Model', type.name.value, 'Connection']); + const connectionFieldName = getConnectionName(type.name.value); outputType = makeListQueryModel(type, connectionFieldName, isSyncEnabled); break; } diff --git a/packages/amplify-graphql-model-transformer/src/graphql-types/common.ts b/packages/amplify-graphql-model-transformer/src/graphql-types/common.ts index 5a084092a1..e6de8e2816 100644 --- a/packages/amplify-graphql-model-transformer/src/graphql-types/common.ts +++ b/packages/amplify-graphql-model-transformer/src/graphql-types/common.ts @@ -22,6 +22,7 @@ import { makeValueNode, ModelResourceIDs, STANDARD_SCALARS, + APPSYNC_DEFINED_SCALARS, toPascalCase, } from 'graphql-transformer-common'; import { diff --git a/packages/amplify-graphql-model-transformer/src/graphql-types/mutation.ts b/packages/amplify-graphql-model-transformer/src/graphql-types/mutation.ts index af039d8bce..772932ab64 100644 --- a/packages/amplify-graphql-model-transformer/src/graphql-types/mutation.ts +++ b/packages/amplify-graphql-model-transformer/src/graphql-types/mutation.ts @@ -1,7 +1,12 @@ import { TransformerTransformSchemaStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces'; import { DocumentNode, InputObjectTypeDefinitionNode, ObjectTypeDefinitionNode } from 'graphql'; import { ModelResourceIDs, getBaseType, toPascalCase } from 'graphql-transformer-common'; -import { InputFieldWrapper, InputObjectDefinitionWrapper, ObjectDefinitionWrapper } from '@aws-amplify/graphql-transformer-core'; +import { + InputFieldWrapper, + InputObjectDefinitionWrapper, + ObjectDefinitionWrapper, + isDynamoDbModel, +} from '@aws-amplify/graphql-transformer-core'; import { ModelDirectiveConfiguration } from '../directive'; import { makeConditionFilterInput } from './common'; @@ -162,11 +167,25 @@ export const makeMutationConditionInput = ( ctx: TransformerTransformSchemaStepContextProvider, name: string, object: ObjectTypeDefinitionNode, + modelDirectiveConfig: ModelDirectiveConfiguration, ): InputObjectTypeDefinitionNode => { const input = makeConditionFilterInput(ctx, name, object); const idField = input.fields.find((f) => f.name === 'id' && f.getTypeName() === 'ModelIDInput'); if (idField) { input.removeField(idField); } + + // add implicit timestamp fields to filter + if (isDynamoDbModel(ctx, object.name.value)) { + Object.values({ createdAt: 'createdAt', updatedAt: 'updatedAt', ...(modelDirectiveConfig?.timestamps || {}) }).forEach( + (timeStampFieldName) => { + if (!input.hasField(timeStampFieldName!)) { + const field = InputFieldWrapper.create(timeStampFieldName, 'ModelStringInput', true); + input.addField(field); + } + }, + ); + } + return input.serialize(); }; 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 d20cfd4f4f..4efe62951d 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 @@ -6111,28 +6111,94 @@ Object { "name": Object { "kind": "Name", "loc": Object { - "end": 3085, + "end": 3091, "start": 3082, }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 3109, + "start": 3093, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3109, + "start": 3093, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 3139, + "start": 3112, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3121, + "start": 3112, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 3139, + "start": 3123, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3139, + "start": 3123, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 3169, + "start": 3142, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3145, + "start": 3142, + }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 3109, - "start": 3087, + "end": 3169, + "start": 3147, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3108, - "start": 3088, + "end": 3168, + "start": 3148, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3108, - "start": 3088, + "end": 3168, + "start": 3148, }, "value": "ModelPostFilterInput", }, @@ -6145,34 +6211,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3138, - "start": 3112, + "end": 3198, + "start": 3172, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3114, - "start": 3112, + "end": 3174, + "start": 3172, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 3138, - "start": 3116, + "end": 3198, + "start": 3176, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3137, - "start": 3117, + "end": 3197, + "start": 3177, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3137, - "start": 3117, + "end": 3197, + "start": 3177, }, "value": "ModelPostFilterInput", }, @@ -6185,28 +6251,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3166, - "start": 3141, + "end": 3226, + "start": 3201, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3144, - "start": 3141, + "end": 3204, + "start": 3201, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3166, - "start": 3146, + "end": 3226, + "start": 3206, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3166, - "start": 3146, + "end": 3226, + "start": 3206, }, "value": "ModelPostFilterInput", }, @@ -6218,28 +6284,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3196, - "start": 3169, + "end": 3256, + "start": 3229, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3177, - "start": 3169, + "end": 3237, + "start": 3229, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3196, - "start": 3179, + "end": 3256, + "start": 3239, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3196, - "start": 3179, + "end": 3256, + "start": 3239, }, "value": "ModelBooleanInput", }, @@ -6248,7 +6314,7 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 3198, + "end": 3258, "start": 3006, }, "name": Object { @@ -6272,34 +6338,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3230, - "start": 3223, + "end": 3290, + "start": 3283, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3225, - "start": 3223, + "end": 3285, + "start": 3283, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 3230, - "start": 3227, + "end": 3290, + "start": 3287, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3229, - "start": 3227, + "end": 3289, + "start": 3287, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3229, - "start": 3227, + "end": 3289, + "start": 3287, }, "value": "ID", }, @@ -6311,28 +6377,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 3237, - "start": 3215, + "end": 3297, + "start": 3275, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3222, - "start": 3215, + "end": 3282, + "start": 3275, }, "value": "getPost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3237, - "start": 3233, + "end": 3297, + "start": 3293, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3237, - "start": 3233, + "end": 3297, + "start": 3293, }, "value": "Post", }, @@ -6346,28 +6412,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3278, - "start": 3250, + "end": 3338, + "start": 3310, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3256, - "start": 3250, + "end": 3316, + "start": 3310, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3278, - "start": 3258, + "end": 3338, + "start": 3318, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3278, - "start": 3258, + "end": 3338, + "start": 3318, }, "value": "ModelPostFilterInput", }, @@ -6379,28 +6445,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3290, - "start": 3280, + "end": 3350, + "start": 3340, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3285, - "start": 3280, + "end": 3345, + "start": 3340, }, "value": "limit", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3290, - "start": 3287, + "end": 3350, + "start": 3347, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3290, - "start": 3287, + "end": 3350, + "start": 3347, }, "value": "Int", }, @@ -6412,28 +6478,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3309, - "start": 3292, + "end": 3369, + "start": 3352, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3301, - "start": 3292, + "end": 3361, + "start": 3352, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3309, - "start": 3303, + "end": 3369, + "start": 3363, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3309, - "start": 3303, + "end": 3369, + "start": 3363, }, "value": "String", }, @@ -6444,28 +6510,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 3331, - "start": 3240, + "end": 3391, + "start": 3300, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3249, - "start": 3240, + "end": 3309, + "start": 3300, }, "value": "listPosts", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3331, - "start": 3312, + "end": 3391, + "start": 3372, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3331, - "start": 3312, + "end": 3391, + "start": 3372, }, "value": "ModelPostConnection", }, @@ -6479,28 +6545,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3372, - "start": 3344, + "end": 3432, + "start": 3404, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3350, - "start": 3344, + "end": 3410, + "start": 3404, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3372, - "start": 3352, + "end": 3432, + "start": 3412, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3372, - "start": 3352, + "end": 3432, + "start": 3412, }, "value": "ModelPostFilterInput", }, @@ -6512,28 +6578,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3384, - "start": 3374, + "end": 3444, + "start": 3434, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3379, - "start": 3374, + "end": 3439, + "start": 3434, }, "value": "limit", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3384, - "start": 3381, + "end": 3444, + "start": 3441, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3384, - "start": 3381, + "end": 3444, + "start": 3441, }, "value": "Int", }, @@ -6545,28 +6611,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3403, - "start": 3386, + "end": 3463, + "start": 3446, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3395, - "start": 3386, + "end": 3455, + "start": 3446, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3403, - "start": 3397, + "end": 3463, + "start": 3457, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3403, - "start": 3397, + "end": 3463, + "start": 3457, }, "value": "String", }, @@ -6578,28 +6644,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3427, - "start": 3405, + "end": 3487, + "start": 3465, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3413, - "start": 3405, + "end": 3473, + "start": 3465, }, "value": "lastSync", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3427, - "start": 3415, + "end": 3487, + "start": 3475, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3427, - "start": 3415, + "end": 3487, + "start": 3475, }, "value": "AWSTimestamp", }, @@ -6610,28 +6676,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 3449, - "start": 3334, + "end": 3509, + "start": 3394, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3343, - "start": 3334, + "end": 3403, + "start": 3394, }, "value": "syncPosts", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3449, - "start": 3430, + "end": 3509, + "start": 3490, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3449, - "start": 3430, + "end": 3509, + "start": 3490, }, "value": "ModelPostConnection", }, @@ -6645,34 +6711,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3467, - "start": 3460, + "end": 3527, + "start": 3520, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3462, - "start": 3460, + "end": 3522, + "start": 3520, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 3467, - "start": 3464, + "end": 3527, + "start": 3524, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3466, - "start": 3464, + "end": 3526, + "start": 3524, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3466, - "start": 3464, + "end": 3526, + "start": 3524, }, "value": "ID", }, @@ -6684,28 +6750,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 3474, - "start": 3452, + "end": 3534, + "start": 3512, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3459, - "start": 3452, + "end": 3519, + "start": 3512, }, "value": "getUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3474, - "start": 3470, + "end": 3534, + "start": 3530, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3474, - "start": 3470, + "end": 3534, + "start": 3530, }, "value": "User", }, @@ -6719,28 +6785,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3515, - "start": 3487, + "end": 3575, + "start": 3547, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3493, - "start": 3487, + "end": 3553, + "start": 3547, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3515, - "start": 3495, + "end": 3575, + "start": 3555, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3515, - "start": 3495, + "end": 3575, + "start": 3555, }, "value": "ModelUserFilterInput", }, @@ -6752,28 +6818,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3527, - "start": 3517, + "end": 3587, + "start": 3577, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3522, - "start": 3517, + "end": 3582, + "start": 3577, }, "value": "limit", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3527, - "start": 3524, + "end": 3587, + "start": 3584, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3527, - "start": 3524, + "end": 3587, + "start": 3584, }, "value": "Int", }, @@ -6785,28 +6851,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3546, - "start": 3529, + "end": 3606, + "start": 3589, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3538, - "start": 3529, + "end": 3598, + "start": 3589, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3546, - "start": 3540, + "end": 3606, + "start": 3600, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3546, - "start": 3540, + "end": 3606, + "start": 3600, }, "value": "String", }, @@ -6817,28 +6883,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 3568, - "start": 3477, + "end": 3628, + "start": 3537, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3486, - "start": 3477, + "end": 3546, + "start": 3537, }, "value": "listUsers", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3568, - "start": 3549, + "end": 3628, + "start": 3609, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3568, - "start": 3549, + "end": 3628, + "start": 3609, }, "value": "ModelUserConnection", }, @@ -6852,28 +6918,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3609, - "start": 3581, + "end": 3669, + "start": 3641, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3587, - "start": 3581, + "end": 3647, + "start": 3641, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3609, - "start": 3589, + "end": 3669, + "start": 3649, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3609, - "start": 3589, + "end": 3669, + "start": 3649, }, "value": "ModelUserFilterInput", }, @@ -6885,28 +6951,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3621, - "start": 3611, + "end": 3681, + "start": 3671, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3616, - "start": 3611, + "end": 3676, + "start": 3671, }, "value": "limit", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3621, - "start": 3618, + "end": 3681, + "start": 3678, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3621, - "start": 3618, + "end": 3681, + "start": 3678, }, "value": "Int", }, @@ -6918,28 +6984,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3640, - "start": 3623, + "end": 3700, + "start": 3683, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3632, - "start": 3623, + "end": 3692, + "start": 3683, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3640, - "start": 3634, + "end": 3700, + "start": 3694, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3640, - "start": 3634, + "end": 3700, + "start": 3694, }, "value": "String", }, @@ -6951,28 +7017,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3664, - "start": 3642, + "end": 3724, + "start": 3702, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3650, - "start": 3642, + "end": 3710, + "start": 3702, }, "value": "lastSync", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3664, - "start": 3652, + "end": 3724, + "start": 3712, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3664, - "start": 3652, + "end": 3724, + "start": 3712, }, "value": "AWSTimestamp", }, @@ -6983,28 +7049,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 3686, - "start": 3571, + "end": 3746, + "start": 3631, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3580, - "start": 3571, + "end": 3640, + "start": 3631, }, "value": "syncUsers", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3686, - "start": 3667, + "end": 3746, + "start": 3727, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3686, - "start": 3667, + "end": 3746, + "start": 3727, }, "value": "ModelUserConnection", }, @@ -7014,14 +7080,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 3688, - "start": 3200, + "end": 3748, + "start": 3260, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3210, - "start": 3205, + "end": 3270, + "start": 3265, }, "value": "Query", }, @@ -7036,28 +7102,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3747, - "start": 3724, + "end": 3807, + "start": 3784, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3729, - "start": 3724, + "end": 3789, + "start": 3784, }, "value": "title", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3747, - "start": 3731, + "end": 3807, + "start": 3791, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3747, - "start": 3731, + "end": 3807, + "start": 3791, }, "value": "ModelStringInput", }, @@ -7069,34 +7135,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3780, - "start": 3750, + "end": 3840, + "start": 3810, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3753, - "start": 3750, + "end": 3813, + "start": 3810, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 3780, - "start": 3755, + "end": 3840, + "start": 3815, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3779, - "start": 3756, + "end": 3839, + "start": 3816, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3779, - "start": 3756, + "end": 3839, + "start": 3816, }, "value": "ModelPostConditionInput", }, @@ -7109,34 +7175,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3812, - "start": 3783, + "end": 3872, + "start": 3843, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3785, - "start": 3783, + "end": 3845, + "start": 3843, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 3812, - "start": 3787, + "end": 3872, + "start": 3847, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3811, - "start": 3788, + "end": 3871, + "start": 3848, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3811, - "start": 3788, + "end": 3871, + "start": 3848, }, "value": "ModelPostConditionInput", }, @@ -7149,28 +7215,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3843, - "start": 3815, + "end": 3903, + "start": 3875, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3818, - "start": 3815, + "end": 3878, + "start": 3875, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3843, - "start": 3820, + "end": 3903, + "start": 3880, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3843, - "start": 3820, + "end": 3903, + "start": 3880, }, "value": "ModelPostConditionInput", }, @@ -7182,44 +7248,110 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3873, - "start": 3846, + "end": 3933, + "start": 3906, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3854, - "start": 3846, + "end": 3914, + "start": 3906, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3873, - "start": 3856, + "end": 3933, + "start": 3916, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3873, - "start": 3856, + "end": 3933, + "start": 3916, }, "value": "ModelBooleanInput", }, }, }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 3963, + "start": 3936, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3945, + "start": 3936, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 3963, + "start": 3947, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3963, + "start": 3947, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 3993, + "start": 3966, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3975, + "start": 3966, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 3993, + "start": 3977, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 3993, + "start": 3977, + }, + "value": "ModelStringInput", + }, + }, + }, ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 3875, - "start": 3690, + "end": 3995, + "start": 3750, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3719, - "start": 3696, + "end": 3779, + "start": 3756, }, "value": "ModelPostConditionInput", }, @@ -7234,28 +7366,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3909, - "start": 3903, + "end": 4029, + "start": 4023, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3905, - "start": 3903, + "end": 4025, + "start": 4023, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3909, - "start": 3907, + "end": 4029, + "start": 4027, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3909, - "start": 3907, + "end": 4029, + "start": 4027, }, "value": "ID", }, @@ -7267,34 +7399,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3926, - "start": 3912, + "end": 4046, + "start": 4032, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3917, - "start": 3912, + "end": 4037, + "start": 4032, }, "value": "title", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 3926, - "start": 3919, + "end": 4046, + "start": 4039, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3925, - "start": 3919, + "end": 4045, + "start": 4039, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3925, - "start": 3919, + "end": 4045, + "start": 4039, }, "value": "String", }, @@ -7307,28 +7439,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3942, - "start": 3929, + "end": 4062, + "start": 4049, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3937, - "start": 3929, + "end": 4057, + "start": 4049, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3942, - "start": 3939, + "end": 4062, + "start": 4059, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3942, - "start": 3939, + "end": 4062, + "start": 4059, }, "value": "Int", }, @@ -7337,14 +7469,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 3944, - "start": 3877, + "end": 4064, + "start": 3997, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3898, - "start": 3883, + "end": 4018, + "start": 4003, }, "value": "CreatePostInput", }, @@ -7359,34 +7491,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3979, - "start": 3972, + "end": 4099, + "start": 4092, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3974, - "start": 3972, + "end": 4094, + "start": 4092, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 3979, - "start": 3976, + "end": 4099, + "start": 4096, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3978, - "start": 3976, + "end": 4098, + "start": 4096, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3978, - "start": 3976, + "end": 4098, + "start": 4096, }, "value": "ID", }, @@ -7399,28 +7531,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 3995, - "start": 3982, + "end": 4115, + "start": 4102, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3987, - "start": 3982, + "end": 4107, + "start": 4102, }, "value": "title", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 3995, - "start": 3989, + "end": 4115, + "start": 4109, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3995, - "start": 3989, + "end": 4115, + "start": 4109, }, "value": "String", }, @@ -7432,28 +7564,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4011, - "start": 3998, + "end": 4131, + "start": 4118, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4006, - "start": 3998, + "end": 4126, + "start": 4118, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4011, - "start": 4008, + "end": 4131, + "start": 4128, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4011, - "start": 4008, + "end": 4131, + "start": 4128, }, "value": "Int", }, @@ -7462,14 +7594,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 4013, - "start": 3946, + "end": 4133, + "start": 4066, }, "name": Object { "kind": "Name", "loc": Object { - "end": 3967, - "start": 3952, + "end": 4087, + "start": 4072, }, "value": "UpdatePostInput", }, @@ -7484,34 +7616,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4048, - "start": 4041, + "end": 4168, + "start": 4161, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4043, - "start": 4041, + "end": 4163, + "start": 4161, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4048, - "start": 4045, + "end": 4168, + "start": 4165, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4047, - "start": 4045, + "end": 4167, + "start": 4165, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4047, - "start": 4045, + "end": 4167, + "start": 4165, }, "value": "ID", }, @@ -7524,28 +7656,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4064, - "start": 4051, + "end": 4184, + "start": 4171, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4059, - "start": 4051, + "end": 4179, + "start": 4171, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4064, - "start": 4061, + "end": 4184, + "start": 4181, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4064, - "start": 4061, + "end": 4184, + "start": 4181, }, "value": "Int", }, @@ -7554,14 +7686,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 4066, - "start": 4015, + "end": 4186, + "start": 4135, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4036, - "start": 4021, + "end": 4156, + "start": 4141, }, "value": "DeletePostInput", }, @@ -7578,34 +7710,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4120, - "start": 4097, + "end": 4240, + "start": 4217, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4102, - "start": 4097, + "end": 4222, + "start": 4217, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4120, - "start": 4104, + "end": 4240, + "start": 4224, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4119, - "start": 4104, + "end": 4239, + "start": 4224, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4119, - "start": 4104, + "end": 4239, + "start": 4224, }, "value": "CreatePostInput", }, @@ -7618,28 +7750,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4156, - "start": 4122, + "end": 4276, + "start": 4242, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4131, - "start": 4122, + "end": 4251, + "start": 4242, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4156, - "start": 4133, + "end": 4276, + "start": 4253, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4156, - "start": 4133, + "end": 4276, + "start": 4253, }, "value": "ModelPostConditionInput", }, @@ -7650,28 +7782,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4163, - "start": 4086, + "end": 4283, + "start": 4206, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4096, - "start": 4086, + "end": 4216, + "start": 4206, }, "value": "createPost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4163, - "start": 4159, + "end": 4283, + "start": 4279, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4163, - "start": 4159, + "end": 4283, + "start": 4279, }, "value": "Post", }, @@ -7685,34 +7817,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4200, - "start": 4177, + "end": 4320, + "start": 4297, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4182, - "start": 4177, + "end": 4302, + "start": 4297, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4200, - "start": 4184, + "end": 4320, + "start": 4304, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4199, - "start": 4184, + "end": 4319, + "start": 4304, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4199, - "start": 4184, + "end": 4319, + "start": 4304, }, "value": "UpdatePostInput", }, @@ -7725,28 +7857,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4236, - "start": 4202, + "end": 4356, + "start": 4322, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4211, - "start": 4202, + "end": 4331, + "start": 4322, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4236, - "start": 4213, + "end": 4356, + "start": 4333, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4236, - "start": 4213, + "end": 4356, + "start": 4333, }, "value": "ModelPostConditionInput", }, @@ -7757,28 +7889,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4243, - "start": 4166, + "end": 4363, + "start": 4286, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4176, - "start": 4166, + "end": 4296, + "start": 4286, }, "value": "updatePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4243, - "start": 4239, + "end": 4363, + "start": 4359, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4243, - "start": 4239, + "end": 4363, + "start": 4359, }, "value": "Post", }, @@ -7792,34 +7924,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4280, - "start": 4257, + "end": 4400, + "start": 4377, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4262, - "start": 4257, + "end": 4382, + "start": 4377, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4280, - "start": 4264, + "end": 4400, + "start": 4384, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4279, - "start": 4264, + "end": 4399, + "start": 4384, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4279, - "start": 4264, + "end": 4399, + "start": 4384, }, "value": "DeletePostInput", }, @@ -7832,28 +7964,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4316, - "start": 4282, + "end": 4436, + "start": 4402, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4291, - "start": 4282, + "end": 4411, + "start": 4402, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4316, - "start": 4293, + "end": 4436, + "start": 4413, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4316, - "start": 4293, + "end": 4436, + "start": 4413, }, "value": "ModelPostConditionInput", }, @@ -7864,28 +7996,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4323, - "start": 4246, + "end": 4443, + "start": 4366, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4256, - "start": 4246, + "end": 4376, + "start": 4366, }, "value": "deletePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4323, - "start": 4319, + "end": 4443, + "start": 4439, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4323, - "start": 4319, + "end": 4443, + "start": 4439, }, "value": "Post", }, @@ -7899,34 +8031,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4372, - "start": 4343, + "end": 4492, + "start": 4463, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4348, - "start": 4343, + "end": 4468, + "start": 4463, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4372, - "start": 4350, + "end": 4492, + "start": 4470, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4371, - "start": 4350, + "end": 4491, + "start": 4470, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4371, - "start": 4350, + "end": 4491, + "start": 4470, }, "value": "CreatePostEditorInput", }, @@ -7939,28 +8071,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4414, - "start": 4374, + "end": 4534, + "start": 4494, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4383, - "start": 4374, + "end": 4503, + "start": 4494, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4414, - "start": 4385, + "end": 4534, + "start": 4505, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4414, - "start": 4385, + "end": 4534, + "start": 4505, }, "value": "ModelPostEditorConditionInput", }, @@ -7971,28 +8103,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4427, - "start": 4326, + "end": 4547, + "start": 4446, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4342, - "start": 4326, + "end": 4462, + "start": 4446, }, "value": "createPostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4427, - "start": 4417, + "end": 4547, + "start": 4537, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4427, - "start": 4417, + "end": 4547, + "start": 4537, }, "value": "PostEditor", }, @@ -8006,34 +8138,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4476, - "start": 4447, + "end": 4596, + "start": 4567, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4452, - "start": 4447, + "end": 4572, + "start": 4567, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4476, - "start": 4454, + "end": 4596, + "start": 4574, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4475, - "start": 4454, + "end": 4595, + "start": 4574, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4475, - "start": 4454, + "end": 4595, + "start": 4574, }, "value": "UpdatePostEditorInput", }, @@ -8046,28 +8178,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4518, - "start": 4478, + "end": 4638, + "start": 4598, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4487, - "start": 4478, + "end": 4607, + "start": 4598, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4518, - "start": 4489, + "end": 4638, + "start": 4609, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4518, - "start": 4489, + "end": 4638, + "start": 4609, }, "value": "ModelPostEditorConditionInput", }, @@ -8078,28 +8210,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4531, - "start": 4430, + "end": 4651, + "start": 4550, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4446, - "start": 4430, + "end": 4566, + "start": 4550, }, "value": "updatePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4531, - "start": 4521, + "end": 4651, + "start": 4641, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4531, - "start": 4521, + "end": 4651, + "start": 4641, }, "value": "PostEditor", }, @@ -8113,34 +8245,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4580, - "start": 4551, + "end": 4700, + "start": 4671, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4556, - "start": 4551, + "end": 4676, + "start": 4671, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4580, - "start": 4558, + "end": 4700, + "start": 4678, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4579, - "start": 4558, + "end": 4699, + "start": 4678, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4579, - "start": 4558, + "end": 4699, + "start": 4678, }, "value": "DeletePostEditorInput", }, @@ -8153,28 +8285,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4622, - "start": 4582, + "end": 4742, + "start": 4702, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4591, - "start": 4582, + "end": 4711, + "start": 4702, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4622, - "start": 4593, + "end": 4742, + "start": 4713, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4622, - "start": 4593, + "end": 4742, + "start": 4713, }, "value": "ModelPostEditorConditionInput", }, @@ -8185,28 +8317,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4635, - "start": 4534, + "end": 4755, + "start": 4654, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4550, - "start": 4534, + "end": 4670, + "start": 4654, }, "value": "deletePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4635, - "start": 4625, + "end": 4755, + "start": 4745, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4635, - "start": 4625, + "end": 4755, + "start": 4745, }, "value": "PostEditor", }, @@ -8220,34 +8352,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4672, - "start": 4649, + "end": 4792, + "start": 4769, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4654, - "start": 4649, + "end": 4774, + "start": 4769, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4672, - "start": 4656, + "end": 4792, + "start": 4776, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4671, - "start": 4656, + "end": 4791, + "start": 4776, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4671, - "start": 4656, + "end": 4791, + "start": 4776, }, "value": "CreateUserInput", }, @@ -8260,28 +8392,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4708, - "start": 4674, + "end": 4828, + "start": 4794, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4683, - "start": 4674, + "end": 4803, + "start": 4794, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4708, - "start": 4685, + "end": 4828, + "start": 4805, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4708, - "start": 4685, + "end": 4828, + "start": 4805, }, "value": "ModelUserConditionInput", }, @@ -8292,28 +8424,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4715, - "start": 4638, + "end": 4835, + "start": 4758, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4648, - "start": 4638, + "end": 4768, + "start": 4758, }, "value": "createUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4715, - "start": 4711, + "end": 4835, + "start": 4831, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4715, - "start": 4711, + "end": 4835, + "start": 4831, }, "value": "User", }, @@ -8327,34 +8459,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4752, - "start": 4729, + "end": 4872, + "start": 4849, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4734, - "start": 4729, + "end": 4854, + "start": 4849, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4752, - "start": 4736, + "end": 4872, + "start": 4856, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4751, - "start": 4736, + "end": 4871, + "start": 4856, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4751, - "start": 4736, + "end": 4871, + "start": 4856, }, "value": "UpdateUserInput", }, @@ -8367,28 +8499,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4788, - "start": 4754, + "end": 4908, + "start": 4874, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4763, - "start": 4754, + "end": 4883, + "start": 4874, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4788, - "start": 4765, + "end": 4908, + "start": 4885, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4788, - "start": 4765, + "end": 4908, + "start": 4885, }, "value": "ModelUserConditionInput", }, @@ -8399,28 +8531,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4795, - "start": 4718, + "end": 4915, + "start": 4838, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4728, - "start": 4718, + "end": 4848, + "start": 4838, }, "value": "updateUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4795, - "start": 4791, + "end": 4915, + "start": 4911, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4795, - "start": 4791, + "end": 4915, + "start": 4911, }, "value": "User", }, @@ -8434,34 +8566,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4832, - "start": 4809, + "end": 4952, + "start": 4929, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4814, - "start": 4809, + "end": 4934, + "start": 4929, }, "value": "input", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 4832, - "start": 4816, + "end": 4952, + "start": 4936, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4831, - "start": 4816, + "end": 4951, + "start": 4936, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4831, - "start": 4816, + "end": 4951, + "start": 4936, }, "value": "DeleteUserInput", }, @@ -8474,28 +8606,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4868, - "start": 4834, + "end": 4988, + "start": 4954, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4843, - "start": 4834, + "end": 4963, + "start": 4954, }, "value": "condition", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4868, - "start": 4845, + "end": 4988, + "start": 4965, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4868, - "start": 4845, + "end": 4988, + "start": 4965, }, "value": "ModelUserConditionInput", }, @@ -8506,28 +8638,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 4875, - "start": 4798, + "end": 4995, + "start": 4918, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4808, - "start": 4798, + "end": 4928, + "start": 4918, }, "value": "deleteUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4875, - "start": 4871, + "end": 4995, + "start": 4991, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4875, - "start": 4871, + "end": 4995, + "start": 4991, }, "value": "User", }, @@ -8537,14 +8669,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 4877, - "start": 4068, + "end": 4997, + "start": 4188, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4081, - "start": 4073, + "end": 4201, + "start": 4193, }, "value": "Mutation", }, @@ -8559,28 +8691,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4950, - "start": 4922, + "end": 5070, + "start": 5042, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4924, - "start": 4922, + "end": 5044, + "start": 5042, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4950, - "start": 4926, + "end": 5070, + "start": 5046, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4950, - "start": 4926, + "end": 5070, + "start": 5046, }, "value": "ModelSubscriptionIDInput", }, @@ -8592,28 +8724,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 4988, - "start": 4953, + "end": 5108, + "start": 5073, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4958, - "start": 4953, + "end": 5078, + "start": 5073, }, "value": "title", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 4988, - "start": 4960, + "end": 5108, + "start": 5080, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4988, - "start": 4960, + "end": 5108, + "start": 5080, }, "value": "ModelSubscriptionStringInput", }, @@ -8625,34 +8757,100 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5030, - "start": 4991, + "end": 5150, + "start": 5111, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4994, - "start": 4991, + "end": 5120, + "start": 5111, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 5150, + "start": 5122, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5150, + "start": 5122, + }, + "value": "ModelSubscriptionStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 5192, + "start": 5153, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5162, + "start": 5153, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 5192, + "start": 5164, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5192, + "start": 5164, + }, + "value": "ModelSubscriptionStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 5234, + "start": 5195, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5198, + "start": 5195, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 5030, - "start": 4996, + "end": 5234, + "start": 5200, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5029, - "start": 4997, + "end": 5233, + "start": 5201, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5029, - "start": 4997, + "end": 5233, + "start": 5201, }, "value": "ModelSubscriptionPostFilterInput", }, @@ -8665,34 +8863,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5071, - "start": 5033, + "end": 5275, + "start": 5237, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5035, - "start": 5033, + "end": 5239, + "start": 5237, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 5071, - "start": 5037, + "end": 5275, + "start": 5241, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5070, - "start": 5038, + "end": 5274, + "start": 5242, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5070, - "start": 5038, + "end": 5274, + "start": 5242, }, "value": "ModelSubscriptionPostFilterInput", }, @@ -8705,28 +8903,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5101, - "start": 5074, + "end": 5305, + "start": 5278, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5082, - "start": 5074, + "end": 5286, + "start": 5278, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5101, - "start": 5084, + "end": 5305, + "start": 5288, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5101, - "start": 5084, + "end": 5305, + "start": 5288, }, "value": "ModelBooleanInput", }, @@ -8735,14 +8933,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 5103, - "start": 4879, + "end": 5307, + "start": 4999, }, "name": Object { "kind": "Name", "loc": Object { - "end": 4917, - "start": 4885, + "end": 5037, + "start": 5005, }, "value": "ModelSubscriptionPostFilterInput", }, @@ -8759,28 +8957,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5180, - "start": 5140, + "end": 5384, + "start": 5344, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5146, - "start": 5140, + "end": 5350, + "start": 5344, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5180, - "start": 5148, + "end": 5384, + "start": 5352, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5180, - "start": 5148, + "end": 5384, + "start": 5352, }, "value": "ModelSubscriptionPostFilterInput", }, @@ -8794,30 +8992,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5228, - "start": 5203, + "end": 5432, + "start": 5407, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5212, - "start": 5203, + "end": 5416, + "start": 5407, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5228, - "start": 5214, + "end": 5432, + "start": 5418, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5227, - "start": 5215, + "end": 5431, + "start": 5419, }, "value": "createPost", }, @@ -8827,14 +9025,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5229, - "start": 5188, + "end": 5433, + "start": 5392, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5202, - "start": 5189, + "end": 5406, + "start": 5393, }, "value": "aws_subscribe", }, @@ -8842,28 +9040,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5229, - "start": 5127, + "end": 5433, + "start": 5331, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5139, - "start": 5127, + "end": 5343, + "start": 5331, }, "value": "onCreatePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5187, - "start": 5183, + "end": 5391, + "start": 5387, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5187, - "start": 5183, + "end": 5391, + "start": 5387, }, "value": "Post", }, @@ -8877,28 +9075,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5285, - "start": 5245, + "end": 5489, + "start": 5449, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5251, - "start": 5245, + "end": 5455, + "start": 5449, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5285, - "start": 5253, + "end": 5489, + "start": 5457, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5285, - "start": 5253, + "end": 5489, + "start": 5457, }, "value": "ModelSubscriptionPostFilterInput", }, @@ -8912,30 +9110,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5333, - "start": 5308, + "end": 5537, + "start": 5512, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5317, - "start": 5308, + "end": 5521, + "start": 5512, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5333, - "start": 5319, + "end": 5537, + "start": 5523, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5332, - "start": 5320, + "end": 5536, + "start": 5524, }, "value": "updatePost", }, @@ -8945,14 +9143,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5334, - "start": 5293, + "end": 5538, + "start": 5497, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5307, - "start": 5294, + "end": 5511, + "start": 5498, }, "value": "aws_subscribe", }, @@ -8960,28 +9158,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5334, - "start": 5232, + "end": 5538, + "start": 5436, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5244, - "start": 5232, + "end": 5448, + "start": 5436, }, "value": "onUpdatePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5292, - "start": 5288, + "end": 5496, + "start": 5492, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5292, - "start": 5288, + "end": 5496, + "start": 5492, }, "value": "Post", }, @@ -8995,28 +9193,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5390, - "start": 5350, + "end": 5594, + "start": 5554, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5356, - "start": 5350, + "end": 5560, + "start": 5554, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5390, - "start": 5358, + "end": 5594, + "start": 5562, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5390, - "start": 5358, + "end": 5594, + "start": 5562, }, "value": "ModelSubscriptionPostFilterInput", }, @@ -9030,30 +9228,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5438, - "start": 5413, + "end": 5642, + "start": 5617, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5422, - "start": 5413, + "end": 5626, + "start": 5617, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5438, - "start": 5424, + "end": 5642, + "start": 5628, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5437, - "start": 5425, + "end": 5641, + "start": 5629, }, "value": "deletePost", }, @@ -9063,14 +9261,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5439, - "start": 5398, + "end": 5643, + "start": 5602, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5412, - "start": 5399, + "end": 5616, + "start": 5603, }, "value": "aws_subscribe", }, @@ -9078,28 +9276,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5439, - "start": 5337, + "end": 5643, + "start": 5541, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5349, - "start": 5337, + "end": 5553, + "start": 5541, }, "value": "onDeletePost", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5397, - "start": 5393, + "end": 5601, + "start": 5597, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5397, - "start": 5393, + "end": 5601, + "start": 5597, }, "value": "Post", }, @@ -9113,28 +9311,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5507, - "start": 5461, + "end": 5711, + "start": 5665, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5467, - "start": 5461, + "end": 5671, + "start": 5665, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5507, - "start": 5469, + "end": 5711, + "start": 5673, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5507, - "start": 5469, + "end": 5711, + "start": 5673, }, "value": "ModelSubscriptionPostEditorFilterInput", }, @@ -9148,30 +9346,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5567, - "start": 5536, + "end": 5771, + "start": 5740, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5545, - "start": 5536, + "end": 5749, + "start": 5740, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5567, - "start": 5547, + "end": 5771, + "start": 5751, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5566, - "start": 5548, + "end": 5770, + "start": 5752, }, "value": "createPostEditor", }, @@ -9181,14 +9379,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5568, - "start": 5521, + "end": 5772, + "start": 5725, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5535, - "start": 5522, + "end": 5739, + "start": 5726, }, "value": "aws_subscribe", }, @@ -9196,28 +9394,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5568, - "start": 5442, + "end": 5772, + "start": 5646, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5460, - "start": 5442, + "end": 5664, + "start": 5646, }, "value": "onCreatePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5520, - "start": 5510, + "end": 5724, + "start": 5714, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5520, - "start": 5510, + "end": 5724, + "start": 5714, }, "value": "PostEditor", }, @@ -9231,28 +9429,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5636, - "start": 5590, + "end": 5840, + "start": 5794, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5596, - "start": 5590, + "end": 5800, + "start": 5794, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5636, - "start": 5598, + "end": 5840, + "start": 5802, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5636, - "start": 5598, + "end": 5840, + "start": 5802, }, "value": "ModelSubscriptionPostEditorFilterInput", }, @@ -9266,30 +9464,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5696, - "start": 5665, + "end": 5900, + "start": 5869, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5674, - "start": 5665, + "end": 5878, + "start": 5869, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5696, - "start": 5676, + "end": 5900, + "start": 5880, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5695, - "start": 5677, + "end": 5899, + "start": 5881, }, "value": "updatePostEditor", }, @@ -9299,14 +9497,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5697, - "start": 5650, + "end": 5901, + "start": 5854, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5664, - "start": 5651, + "end": 5868, + "start": 5855, }, "value": "aws_subscribe", }, @@ -9314,28 +9512,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5697, - "start": 5571, + "end": 5901, + "start": 5775, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5589, - "start": 5571, + "end": 5793, + "start": 5775, }, "value": "onUpdatePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5649, - "start": 5639, + "end": 5853, + "start": 5843, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5649, - "start": 5639, + "end": 5853, + "start": 5843, }, "value": "PostEditor", }, @@ -9349,28 +9547,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5765, - "start": 5719, + "end": 5969, + "start": 5923, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5725, - "start": 5719, + "end": 5929, + "start": 5923, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5765, - "start": 5727, + "end": 5969, + "start": 5931, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5765, - "start": 5727, + "end": 5969, + "start": 5931, }, "value": "ModelSubscriptionPostEditorFilterInput", }, @@ -9384,30 +9582,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5825, - "start": 5794, + "end": 6029, + "start": 5998, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5803, - "start": 5794, + "end": 6007, + "start": 5998, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5825, - "start": 5805, + "end": 6029, + "start": 6009, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5824, - "start": 5806, + "end": 6028, + "start": 6010, }, "value": "deletePostEditor", }, @@ -9417,14 +9615,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5826, - "start": 5779, + "end": 6030, + "start": 5983, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5793, - "start": 5780, + "end": 5997, + "start": 5984, }, "value": "aws_subscribe", }, @@ -9432,28 +9630,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5826, - "start": 5700, + "end": 6030, + "start": 5904, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5718, - "start": 5700, + "end": 5922, + "start": 5904, }, "value": "onDeletePostEditor", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5778, - "start": 5768, + "end": 5982, + "start": 5972, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5778, - "start": 5768, + "end": 5982, + "start": 5972, }, "value": "PostEditor", }, @@ -9467,28 +9665,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5882, - "start": 5842, + "end": 6086, + "start": 6046, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5848, - "start": 5842, + "end": 6052, + "start": 6046, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5882, - "start": 5850, + "end": 6086, + "start": 6054, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5882, - "start": 5850, + "end": 6086, + "start": 6054, }, "value": "ModelSubscriptionUserFilterInput", }, @@ -9502,30 +9700,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 5930, - "start": 5905, + "end": 6134, + "start": 6109, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5914, - "start": 5905, + "end": 6118, + "start": 6109, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 5930, - "start": 5916, + "end": 6134, + "start": 6120, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 5929, - "start": 5917, + "end": 6133, + "start": 6121, }, "value": "createUser", }, @@ -9535,14 +9733,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 5931, - "start": 5890, + "end": 6135, + "start": 6094, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5904, - "start": 5891, + "end": 6108, + "start": 6095, }, "value": "aws_subscribe", }, @@ -9550,28 +9748,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 5931, - "start": 5829, + "end": 6135, + "start": 6033, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5841, - "start": 5829, + "end": 6045, + "start": 6033, }, "value": "onCreateUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5889, - "start": 5885, + "end": 6093, + "start": 6089, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5889, - "start": 5885, + "end": 6093, + "start": 6089, }, "value": "User", }, @@ -9585,28 +9783,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 5987, - "start": 5947, + "end": 6191, + "start": 6151, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5953, - "start": 5947, + "end": 6157, + "start": 6151, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5987, - "start": 5955, + "end": 6191, + "start": 6159, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5987, - "start": 5955, + "end": 6191, + "start": 6159, }, "value": "ModelSubscriptionUserFilterInput", }, @@ -9620,30 +9818,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 6035, - "start": 6010, + "end": 6239, + "start": 6214, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6019, - "start": 6010, + "end": 6223, + "start": 6214, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 6035, - "start": 6021, + "end": 6239, + "start": 6225, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 6034, - "start": 6022, + "end": 6238, + "start": 6226, }, "value": "updateUser", }, @@ -9653,14 +9851,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 6036, - "start": 5995, + "end": 6240, + "start": 6199, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6009, - "start": 5996, + "end": 6213, + "start": 6200, }, "value": "aws_subscribe", }, @@ -9668,28 +9866,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 6036, - "start": 5934, + "end": 6240, + "start": 6138, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5946, - "start": 5934, + "end": 6150, + "start": 6138, }, "value": "onUpdateUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 5994, - "start": 5990, + "end": 6198, + "start": 6194, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5994, - "start": 5990, + "end": 6198, + "start": 6194, }, "value": "User", }, @@ -9703,28 +9901,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6092, - "start": 6052, + "end": 6296, + "start": 6256, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6058, - "start": 6052, + "end": 6262, + "start": 6256, }, "value": "filter", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6092, - "start": 6060, + "end": 6296, + "start": 6264, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6092, - "start": 6060, + "end": 6296, + "start": 6264, }, "value": "ModelSubscriptionUserFilterInput", }, @@ -9738,30 +9936,30 @@ Object { Object { "kind": "Argument", "loc": Object { - "end": 6140, - "start": 6115, + "end": 6344, + "start": 6319, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6124, - "start": 6115, + "end": 6328, + "start": 6319, }, "value": "mutations", }, "value": Object { "kind": "ListValue", "loc": Object { - "end": 6140, - "start": 6126, + "end": 6344, + "start": 6330, }, "values": Array [ Object { "block": false, "kind": "StringValue", "loc": Object { - "end": 6139, - "start": 6127, + "end": 6343, + "start": 6331, }, "value": "deleteUser", }, @@ -9771,14 +9969,14 @@ Object { ], "kind": "Directive", "loc": Object { - "end": 6141, - "start": 6100, + "end": 6345, + "start": 6304, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6114, - "start": 6101, + "end": 6318, + "start": 6305, }, "value": "aws_subscribe", }, @@ -9786,28 +9984,28 @@ Object { ], "kind": "FieldDefinition", "loc": Object { - "end": 6141, - "start": 6039, + "end": 6345, + "start": 6243, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6051, - "start": 6039, + "end": 6255, + "start": 6243, }, "value": "onDeleteUser", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6099, - "start": 6095, + "end": 6303, + "start": 6299, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6099, - "start": 6095, + "end": 6303, + "start": 6299, }, "value": "User", }, @@ -9817,14 +10015,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 6143, - "start": 5105, + "end": 6347, + "start": 5309, }, "name": Object { "kind": "Name", "loc": Object { - "end": 5122, - "start": 5110, + "end": 5326, + "start": 5314, }, "value": "Subscription", }, @@ -9839,28 +10037,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6205, - "start": 6185, + "end": 6409, + "start": 6389, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6191, - "start": 6185, + "end": 6395, + "start": 6389, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6205, - "start": 6193, + "end": 6409, + "start": 6397, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6205, - "start": 6193, + "end": 6409, + "start": 6397, }, "value": "ModelIDInput", }, @@ -9872,28 +10070,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6230, - "start": 6208, + "end": 6434, + "start": 6412, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6216, - "start": 6208, + "end": 6420, + "start": 6412, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6230, - "start": 6218, + "end": 6434, + "start": 6422, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6230, - "start": 6218, + "end": 6434, + "start": 6422, }, "value": "ModelIDInput", }, @@ -9905,34 +10103,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6269, - "start": 6233, + "end": 6473, + "start": 6437, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6236, - "start": 6233, + "end": 6440, + "start": 6437, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6269, - "start": 6238, + "end": 6473, + "start": 6442, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6268, - "start": 6239, + "end": 6472, + "start": 6443, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6268, - "start": 6239, + "end": 6472, + "start": 6443, }, "value": "ModelPostEditorConditionInput", }, @@ -9945,34 +10143,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6307, - "start": 6272, + "end": 6511, + "start": 6476, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6274, - "start": 6272, + "end": 6478, + "start": 6476, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6307, - "start": 6276, + "end": 6511, + "start": 6480, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6306, - "start": 6277, + "end": 6510, + "start": 6481, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6306, - "start": 6277, + "end": 6510, + "start": 6481, }, "value": "ModelPostEditorConditionInput", }, @@ -9985,28 +10183,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6344, - "start": 6310, + "end": 6548, + "start": 6514, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6313, - "start": 6310, + "end": 6517, + "start": 6514, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6344, - "start": 6315, + "end": 6548, + "start": 6519, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6344, - "start": 6315, + "end": 6548, + "start": 6519, }, "value": "ModelPostEditorConditionInput", }, @@ -10018,44 +10216,110 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6374, - "start": 6347, + "end": 6578, + "start": 6551, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6355, - "start": 6347, + "end": 6559, + "start": 6551, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6374, - "start": 6357, + "end": 6578, + "start": 6561, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6374, - "start": 6357, + "end": 6578, + "start": 6561, }, "value": "ModelBooleanInput", }, }, }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 6608, + "start": 6581, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 6590, + "start": 6581, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 6608, + "start": 6592, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 6608, + "start": 6592, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 6638, + "start": 6611, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 6620, + "start": 6611, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 6638, + "start": 6622, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 6638, + "start": 6622, + }, + "value": "ModelStringInput", + }, + }, + }, ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6376, - "start": 6145, + "end": 6640, + "start": 6349, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6180, - "start": 6151, + "end": 6384, + "start": 6355, }, "value": "ModelPostEditorConditionInput", }, @@ -10070,28 +10334,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6416, - "start": 6410, + "end": 6680, + "start": 6674, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6412, - "start": 6410, + "end": 6676, + "start": 6674, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6416, - "start": 6414, + "end": 6680, + "start": 6678, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6416, - "start": 6414, + "end": 6680, + "start": 6678, }, "value": "ID", }, @@ -10103,34 +10367,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6430, - "start": 6419, + "end": 6694, + "start": 6683, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6425, - "start": 6419, + "end": 6689, + "start": 6683, }, "value": "postID", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6430, - "start": 6427, + "end": 6694, + "start": 6691, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6429, - "start": 6427, + "end": 6693, + "start": 6691, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6429, - "start": 6427, + "end": 6693, + "start": 6691, }, "value": "ID", }, @@ -10143,34 +10407,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6446, - "start": 6433, + "end": 6710, + "start": 6697, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6441, - "start": 6433, + "end": 6705, + "start": 6697, }, "value": "editorID", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6446, - "start": 6443, + "end": 6710, + "start": 6707, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6445, - "start": 6443, + "end": 6709, + "start": 6707, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6445, - "start": 6443, + "end": 6709, + "start": 6707, }, "value": "ID", }, @@ -10183,28 +10447,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6462, - "start": 6449, + "end": 6726, + "start": 6713, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6457, - "start": 6449, + "end": 6721, + "start": 6713, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6462, - "start": 6459, + "end": 6726, + "start": 6723, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6462, - "start": 6459, + "end": 6726, + "start": 6723, }, "value": "Int", }, @@ -10213,14 +10477,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6464, - "start": 6378, + "end": 6728, + "start": 6642, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6405, - "start": 6384, + "end": 6669, + "start": 6648, }, "value": "CreatePostEditorInput", }, @@ -10235,34 +10499,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6505, - "start": 6498, + "end": 6769, + "start": 6762, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6500, - "start": 6498, + "end": 6764, + "start": 6762, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6505, - "start": 6502, + "end": 6769, + "start": 6766, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6504, - "start": 6502, + "end": 6768, + "start": 6766, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6504, - "start": 6502, + "end": 6768, + "start": 6766, }, "value": "ID", }, @@ -10275,28 +10539,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6518, - "start": 6508, + "end": 6782, + "start": 6772, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6514, - "start": 6508, + "end": 6778, + "start": 6772, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6518, - "start": 6516, + "end": 6782, + "start": 6780, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6518, - "start": 6516, + "end": 6782, + "start": 6780, }, "value": "ID", }, @@ -10308,28 +10572,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6533, - "start": 6521, + "end": 6797, + "start": 6785, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6529, - "start": 6521, + "end": 6793, + "start": 6785, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6533, - "start": 6531, + "end": 6797, + "start": 6795, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6533, - "start": 6531, + "end": 6797, + "start": 6795, }, "value": "ID", }, @@ -10341,28 +10605,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6549, - "start": 6536, + "end": 6813, + "start": 6800, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6544, - "start": 6536, + "end": 6808, + "start": 6800, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6549, - "start": 6546, + "end": 6813, + "start": 6810, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6549, - "start": 6546, + "end": 6813, + "start": 6810, }, "value": "Int", }, @@ -10371,14 +10635,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6551, - "start": 6466, + "end": 6815, + "start": 6730, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6493, - "start": 6472, + "end": 6757, + "start": 6736, }, "value": "UpdatePostEditorInput", }, @@ -10393,34 +10657,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6592, - "start": 6585, + "end": 6856, + "start": 6849, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6587, - "start": 6585, + "end": 6851, + "start": 6849, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6592, - "start": 6589, + "end": 6856, + "start": 6853, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6591, - "start": 6589, + "end": 6855, + "start": 6853, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6591, - "start": 6589, + "end": 6855, + "start": 6853, }, "value": "ID", }, @@ -10433,28 +10697,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6608, - "start": 6595, + "end": 6872, + "start": 6859, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6603, - "start": 6595, + "end": 6867, + "start": 6859, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6608, - "start": 6605, + "end": 6872, + "start": 6869, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6608, - "start": 6605, + "end": 6872, + "start": 6869, }, "value": "Int", }, @@ -10463,14 +10727,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6610, - "start": 6553, + "end": 6874, + "start": 6817, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6580, - "start": 6559, + "end": 6844, + "start": 6823, }, "value": "DeletePostEditorInput", }, @@ -10485,28 +10749,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6689, - "start": 6661, + "end": 6953, + "start": 6925, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6663, - "start": 6661, + "end": 6927, + "start": 6925, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6689, - "start": 6665, + "end": 6953, + "start": 6929, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6689, - "start": 6665, + "end": 6953, + "start": 6929, }, "value": "ModelSubscriptionIDInput", }, @@ -10518,28 +10782,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6724, - "start": 6692, + "end": 6988, + "start": 6956, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6698, - "start": 6692, + "end": 6962, + "start": 6956, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6724, - "start": 6700, + "end": 6988, + "start": 6964, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6724, - "start": 6700, + "end": 6988, + "start": 6964, }, "value": "ModelSubscriptionIDInput", }, @@ -10551,28 +10815,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6761, - "start": 6727, + "end": 7025, + "start": 6991, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6735, - "start": 6727, + "end": 6999, + "start": 6991, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6761, - "start": 6737, + "end": 7025, + "start": 7001, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6761, - "start": 6737, + "end": 7025, + "start": 7001, }, "value": "ModelSubscriptionIDInput", }, @@ -10584,34 +10848,100 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6809, - "start": 6764, + "end": 7067, + "start": 7028, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7037, + "start": 7028, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 7067, + "start": 7039, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7067, + "start": 7039, + }, + "value": "ModelSubscriptionStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 7109, + "start": 7070, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6767, - "start": 6764, + "end": 7079, + "start": 7070, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 7109, + "start": 7081, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7109, + "start": 7081, + }, + "value": "ModelSubscriptionStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 7157, + "start": 7112, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7115, + "start": 7112, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6809, - "start": 6769, + "end": 7157, + "start": 7117, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6808, - "start": 6770, + "end": 7156, + "start": 7118, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6808, - "start": 6770, + "end": 7156, + "start": 7118, }, "value": "ModelSubscriptionPostEditorFilterInput", }, @@ -10624,34 +10954,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6856, - "start": 6812, + "end": 7204, + "start": 7160, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6814, - "start": 6812, + "end": 7162, + "start": 7160, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6856, - "start": 6816, + "end": 7204, + "start": 7164, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6855, - "start": 6817, + "end": 7203, + "start": 7165, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6855, - "start": 6817, + "end": 7203, + "start": 7165, }, "value": "ModelSubscriptionPostEditorFilterInput", }, @@ -10664,28 +10994,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 6886, - "start": 6859, + "end": 7234, + "start": 7207, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6867, - "start": 6859, + "end": 7215, + "start": 7207, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6886, - "start": 6869, + "end": 7234, + "start": 7217, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6886, - "start": 6869, + "end": 7234, + "start": 7217, }, "value": "ModelBooleanInput", }, @@ -10694,14 +11024,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 6888, - "start": 6612, + "end": 7236, + "start": 6876, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6656, - "start": 6618, + "end": 6920, + "start": 6882, }, "value": "ModelSubscriptionPostEditorFilterInput", }, @@ -10716,40 +11046,40 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 6933, - "start": 6919, + "end": 7281, + "start": 7267, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6924, - "start": 6919, + "end": 7272, + "start": 7267, }, "value": "items", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 6933, - "start": 6926, + "end": 7281, + "start": 7274, }, "type": Object { "kind": "ListType", "loc": Object { - "end": 6932, - "start": 6926, + "end": 7280, + "start": 7274, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6931, - "start": 6927, + "end": 7279, + "start": 7275, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6931, - "start": 6927, + "end": 7279, + "start": 7275, }, "value": "User", }, @@ -10763,28 +11093,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 6953, - "start": 6936, + "end": 7301, + "start": 7284, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6945, - "start": 6936, + "end": 7293, + "start": 7284, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6953, - "start": 6947, + "end": 7301, + "start": 7295, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6953, - "start": 6947, + "end": 7301, + "start": 7295, }, "value": "String", }, @@ -10796,28 +11126,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 6979, - "start": 6956, + "end": 7327, + "start": 7304, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6965, - "start": 6956, + "end": 7313, + "start": 7304, }, "value": "startedAt", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 6979, - "start": 6967, + "end": 7327, + "start": 7315, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6979, - "start": 6967, + "end": 7327, + "start": 7315, }, "value": "AWSTimestamp", }, @@ -10827,14 +11157,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 6981, - "start": 6890, + "end": 7329, + "start": 7238, }, "name": Object { "kind": "Name", "loc": Object { - "end": 6914, - "start": 6895, + "end": 7262, + "start": 7243, }, "value": "ModelUserConnection", }, @@ -10849,28 +11179,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7030, - "start": 7014, + "end": 7378, + "start": 7362, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7016, - "start": 7014, + "end": 7364, + "start": 7362, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7030, - "start": 7018, + "end": 7378, + "start": 7366, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7030, - "start": 7018, + "end": 7378, + "start": 7366, }, "value": "ModelIDInput", }, @@ -10882,28 +11212,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7059, - "start": 7033, + "end": 7407, + "start": 7381, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7041, - "start": 7033, + "end": 7389, + "start": 7381, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7059, - "start": 7043, + "end": 7407, + "start": 7391, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7059, - "start": 7043, + "end": 7407, + "start": 7391, }, "value": "ModelStringInput", }, @@ -10915,34 +11245,100 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7089, - "start": 7062, + "end": 7437, + "start": 7410, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7065, - "start": 7062, + "end": 7419, + "start": 7410, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 7437, + "start": 7421, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7437, + "start": 7421, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 7467, + "start": 7440, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7449, + "start": 7440, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 7467, + "start": 7451, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7467, + "start": 7451, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 7497, + "start": 7470, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7473, + "start": 7470, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7089, - "start": 7067, + "end": 7497, + "start": 7475, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7088, - "start": 7068, + "end": 7496, + "start": 7476, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7088, - "start": 7068, + "end": 7496, + "start": 7476, }, "value": "ModelUserFilterInput", }, @@ -10955,34 +11351,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7118, - "start": 7092, + "end": 7526, + "start": 7500, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7094, - "start": 7092, + "end": 7502, + "start": 7500, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7118, - "start": 7096, + "end": 7526, + "start": 7504, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7117, - "start": 7097, + "end": 7525, + "start": 7505, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7117, - "start": 7097, + "end": 7525, + "start": 7505, }, "value": "ModelUserFilterInput", }, @@ -10995,28 +11391,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7146, - "start": 7121, + "end": 7554, + "start": 7529, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7124, - "start": 7121, + "end": 7532, + "start": 7529, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7146, - "start": 7126, + "end": 7554, + "start": 7534, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7146, - "start": 7126, + "end": 7554, + "start": 7534, }, "value": "ModelUserFilterInput", }, @@ -11028,28 +11424,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7176, - "start": 7149, + "end": 7584, + "start": 7557, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7157, - "start": 7149, + "end": 7565, + "start": 7557, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7176, - "start": 7159, + "end": 7584, + "start": 7567, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7176, - "start": 7159, + "end": 7584, + "start": 7567, }, "value": "ModelBooleanInput", }, @@ -11058,14 +11454,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7178, - "start": 6983, + "end": 7586, + "start": 7331, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7009, - "start": 6989, + "end": 7357, + "start": 7337, }, "value": "ModelUserFilterInput", }, @@ -11080,28 +11476,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7240, - "start": 7214, + "end": 7648, + "start": 7622, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7222, - "start": 7214, + "end": 7630, + "start": 7622, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7240, - "start": 7224, + "end": 7648, + "start": 7632, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7240, - "start": 7224, + "end": 7648, + "start": 7632, }, "value": "ModelStringInput", }, @@ -11113,34 +11509,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7273, - "start": 7243, + "end": 7681, + "start": 7651, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7246, - "start": 7243, + "end": 7654, + "start": 7651, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7273, - "start": 7248, + "end": 7681, + "start": 7656, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7272, - "start": 7249, + "end": 7680, + "start": 7657, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7272, - "start": 7249, + "end": 7680, + "start": 7657, }, "value": "ModelUserConditionInput", }, @@ -11153,34 +11549,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7305, - "start": 7276, + "end": 7713, + "start": 7684, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7278, - "start": 7276, + "end": 7686, + "start": 7684, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7305, - "start": 7280, + "end": 7713, + "start": 7688, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7304, - "start": 7281, + "end": 7712, + "start": 7689, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7304, - "start": 7281, + "end": 7712, + "start": 7689, }, "value": "ModelUserConditionInput", }, @@ -11193,28 +11589,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7336, - "start": 7308, + "end": 7744, + "start": 7716, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7311, - "start": 7308, + "end": 7719, + "start": 7716, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7336, - "start": 7313, + "end": 7744, + "start": 7721, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7336, - "start": 7313, + "end": 7744, + "start": 7721, }, "value": "ModelUserConditionInput", }, @@ -11226,44 +11622,110 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7366, - "start": 7339, + "end": 7774, + "start": 7747, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7347, - "start": 7339, + "end": 7755, + "start": 7747, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7366, - "start": 7349, + "end": 7774, + "start": 7757, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7366, - "start": 7349, + "end": 7774, + "start": 7757, }, "value": "ModelBooleanInput", }, }, }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 7804, + "start": 7777, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7786, + "start": 7777, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 7804, + "start": 7788, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7804, + "start": 7788, + }, + "value": "ModelStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 7834, + "start": 7807, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7816, + "start": 7807, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 7834, + "start": 7818, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 7834, + "start": 7818, + }, + "value": "ModelStringInput", + }, + }, + }, ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7368, - "start": 7180, + "end": 7836, + "start": 7588, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7209, - "start": 7186, + "end": 7617, + "start": 7594, }, "value": "ModelUserConditionInput", }, @@ -11278,28 +11740,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7402, - "start": 7396, + "end": 7870, + "start": 7864, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7398, - "start": 7396, + "end": 7866, + "start": 7864, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7402, - "start": 7400, + "end": 7870, + "start": 7868, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7402, - "start": 7400, + "end": 7870, + "start": 7868, }, "value": "ID", }, @@ -11311,34 +11773,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7422, - "start": 7405, + "end": 7890, + "start": 7873, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7413, - "start": 7405, + "end": 7881, + "start": 7873, }, "value": "username", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 7422, - "start": 7415, + "end": 7890, + "start": 7883, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7421, - "start": 7415, + "end": 7889, + "start": 7883, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7421, - "start": 7415, + "end": 7889, + "start": 7883, }, "value": "String", }, @@ -11351,28 +11813,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7438, - "start": 7425, + "end": 7906, + "start": 7893, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7433, - "start": 7425, + "end": 7901, + "start": 7893, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7438, - "start": 7435, + "end": 7906, + "start": 7903, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7438, - "start": 7435, + "end": 7906, + "start": 7903, }, "value": "Int", }, @@ -11381,14 +11843,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7440, - "start": 7370, + "end": 7908, + "start": 7838, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7391, - "start": 7376, + "end": 7859, + "start": 7844, }, "value": "CreateUserInput", }, @@ -11403,34 +11865,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7475, - "start": 7468, + "end": 7943, + "start": 7936, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7470, - "start": 7468, + "end": 7938, + "start": 7936, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 7475, - "start": 7472, + "end": 7943, + "start": 7940, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7474, - "start": 7472, + "end": 7942, + "start": 7940, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7474, - "start": 7472, + "end": 7942, + "start": 7940, }, "value": "ID", }, @@ -11443,28 +11905,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7494, - "start": 7478, + "end": 7962, + "start": 7946, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7486, - "start": 7478, + "end": 7954, + "start": 7946, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7494, - "start": 7488, + "end": 7962, + "start": 7956, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7494, - "start": 7488, + "end": 7962, + "start": 7956, }, "value": "String", }, @@ -11476,28 +11938,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7510, - "start": 7497, + "end": 7978, + "start": 7965, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7505, - "start": 7497, + "end": 7973, + "start": 7965, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7510, - "start": 7507, + "end": 7978, + "start": 7975, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7510, - "start": 7507, + "end": 7978, + "start": 7975, }, "value": "Int", }, @@ -11506,14 +11968,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7512, - "start": 7442, + "end": 7980, + "start": 7910, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7463, - "start": 7448, + "end": 7931, + "start": 7916, }, "value": "UpdateUserInput", }, @@ -11528,34 +11990,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7547, - "start": 7540, + "end": 8015, + "start": 8008, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7542, - "start": 7540, + "end": 8010, + "start": 8008, }, "value": "id", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 7547, - "start": 7544, + "end": 8015, + "start": 8012, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7546, - "start": 7544, + "end": 8014, + "start": 8012, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7546, - "start": 7544, + "end": 8014, + "start": 8012, }, "value": "ID", }, @@ -11568,28 +12030,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7563, - "start": 7550, + "end": 8031, + "start": 8018, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7558, - "start": 7550, + "end": 8026, + "start": 8018, }, "value": "_version", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7563, - "start": 7560, + "end": 8031, + "start": 8028, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7563, - "start": 7560, + "end": 8031, + "start": 8028, }, "value": "Int", }, @@ -11598,14 +12060,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7565, - "start": 7514, + "end": 8033, + "start": 7982, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7535, - "start": 7520, + "end": 8003, + "start": 7988, }, "value": "DeleteUserInput", }, @@ -11620,28 +12082,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7638, - "start": 7610, + "end": 8106, + "start": 8078, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7612, - "start": 7610, + "end": 8080, + "start": 8078, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7638, - "start": 7614, + "end": 8106, + "start": 8082, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7638, - "start": 7614, + "end": 8106, + "start": 8082, }, "value": "ModelSubscriptionIDInput", }, @@ -11653,28 +12115,61 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7679, - "start": 7641, + "end": 8147, + "start": 8109, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7649, - "start": 7641, + "end": 8117, + "start": 8109, }, "value": "username", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7679, - "start": 7651, + "end": 8147, + "start": 8119, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 8147, + "start": 8119, + }, + "value": "ModelSubscriptionStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 8189, + "start": 8150, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 8159, + "start": 8150, + }, + "value": "createdAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 8189, + "start": 8161, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7679, - "start": 7651, + "end": 8189, + "start": 8161, }, "value": "ModelSubscriptionStringInput", }, @@ -11686,34 +12181,67 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7721, - "start": 7682, + "end": 8231, + "start": 8192, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7685, - "start": 7682, + "end": 8201, + "start": 8192, + }, + "value": "updatedAt", + }, + "type": Object { + "kind": "NamedType", + "loc": Object { + "end": 8231, + "start": 8203, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 8231, + "start": 8203, + }, + "value": "ModelSubscriptionStringInput", + }, + }, + }, + Object { + "defaultValue": undefined, + "description": undefined, + "directives": Array [], + "kind": "InputValueDefinition", + "loc": Object { + "end": 8273, + "start": 8234, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 8237, + "start": 8234, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7721, - "start": 7687, + "end": 8273, + "start": 8239, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7720, - "start": 7688, + "end": 8272, + "start": 8240, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7720, - "start": 7688, + "end": 8272, + "start": 8240, }, "value": "ModelSubscriptionUserFilterInput", }, @@ -11726,34 +12254,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7762, - "start": 7724, + "end": 8314, + "start": 8276, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7726, - "start": 7724, + "end": 8278, + "start": 8276, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7762, - "start": 7728, + "end": 8314, + "start": 8280, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7761, - "start": 7729, + "end": 8313, + "start": 8281, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7761, - "start": 7729, + "end": 8313, + "start": 8281, }, "value": "ModelSubscriptionUserFilterInput", }, @@ -11766,28 +12294,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7792, - "start": 7765, + "end": 8344, + "start": 8317, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7773, - "start": 7765, + "end": 8325, + "start": 8317, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7792, - "start": 7775, + "end": 8344, + "start": 8327, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7792, - "start": 7775, + "end": 8344, + "start": 8327, }, "value": "ModelBooleanInput", }, @@ -11796,14 +12324,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7794, - "start": 7567, + "end": 8346, + "start": 8035, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7605, - "start": 7573, + "end": 8073, + "start": 8041, }, "value": "ModelSubscriptionUserFilterInput", }, @@ -11818,28 +12346,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7837, - "start": 7831, + "end": 8389, + "start": 8383, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7833, - "start": 7831, + "end": 8385, + "start": 8383, }, "value": "eq", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7837, - "start": 7835, + "end": 8389, + "start": 8387, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7837, - "start": 7835, + "end": 8389, + "start": 8387, }, "value": "ID", }, @@ -11851,28 +12379,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7846, - "start": 7840, + "end": 8398, + "start": 8392, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7842, - "start": 7840, + "end": 8394, + "start": 8392, }, "value": "le", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7846, - "start": 7844, + "end": 8398, + "start": 8396, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7846, - "start": 7844, + "end": 8398, + "start": 8396, }, "value": "ID", }, @@ -11884,28 +12412,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7855, - "start": 7849, + "end": 8407, + "start": 8401, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7851, - "start": 7849, + "end": 8403, + "start": 8401, }, "value": "lt", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7855, - "start": 7853, + "end": 8407, + "start": 8405, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7855, - "start": 7853, + "end": 8407, + "start": 8405, }, "value": "ID", }, @@ -11917,28 +12445,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7864, - "start": 7858, + "end": 8416, + "start": 8410, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7860, - "start": 7858, + "end": 8412, + "start": 8410, }, "value": "ge", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7864, - "start": 7862, + "end": 8416, + "start": 8414, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7864, - "start": 7862, + "end": 8416, + "start": 8414, }, "value": "ID", }, @@ -11950,28 +12478,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7873, - "start": 7867, + "end": 8425, + "start": 8419, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7869, - "start": 7867, + "end": 8421, + "start": 8419, }, "value": "gt", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7873, - "start": 7871, + "end": 8425, + "start": 8423, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7873, - "start": 7871, + "end": 8425, + "start": 8423, }, "value": "ID", }, @@ -11983,34 +12511,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7889, - "start": 7876, + "end": 8441, + "start": 8428, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7883, - "start": 7876, + "end": 8435, + "start": 8428, }, "value": "between", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7889, - "start": 7885, + "end": 8441, + "start": 8437, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7888, - "start": 7886, + "end": 8440, + "start": 8438, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7888, - "start": 7886, + "end": 8440, + "start": 8438, }, "value": "ID", }, @@ -12023,28 +12551,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 7906, - "start": 7892, + "end": 8458, + "start": 8444, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7902, - "start": 7892, + "end": 8454, + "start": 8444, }, "value": "beginsWith", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7906, - "start": 7904, + "end": 8458, + "start": 8456, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7906, - "start": 7904, + "end": 8458, + "start": 8456, }, "value": "ID", }, @@ -12053,14 +12581,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 7908, - "start": 7796, + "end": 8460, + "start": 8348, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7826, - "start": 7802, + "end": 8378, + "start": 8354, }, "value": "ModelIDKeyConditionInput", }, @@ -12075,40 +12603,40 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 7965, - "start": 7945, + "end": 8517, + "start": 8497, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7950, - "start": 7945, + "end": 8502, + "start": 8497, }, "value": "items", }, "type": Object { "kind": "NonNullType", "loc": Object { - "end": 7965, - "start": 7952, + "end": 8517, + "start": 8504, }, "type": Object { "kind": "ListType", "loc": Object { - "end": 7964, - "start": 7952, + "end": 8516, + "start": 8504, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7963, - "start": 7953, + "end": 8515, + "start": 8505, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7963, - "start": 7953, + "end": 8515, + "start": 8505, }, "value": "PostEditor", }, @@ -12122,28 +12650,28 @@ Object { "directives": Array [], "kind": "FieldDefinition", "loc": Object { - "end": 7985, - "start": 7968, + "end": 8537, + "start": 8520, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7977, - "start": 7968, + "end": 8529, + "start": 8520, }, "value": "nextToken", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 7985, - "start": 7979, + "end": 8537, + "start": 8531, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7985, - "start": 7979, + "end": 8537, + "start": 8531, }, "value": "String", }, @@ -12153,14 +12681,14 @@ Object { "interfaces": Array [], "kind": "ObjectTypeDefinition", "loc": Object { - "end": 7987, - "start": 7910, + "end": 8539, + "start": 8462, }, "name": Object { "kind": "Name", "loc": Object { - "end": 7940, - "start": 7915, + "end": 8492, + "start": 8467, }, "value": "ModelPostEditorConnection", }, @@ -12175,28 +12703,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8042, - "start": 8026, + "end": 8594, + "start": 8578, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8028, - "start": 8026, + "end": 8580, + "start": 8578, }, "value": "id", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8042, - "start": 8030, + "end": 8594, + "start": 8582, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8042, - "start": 8030, + "end": 8594, + "start": 8582, }, "value": "ModelIDInput", }, @@ -12208,28 +12736,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8065, - "start": 8045, + "end": 8617, + "start": 8597, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8051, - "start": 8045, + "end": 8603, + "start": 8597, }, "value": "postID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8065, - "start": 8053, + "end": 8617, + "start": 8605, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8065, - "start": 8053, + "end": 8617, + "start": 8605, }, "value": "ModelIDInput", }, @@ -12241,28 +12769,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8090, - "start": 8068, + "end": 8642, + "start": 8620, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8076, - "start": 8068, + "end": 8628, + "start": 8620, }, "value": "editorID", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8090, - "start": 8078, + "end": 8642, + "start": 8630, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8090, - "start": 8078, + "end": 8642, + "start": 8630, }, "value": "ModelIDInput", }, @@ -12274,34 +12802,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8126, - "start": 8093, + "end": 8678, + "start": 8645, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8096, - "start": 8093, + "end": 8648, + "start": 8645, }, "value": "and", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 8126, - "start": 8098, + "end": 8678, + "start": 8650, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8125, - "start": 8099, + "end": 8677, + "start": 8651, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8125, - "start": 8099, + "end": 8677, + "start": 8651, }, "value": "ModelPostEditorFilterInput", }, @@ -12314,34 +12842,34 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8161, - "start": 8129, + "end": 8713, + "start": 8681, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8131, - "start": 8129, + "end": 8683, + "start": 8681, }, "value": "or", }, "type": Object { "kind": "ListType", "loc": Object { - "end": 8161, - "start": 8133, + "end": 8713, + "start": 8685, }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8160, - "start": 8134, + "end": 8712, + "start": 8686, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8160, - "start": 8134, + "end": 8712, + "start": 8686, }, "value": "ModelPostEditorFilterInput", }, @@ -12354,28 +12882,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8195, - "start": 8164, + "end": 8747, + "start": 8716, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8167, - "start": 8164, + "end": 8719, + "start": 8716, }, "value": "not", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8195, - "start": 8169, + "end": 8747, + "start": 8721, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8195, - "start": 8169, + "end": 8747, + "start": 8721, }, "value": "ModelPostEditorFilterInput", }, @@ -12387,28 +12915,28 @@ Object { "directives": Array [], "kind": "InputValueDefinition", "loc": Object { - "end": 8225, - "start": 8198, + "end": 8777, + "start": 8750, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8206, - "start": 8198, + "end": 8758, + "start": 8750, }, "value": "_deleted", }, "type": Object { "kind": "NamedType", "loc": Object { - "end": 8225, - "start": 8208, + "end": 8777, + "start": 8760, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8225, - "start": 8208, + "end": 8777, + "start": 8760, }, "value": "ModelBooleanInput", }, @@ -12417,14 +12945,14 @@ Object { ], "kind": "InputObjectTypeDefinition", "loc": Object { - "end": 8227, - "start": 7989, + "end": 8779, + "start": 8541, }, "name": Object { "kind": "Name", "loc": Object { - "end": 8021, - "start": 7995, + "end": 8573, + "start": 8547, }, "value": "ModelPostEditorFilterInput", }, @@ -12432,7 +12960,7 @@ Object { ], "kind": "Document", "loc": Object { - "end": 8228, + "end": 8780, "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 24d972096b..a33560f6c9 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 @@ -187,6 +187,8 @@ type ModelModelAConnection { input ModelModelAFilterInput { id: ModelIDInput sortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelAFilterInput] or: [ModelModelAFilterInput] not: ModelModelAFilterInput @@ -205,6 +207,8 @@ input ModelModelAConditionInput { and: [ModelModelAConditionInput] or: [ModelModelAConditionInput] not: ModelModelAConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelAInput { @@ -237,6 +241,8 @@ type Mutation { input ModelSubscriptionModelAFilterInput { id: ModelSubscriptionIDInput sortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelAFilterInput] or: [ModelSubscriptionModelAFilterInput] } @@ -261,6 +267,8 @@ type ModelModelBConnection { input ModelModelBFilterInput { id: ModelIDInput sortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelBFilterInput] or: [ModelModelBFilterInput] not: ModelModelBFilterInput @@ -270,6 +278,8 @@ input ModelModelBConditionInput { and: [ModelModelBConditionInput] or: [ModelModelBConditionInput] not: ModelModelBConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelBInput { @@ -290,6 +300,8 @@ input DeleteModelBInput { input ModelSubscriptionModelBFilterInput { id: ModelSubscriptionIDInput sortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelBFilterInput] or: [ModelSubscriptionModelBFilterInput] } @@ -305,6 +317,8 @@ input ModelModelAModelBFilterInput { modelAsortId: ModelIDInput modelBID: ModelIDInput modelBsortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelAModelBFilterInput] or: [ModelModelAModelBFilterInput] not: ModelModelAModelBFilterInput @@ -318,6 +332,8 @@ input ModelModelAModelBConditionInput { and: [ModelModelAModelBConditionInput] or: [ModelModelAModelBConditionInput] not: ModelModelAModelBConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelAModelBInput { @@ -346,6 +362,8 @@ input ModelSubscriptionModelAModelBFilterInput { modelAsortId: ModelSubscriptionIDInput modelBID: ModelSubscriptionIDInput modelBsortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelAModelBFilterInput] or: [ModelSubscriptionModelAModelBFilterInput] } @@ -3471,6 +3489,8 @@ input ModelModelAFilterInput { id: ModelIDInput sortId: ModelIDInput secondSortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelAFilterInput] or: [ModelModelAFilterInput] not: ModelModelAFilterInput @@ -3489,6 +3509,8 @@ input ModelModelAConditionInput { and: [ModelModelAConditionInput] or: [ModelModelAConditionInput] not: ModelModelAConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelAInput { @@ -3525,6 +3547,8 @@ input ModelSubscriptionModelAFilterInput { id: ModelSubscriptionIDInput sortId: ModelSubscriptionIDInput secondSortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelAFilterInput] or: [ModelSubscriptionModelAFilterInput] } @@ -3549,6 +3573,8 @@ type ModelModelBConnection { input ModelModelBFilterInput { id: ModelIDInput sortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelBFilterInput] or: [ModelModelBFilterInput] not: ModelModelBFilterInput @@ -3558,6 +3584,8 @@ input ModelModelBConditionInput { and: [ModelModelBConditionInput] or: [ModelModelBConditionInput] not: ModelModelBConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelBInput { @@ -3578,6 +3606,8 @@ input DeleteModelBInput { input ModelSubscriptionModelBFilterInput { id: ModelSubscriptionIDInput sortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelBFilterInput] or: [ModelSubscriptionModelBFilterInput] } @@ -3594,6 +3624,8 @@ input ModelModelAModelBFilterInput { modelAsecondSortId: ModelIDInput modelBID: ModelIDInput modelBsortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelAModelBFilterInput] or: [ModelModelAModelBFilterInput] not: ModelModelAModelBFilterInput @@ -3608,6 +3640,8 @@ input ModelModelAModelBConditionInput { and: [ModelModelAModelBConditionInput] or: [ModelModelAModelBConditionInput] not: ModelModelAModelBConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelAModelBInput { @@ -3639,6 +3673,8 @@ input ModelSubscriptionModelAModelBFilterInput { modelAsecondSortId: ModelSubscriptionIDInput modelBID: ModelSubscriptionIDInput modelBsortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelAModelBFilterInput] or: [ModelSubscriptionModelAModelBFilterInput] } @@ -3870,6 +3906,8 @@ type ModelModelAConnection { input ModelModelAFilterInput { id: ModelIDInput sortId: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelAFilterInput] or: [ModelModelAFilterInput] not: ModelModelAFilterInput @@ -3888,6 +3926,8 @@ input ModelModelAConditionInput { and: [ModelModelAConditionInput] or: [ModelModelAConditionInput] not: ModelModelAConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelAInput { @@ -3920,6 +3960,8 @@ type Mutation { input ModelSubscriptionModelAFilterInput { id: ModelSubscriptionIDInput sortId: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelAFilterInput] or: [ModelSubscriptionModelAFilterInput] } @@ -3943,6 +3985,8 @@ type ModelModelBConnection { input ModelModelBFilterInput { id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelBFilterInput] or: [ModelModelBFilterInput] not: ModelModelBFilterInput @@ -3952,6 +3996,8 @@ input ModelModelBConditionInput { and: [ModelModelBConditionInput] or: [ModelModelBConditionInput] not: ModelModelBConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelBInput { @@ -3968,6 +4014,8 @@ input DeleteModelBInput { input ModelSubscriptionModelBFilterInput { id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelBFilterInput] or: [ModelSubscriptionModelBFilterInput] } @@ -3982,6 +4030,8 @@ input ModelModelAModelBFilterInput { modelAID: ModelIDInput modelAsortId: ModelIDInput modelBID: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelModelAModelBFilterInput] or: [ModelModelAModelBFilterInput] not: ModelModelAModelBFilterInput @@ -3994,6 +4044,8 @@ input ModelModelAModelBConditionInput { and: [ModelModelAModelBConditionInput] or: [ModelModelAModelBConditionInput] not: ModelModelAModelBConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateModelAModelBInput { @@ -4019,6 +4071,8 @@ input ModelSubscriptionModelAModelBFilterInput { modelAID: ModelSubscriptionIDInput modelAsortId: ModelSubscriptionIDInput modelBID: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionModelAModelBFilterInput] or: [ModelSubscriptionModelAModelBFilterInput] } @@ -4217,6 +4271,8 @@ type ModelFooConnection { input ModelFooFilterInput { id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelFooFilterInput] or: [ModelFooFilterInput] not: ModelFooFilterInput @@ -4235,6 +4291,8 @@ input ModelFooConditionInput { and: [ModelFooConditionInput] or: [ModelFooConditionInput] not: ModelFooConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateFooInput { @@ -4263,6 +4321,8 @@ type Mutation { input ModelSubscriptionFooFilterInput { id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionFooFilterInput] or: [ModelSubscriptionFooFilterInput] } @@ -4286,6 +4346,8 @@ type ModelBarConnection { input ModelBarFilterInput { id: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelBarFilterInput] or: [ModelBarFilterInput] not: ModelBarFilterInput @@ -4295,6 +4357,8 @@ input ModelBarConditionInput { and: [ModelBarConditionInput] or: [ModelBarConditionInput] not: ModelBarConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateBarInput { @@ -4311,6 +4375,8 @@ input DeleteBarInput { input ModelSubscriptionBarFilterInput { id: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionBarFilterInput] or: [ModelSubscriptionBarFilterInput] } @@ -4324,6 +4390,8 @@ input ModelFooBarFilterInput { id: ModelIDInput fooID: ModelIDInput barID: ModelIDInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelFooBarFilterInput] or: [ModelFooBarFilterInput] not: ModelFooBarFilterInput @@ -4335,6 +4403,8 @@ input ModelFooBarConditionInput { and: [ModelFooBarConditionInput] or: [ModelFooBarConditionInput] not: ModelFooBarConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateFooBarInput { @@ -4357,6 +4427,8 @@ input ModelSubscriptionFooBarFilterInput { id: ModelSubscriptionIDInput fooID: ModelSubscriptionIDInput barID: ModelSubscriptionIDInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionFooBarFilterInput] or: [ModelSubscriptionFooBarFilterInput] } diff --git a/packages/amplify-graphql-relational-transformer/src/__tests__/amplify-graphql-relations-with-custom-primary-key.test.ts b/packages/amplify-graphql-relational-transformer/src/__tests__/amplify-graphql-relations-with-custom-primary-key.test.ts index ab03e15958..09dcd1b2f9 100644 --- a/packages/amplify-graphql-relational-transformer/src/__tests__/amplify-graphql-relations-with-custom-primary-key.test.ts +++ b/packages/amplify-graphql-relational-transformer/src/__tests__/amplify-graphql-relations-with-custom-primary-key.test.ts @@ -208,11 +208,15 @@ describe('custom primary key and relational directives', () => { const medicalAppointmentUpdateInput = schema.definitions.find( (def: any) => def.name && def.name.value === 'UpdateMedicalAppointmentInput', ) as any; + const medicalAppointmentSubscriptionFilterInput = schema.definitions.find( + (def: any) => def.name && def.name.value === 'ModelSubscriptionMedicalAppointmentFilterInput', + ) as any; expect(medicalAppointmentFilterInput).toBeDefined(); expect(medicalAppointmentConditionInput).toBeDefined(); expect(medicalAppointmentCreateInput).toBeDefined(); expect(medicalAppointmentUpdateInput).toBeDefined(); + expect(medicalAppointmentSubscriptionFilterInput).toBeDefined(); const inputs = [ medicalAppointmentFilterInput, @@ -230,6 +234,24 @@ describe('custom primary key and relational directives', () => { expect(givenNameInputField).toBeDefined(); expect(familyNameInputField).toBeDefined(); }); + + // test subscription filter input has correct types + const ssnInputField = medicalAppointmentSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'medicalAppointmentPatientSsn', + ); + const givenNameInputField = medicalAppointmentSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'medicalAppointmentPatientGivenName', + ); + const familyNameInputField = medicalAppointmentSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'medicalAppointmentPatientFamilyName', + ); + + expect(ssnInputField).toBeDefined(); + expect(ssnInputField.type.name.value).toEqual('ModelSubscriptionIDInput'); + expect(givenNameInputField).toBeDefined(); + expect(givenNameInputField.type.name.value).toEqual('ModelSubscriptionStringInput'); + expect(familyNameInputField).toBeDefined(); + expect(familyNameInputField.type.name.value).toEqual('ModelSubscriptionStringInput'); }); it('adds belongsTo sortKeyFields connection fields', () => { @@ -285,11 +307,15 @@ describe('custom primary key and relational directives', () => { const patientConditionInput = schema.definitions.find((def: any) => def.name && def.name.value === 'ModelPatientConditionInput') as any; const patientCreateInput = schema.definitions.find((def: any) => def.name && def.name.value === 'CreatePatientInput') as any; const patientUpdateInput = schema.definitions.find((def: any) => def.name && def.name.value === 'UpdatePatientInput') as any; + const patientSubscriptionFilterInput = schema.definitions.find( + (def: any) => def.name && def.name.value === 'ModelSubscriptionPatientFilterInput', + ) as any; expect(patientFilterInput).toBeDefined(); expect(patientConditionInput).toBeDefined(); expect(patientCreateInput).toBeDefined(); expect(patientUpdateInput).toBeDefined(); + expect(patientSubscriptionFilterInput).toBeDefined(); const inputs = [patientFilterInput, patientConditionInput, patientCreateInput, patientUpdateInput]; @@ -300,6 +326,19 @@ describe('custom primary key and relational directives', () => { expect(primaryKeyConnectionField).toBeDefined(); expect(sortKeyConnectionField).toBeDefined(); }); + + // test subscription filter input has correct types + const primaryKeyConnectionField = patientSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'patientMedicalAppointmentAppointmentReference', + ); + const sortKeyConnectionField = patientSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'patientMedicalAppointmentProvider', + ); + + expect(primaryKeyConnectionField).toBeDefined(); + expect(primaryKeyConnectionField.type.name.value).toEqual('ModelSubscriptionIDInput'); + expect(sortKeyConnectionField).toBeDefined(); + expect(sortKeyConnectionField.type.name.value).toEqual('ModelSubscriptionStringInput'); }); it('adds hasMany sortKeyFields connection fields', () => { @@ -357,11 +396,15 @@ describe('custom primary key and relational directives', () => { const medicalAppointmentUpdateInput = schema.definitions.find( (def: any) => def.name && def.name.value === 'UpdateMedicalAppointmentInput', ) as any; + const medicalAppointmentSubscriptionFilterInput = schema.definitions.find( + (def: any) => def.name && def.name.value === 'ModelSubscriptionPatientFilterInput', + ) as any; expect(medicalAppointmentFilterInput).toBeDefined(); expect(medicalAppointmentConditionInput).toBeDefined(); expect(medicalAppointmentCreateInput).toBeDefined(); expect(medicalAppointmentUpdateInput).toBeDefined(); + expect(medicalAppointmentSubscriptionFilterInput).toBeDefined(); const inputs = [ medicalAppointmentFilterInput, @@ -379,6 +422,24 @@ describe('custom primary key and relational directives', () => { expect(givenNameInputField).toBeDefined(); expect(familyNameInputField).toBeDefined(); }); + + // test subscription filter input has correct types + const ssnInputField = medicalAppointmentSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'patientMedicalAppointmentsSsn', + ); + const givenNameInputField = medicalAppointmentSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'patientMedicalAppointmentsGivenName', + ); + const familyNameInputField = medicalAppointmentSubscriptionFilterInput.fields.find( + (f: any) => f.name.value === 'patientMedicalAppointmentsFamilyName', + ); + + expect(ssnInputField).toBeDefined(); + expect(ssnInputField.type.name.value).toEqual('ModelSubscriptionIDInput'); + expect(givenNameInputField).toBeDefined(); + expect(givenNameInputField.type.name.value).toEqual('ModelSubscriptionStringInput'); + expect(familyNameInputField).toBeDefined(); + expect(familyNameInputField.type.name.value).toEqual('ModelSubscriptionStringInput'); }); it('uses primary key name for hasOne relational connection field old naming convention', () => { diff --git a/packages/amplify-graphql-relational-transformer/src/schema.ts b/packages/amplify-graphql-relational-transformer/src/schema.ts index ecdf2d1106..af54edf575 100644 --- a/packages/amplify-graphql-relational-transformer/src/schema.ts +++ b/packages/amplify-graphql-relational-transformer/src/schema.ts @@ -33,7 +33,7 @@ import { toUpper, wrapNonNull, } from 'graphql-transformer-common'; -import { getSortKeyFieldNames } from '@aws-amplify/graphql-transformer-core'; +import { getSortKeyFieldNames, getSubscriptionFilterInputName } from '@aws-amplify/graphql-transformer-core'; import { WritableDraft } from 'immer/dist/types/types-external'; import { BelongsToDirectiveConfiguration, @@ -226,6 +226,21 @@ export const ensureHasOneConnectionField = (config: HasOneDirectiveConfiguration ); } + const subscriptionFilterInputName = getSubscriptionFilterInputName(object.name.value); + const filterSubscriptionInput = ctx.output.getType(subscriptionFilterInputName) as InputObjectTypeDefinitionNode; + if (filterSubscriptionInput) { + updateFilterConnectionInputWithConnectionFields( + ctx, + filterSubscriptionInput, + object, + connectionAttributeName, + primaryKeyConnectionFieldType, + field, + sortKeyFields, + true, + ); + } + config.connectionFields.push(connectionAttributeName); config.connectionFields.push( ...getSortKeyFieldNames(relatedType).map((it) => getSortKeyConnectionAttributeName(object.name.value, field.name.value, it)), @@ -366,6 +381,21 @@ export const ensureHasManyConnectionField = ( sortKeyFields, ); } + + const subscriptionFilterInputName = getSubscriptionFilterInputName(object.name.value); + const filterSubscriptionInput = ctx.output.getType(subscriptionFilterInputName) as InputObjectTypeDefinitionNode; + if (filterSubscriptionInput) { + updateFilterConnectionInputWithConnectionFields( + ctx, + filterSubscriptionInput, + object, + connectionAttributeName, + primaryKeyConnectionFieldType, + field, + sortKeyFields, + true, + ); + } }; const getTypeFieldsWithConnectionField = ( @@ -634,13 +664,14 @@ const updateFilterConnectionInputWithConnectionFields = ( primaryKeyConnectionFieldType: string, field: FieldDefinitionNode, sortKeyFields: FieldDefinitionNode[], + isSubscriptionFilter = false, ): void => { const updatedFields = [...input.fields!]; updatedFields.push( ...getFilterConnectionInputFieldsWithConnectionField( updatedFields, connectionAttributeName, - generateModelScalarFilterInputName(primaryKeyConnectionFieldType, false), + generateModelScalarFilterInputName(primaryKeyConnectionFieldType, false, isSubscriptionFilter), ), ); sortKeyFields.forEach((it) => { @@ -648,7 +679,7 @@ const updateFilterConnectionInputWithConnectionFields = ( ...getFilterConnectionInputFieldsWithConnectionField( updatedFields, getSortKeyConnectionAttributeName(object.name.value, field.name.value, it.name.value), - generateModelScalarFilterInputName(getBaseType(it.type), false), + generateModelScalarFilterInputName(getBaseType(it.type), false, isSubscriptionFilter), ), ); }); 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 ae6c2b49b9..0b8d85304f 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 @@ -213,6 +213,8 @@ input ModelEmployeeFilterInput { firstName: ModelStringInput lastName: ModelStringInput type: ModelEmploymentTypeInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelEmployeeFilterInput] or: [ModelEmployeeFilterInput] not: ModelEmployeeFilterInput @@ -225,6 +227,8 @@ input ModelEmployeeConditionInput { and: [ModelEmployeeConditionInput] or: [ModelEmployeeConditionInput] not: ModelEmployeeConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateEmployeeInput { @@ -256,6 +260,8 @@ input ModelSubscriptionEmployeeFilterInput { firstName: ModelSubscriptionStringInput lastName: ModelSubscriptionStringInput type: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionEmployeeFilterInput] or: [ModelSubscriptionEmployeeFilterInput] } @@ -1954,6 +1960,8 @@ type ModelUserConnection { input ModelUserFilterInput { id: ModelIDInput name: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput and: [ModelUserFilterInput] or: [ModelUserFilterInput] not: ModelUserFilterInput @@ -1964,6 +1972,8 @@ input ModelUserConditionInput { and: [ModelUserConditionInput] or: [ModelUserConditionInput] not: ModelUserConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput } input CreateUserInput { @@ -1983,6 +1993,8 @@ input DeleteUserInput { input ModelSubscriptionUserFilterInput { id: ModelSubscriptionIDInput name: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput and: [ModelSubscriptionUserFilterInput] or: [ModelSubscriptionUserFilterInput] } diff --git a/packages/amplify-graphql-transformer-core/API.md b/packages/amplify-graphql-transformer-core/API.md index 5186151983..e151c4f13d 100644 --- a/packages/amplify-graphql-transformer-core/API.md +++ b/packages/amplify-graphql-transformer-core/API.md @@ -199,6 +199,12 @@ export type GetArgumentsOptions = { deepMergeArguments?: boolean; }; +// @public (undocumented) +export const getConditionInputName: (modelName: string) => string; + +// @public (undocumented) +export const getConnectionName: (modelName: string) => string; + // @public (undocumented) export const getDefaultStrategyNameForDbType: (dbType: ModelDataSourceStrategySqlDbType) => string; @@ -207,6 +213,9 @@ export const getDefaultStrategyNameForDbType: (dbType: ModelDataSourceStrategySq // @public (undocumented) export const getFieldNameFor: (op: Operation, typeName: string) => string; +// @public (undocumented) +export const getFilterInputName: (modelName: string) => string; + // @public (undocumented) export const getImportedRDSTypeFromStrategyDbType: (dbType: ModelDataSourceStrategyDbType) => ImportedRDSType; @@ -243,6 +252,9 @@ export const getSortKeyFieldNames: (type: ObjectTypeDefinitionNode) => string[]; // @public (undocumented) export const getStrategyDbTypeFromTypeNode: (type: TypeNode, ctx: TransformerContextProvider) => ModelDataSourceStrategyDbType; +// @public (undocumented) +export const getSubscriptionFilterInputName: (modelName: string) => string; + // @public (undocumented) function getSyncConfig(ctx: TransformerTransformSchemaStepContextProvider, typeName: string): SyncConfig | undefined; diff --git a/packages/amplify-graphql-transformer-core/src/__tests__/transformer-context/output.test.ts b/packages/amplify-graphql-transformer-core/src/__tests__/transformer-context/output.test.ts index 3b98248511..2a0c8eb85d 100644 --- a/packages/amplify-graphql-transformer-core/src/__tests__/transformer-context/output.test.ts +++ b/packages/amplify-graphql-transformer-core/src/__tests__/transformer-context/output.test.ts @@ -1,4 +1,6 @@ import { Kind, DocumentNode } from 'graphql'; +import { makeInputValueDefinition, makeNamedType } from 'graphql-transformer-common'; +import { InputObjectDefinitionWrapper, InputFieldWrapper } from '@aws-amplify/graphql-transformer-core'; import { TransformerOutput } from '../../transformer-context/output'; import { DEFAULT_SCHEMA_DEFINITION, @@ -106,19 +108,18 @@ describe('TransformerOutput', () => { }; expect(() => new TransformerOutput(inputDocument)).not.toThrow(); }); + const inputDocumentWithNoOperations: DocumentNode = { + kind: Kind.DOCUMENT, + definitions: [ + { + kind: Kind.SCHEMA_DEFINITION, + directives: [], + operationTypes: [], + }, + ], + }; describe('add default operations', () => { - const inputDocumentWithNoOperations: DocumentNode = { - kind: Kind.DOCUMENT, - definitions: [ - { - kind: Kind.SCHEMA_DEFINITION, - directives: [], - operationTypes: [], - }, - ], - }; - const inputDocumentWithAllOperations: DocumentNode = { kind: Kind.DOCUMENT, definitions: [DEFAULT_SCHEMA_DEFINITION], @@ -202,4 +203,33 @@ describe('TransformerOutput', () => { expect(output.getSubscriptionTypeName()).toEqual('Subscription'); }); }); + + test('adds and gets input', () => { + const output = new TransformerOutput(inputDocumentWithNoOperations); + const input = InputObjectDefinitionWrapper.create('myinput'); + const inputField = InputFieldWrapper.create('owner', 'ModelStringInput', true); + input.addField(inputField); + output.addInput(input.serialize()); + expect(output.getInput('myinput')?.fields?.[0]?.name.value).toEqual('owner'); + }); + + test('returns undefined if input does not exist', () => { + const output = new TransformerOutput(inputDocumentWithNoOperations); + expect(output.getInput('noinput')).toBeUndefined(); + }); + + test('updates input', () => { + const output = new TransformerOutput(inputDocumentWithNoOperations); + const input = InputObjectDefinitionWrapper.create('myinput'); + const inputField = InputFieldWrapper.create('owner', 'ModelStringInput', true); + input.addField(inputField); + output.addInput(input.serialize()); + expect(output.getInput('myinput')?.fields?.[0]?.name.value).toEqual('owner'); + + const newInput = InputObjectDefinitionWrapper.create('myinput'); + const newInputField = InputFieldWrapper.create('newowner', 'ModelStringInput', true); + newInput.addField(newInputField); + output.updateInput(newInput.serialize()); + expect(output.getInput('myinput')?.fields?.[0]?.name.value).toEqual('newowner'); + }); }); diff --git a/packages/amplify-graphql-transformer-core/src/index.ts b/packages/amplify-graphql-transformer-core/src/index.ts index 1ac914ca6f..f1c57b9cbd 100644 --- a/packages/amplify-graphql-transformer-core/src/index.ts +++ b/packages/amplify-graphql-transformer-core/src/index.ts @@ -57,6 +57,10 @@ export { normalizeDbType, setResourceName, SQLLambdaResourceNames, + getFilterInputName, + getConditionInputName, + getSubscriptionFilterInputName, + getConnectionName, } from './utils'; export type { SetResourceNameProps } from './utils'; export * from './utils/operation-names'; diff --git a/packages/amplify-graphql-transformer-core/src/transformer-context/output.ts b/packages/amplify-graphql-transformer-core/src/transformer-context/output.ts index 91a11d2cfb..f7d7a08ab8 100644 --- a/packages/amplify-graphql-transformer-core/src/transformer-context/output.ts +++ b/packages/amplify-graphql-transformer-core/src/transformer-context/output.ts @@ -597,6 +597,22 @@ export class TransformerOutput implements TransformerContextOutputProvider { this.nodeMap[inp.name.value] = inp; } + public updateInput(obj: InputObjectTypeDefinitionNode) { + if (!this.nodeMap[obj.name.value]) { + throw new Error(`Type ${obj.name.value} does not exist.`); + } + this.nodeMap[obj.name.value] = obj; + } + + public getInput(name: string): InputObjectTypeDefinitionNode | undefined { + if (this.nodeMap[name]) { + const node = this.nodeMap[name]; + if (node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION) { + return node as InputObjectTypeDefinitionNode; + } + } + } + /** * Add an enum type definition node to the context. * @param en The enum type definition node to add. diff --git a/packages/amplify-graphql-transformer-core/src/utils/index.ts b/packages/amplify-graphql-transformer-core/src/utils/index.ts index 6e1398e338..00f2247a73 100644 --- a/packages/amplify-graphql-transformer-core/src/utils/index.ts +++ b/packages/amplify-graphql-transformer-core/src/utils/index.ts @@ -1,4 +1,10 @@ -export { getPrimaryKeyFields } from './model-util'; +export { + getPrimaryKeyFields, + getFilterInputName, + getConditionInputName, + getSubscriptionFilterInputName, + getConnectionName, +} from './model-util'; export { DirectiveWrapper, GetArgumentsOptions, generateGetArgumentsInput } from './directive-wrapper'; export { collectDirectives, collectDirectivesByTypeNames } from './type-map-utils'; export { stripDirectives } from './strip-directives'; diff --git a/packages/amplify-graphql-transformer-core/src/utils/model-util.ts b/packages/amplify-graphql-transformer-core/src/utils/model-util.ts index 4687196830..99972a7bac 100644 --- a/packages/amplify-graphql-transformer-core/src/utils/model-util.ts +++ b/packages/amplify-graphql-transformer-core/src/utils/model-util.ts @@ -1,3 +1,4 @@ +import { toPascalCase } from 'graphql-transformer-common'; import { ListValueNode, ObjectTypeDefinitionNode, StringValueNode } from 'graphql'; export const getPrimaryKeyFields = (type: ObjectTypeDefinitionNode): string[] => { @@ -13,3 +14,19 @@ export const getPrimaryKeyFields = (type: ObjectTypeDefinitionNode): string[] => } return result; }; + +export const getFilterInputName = (modelName: string): string => { + return toPascalCase(['Model', modelName, 'FilterInput']); +}; + +export const getConditionInputName = (modelName: string): string => { + return toPascalCase(['Model', modelName, 'ConditionInput']); +}; + +export const getSubscriptionFilterInputName = (modelName: string): string => { + return toPascalCase(['ModelSubscription', modelName, 'FilterInput']); +}; + +export const getConnectionName = (modelName: string): string => { + return toPascalCase(['Model', modelName, 'Connection']); +}; diff --git a/packages/amplify-graphql-transformer-interfaces/API.md b/packages/amplify-graphql-transformer-interfaces/API.md index 256f17132a..a25be2a52b 100644 --- a/packages/amplify-graphql-transformer-interfaces/API.md +++ b/packages/amplify-graphql-transformer-interfaces/API.md @@ -477,6 +477,8 @@ export interface TransformerContextOutputProvider { // (undocumented) addUnionExtension(obj: UnionTypeExtensionNode): void; // (undocumented) + getInput(name: string): InputObjectTypeDefinitionNode | undefined; + // (undocumented) getMutation(): ObjectTypeDefinitionNode | undefined; // (undocumented) getMutationTypeName(): string | undefined; @@ -503,6 +505,8 @@ export interface TransformerContextOutputProvider { // (undocumented) putType(obj: TypeDefinitionNode): void; // (undocumented) + updateInput(obj: InputObjectTypeDefinitionNode): void; + // (undocumented) updateObject(obj: ObjectTypeDefinitionNode): void; } diff --git a/packages/amplify-graphql-transformer-interfaces/src/transformer-context/transformer-context-output-provider.ts b/packages/amplify-graphql-transformer-interfaces/src/transformer-context/transformer-context-output-provider.ts index 77f1f81fa8..1938449b25 100644 --- a/packages/amplify-graphql-transformer-interfaces/src/transformer-context/transformer-context-output-provider.ts +++ b/packages/amplify-graphql-transformer-interfaces/src/transformer-context/transformer-context-output-provider.ts @@ -144,6 +144,10 @@ export interface TransformerContextOutputProvider { */ addInput(inp: InputObjectTypeDefinitionNode): void; + updateInput(obj: InputObjectTypeDefinitionNode): void; + + getInput(name: string): InputObjectTypeDefinitionNode | undefined; + /** * Add an enum type definition node to the context. * @param en The enum type definition node to add.