vue-fullstack-graphql
vue-fullstack-graphql copied to clipboard
Error in onboarding Instagram example
Node version: 8.4.0
GraphQL execution errors for query 'allPosts'
"Argument 'orderBy' expected type 'PostOrderBy' but got: createdAt_DESC. Reason: Enum value 'createdAt_DESC' is undefined in enum type 'PostOrderBy'. Known values are: description_ASC, description_DESC, id_ASC, id_DESC, imageUrl_ASC, imageUrl_DESC. (line 2, column 21):
allPosts(orderBy: createdAt_DESC) {
The problem is the way you are instructed to create a Post
type. This is how it needs to be done:
type Post @model {
id: @isUnique
createdAt: DateTime!
description: String!
imageUrl: String!
}
Thanks, this worked for me when I modified the schema.