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
...
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why do you need to create a user model? I'm supposing that you can use the userid from Cognito.
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.