Skip to content

Commit

Permalink
feat: add connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Smith committed Feb 29, 2024
1 parent 5dc9c81 commit 668770e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions appsync.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type CharityUser = {

export type ItemQuery = {
__typename?: 'ItemQuery';
connection?: Maybe<Scalars['String']['output']>;
email: Scalars['String']['output'];
message: Scalars['String']['output'];
name: Scalars['String']['output'];
Expand Down Expand Up @@ -84,6 +85,7 @@ export type Mutation = {


export type MutationInsertItemQueryArgs = {
connection?: InputMaybe<Scalars['String']['input']>;
email: Scalars['String']['input'];
message: Scalars['String']['input'];
name: Scalars['String']['input'];
Expand Down
2 changes: 2 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type ItemQuery {
email: String!
phone: String!
message: String!
connection: String
}

type Query {
Expand Down Expand Up @@ -121,6 +122,7 @@ type Mutation {
message: String!
who: String!
phone: String!
connection: String
): Boolean!
}

Expand Down
13 changes: 11 additions & 2 deletions src/handlers/privateResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 668770e

Please sign in to comment.