Skip to content

Commit

Permalink
update readme to include graphQL details
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh62 committed Oct 4, 2024
1 parent 8b16306 commit 27112df
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,36 @@ export const handler: PreSignUpTriggerHandler = async (event) => {
return event;
};
```
Create a file `amplify/data/mfa/index.graphql` with the following content

```graphql
# A Graphql Schema for creating Mfa info such as code and username.

type Query {
listMfaInfo: [MfaInfo] @aws_api_key
}

type Mutation {
createMfaInfo(input: CreateMfaInfoInput!): MfaInfo @aws_api_key
}

type Subscription {
onCreateMfaInfo(username: String): MfaInfo
@aws_subscribe(mutations: ["createMfaInfo"])
}

input CreateMfaInfoInput {
username: String!
code: String!
expirationTime: AWSTimestamp!
}

type MfaInfo {
username: String!
code: String!
expirationTime: AWSTimestamp!
}
```

Update `amplify/data/mfa/index.ts`. The resulting file should look like this

Expand Down

0 comments on commit 27112df

Please sign in to comment.