diff --git a/appsync.d.ts b/appsync.d.ts index e737694..2d79b69 100644 --- a/appsync.d.ts +++ b/appsync.d.ts @@ -30,6 +30,7 @@ export type CharityUser = { export type ItemQuery = { __typename?: 'ItemQuery'; + connection?: Maybe; email: Scalars['String']['output']; message: Scalars['String']['output']; name: Scalars['String']['output']; @@ -84,6 +85,7 @@ export type Mutation = { export type MutationInsertItemQueryArgs = { + connection?: InputMaybe; email: Scalars['String']['input']; message: Scalars['String']['input']; name: Scalars['String']['input']; diff --git a/schema.graphql b/schema.graphql index e93f25d..a2e94b3 100644 --- a/schema.graphql +++ b/schema.graphql @@ -84,6 +84,7 @@ type ItemQuery { email: String! phone: String! message: String! + connection: String } type Query { @@ -121,6 +122,7 @@ type Mutation { message: String! who: String! phone: String! + connection: String ): Boolean! } diff --git a/src/handlers/privateResolver.ts b/src/handlers/privateResolver.ts index 31cfb4f..be82205 100644 --- a/src/handlers/privateResolver.ts +++ b/src/handlers/privateResolver.ts @@ -72,8 +72,17 @@ export const handler: AppSyncResolverHandler< break; } case 'insertItemQuery': { - const { name, email, type, message, who, phone } = params as MutationInsertItemQueryArgs; - const res = await itemQueriesRepository.insert({ name, email, type, message, who, phone }); + const { name, email, type, message, who, phone, connection } = + params as MutationInsertItemQueryArgs; + const res = await itemQueriesRepository.insert({ + name, + email, + type, + message, + who, + phone, + connection, + }); callback(null, res); break; }