Github graphQL OrderBy

You’ve got an error

Argument 'orderBy' on Field 'repositories' has an invalid value.
Expected type 'RepositoryOrder'.

You forget to specify direction which is marked as mandatory. This will work:

{
  repositoryOwner(login: "Naramsim") {
    login
    repositories(first: 3, isFork: true,  orderBy: {field: CREATED_AT, direction: ASC}) {
      edges {
        node {
          description
        }
      }
    }
  }
}

Leave a Comment