Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in onboarding Instagram example #23

Open
blackwood opened this issue Oct 18, 2017 · 2 comments
Open

Error in onboarding Instagram example #23

blackwood opened this issue Oct 18, 2017 · 2 comments
Assignees

Comments

@blackwood
Copy link

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) {
@marktani
Copy link
Contributor

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!  
}

@blackwood
Copy link
Author

Thanks, this worked for me when I modified the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants