DEV Community

Discussion on: Multiple Frontends with AWS Amplify

Collapse
 
djom202 profile image
Jonathan Olier

Why do you need to create a user model? I'm supposing that you can use the userid from Cognito.

Collapse
 
skydowx profile image
skydowx

You can use the userid from cognito. But sometimes you might want to make connections with other entities in the database. In that situation, it is useful to also make a user entity in the database.

type User @model {
...
posts: [Post]! @connection
...
}
Enter fullscreen mode Exit fullscreen mode