serlo / frontend

Next.js app that serves serlo.org
https://serlo.org
Apache License 2.0
38 stars 10 forks source link

Show number of unrevised revisions #595

Closed kulla closed 3 years ago

kulla commented 4 years ago

Follow up when https://github.com/serlo/api.serlo.org/pull/87 is merged: The number of unrevised revisions can be shown for all types implementing AbstractRepository (type of AbstractEntity like Article, Video, ... and Page):

grafik

The api query will be:

query {
  uuid(...) {
    ...
    revisions(unrevised: true) {
      totalCount
    }
  }
}
Entkenntnis commented 3 years ago

@kulla

I am currently trying this out and have stumbled across an error:

image

Am I doing something wrong here? The article is supposed to have 3 unrevised revisions.

Edit: Adding (unrevised:true) leads to the same error message.

kulla commented 3 years ago

Am I doing something wrong here? The article is supposed to have 3 unrevised revisions.

Have you tested it at https://api.serlo-staging.dev/___graphql? There I do not get an error:

2020-11-06-100613_929x589_scrot

Entkenntnis commented 3 years ago

Thanks for checking, it now works!

Entkenntnis commented 3 years ago

@kulla revisions is working for 1781 now, but I got an exception again on another article. I have added a revision to de.serlo-staging.dev/1619 just now, and requesting the API is giving a map of undefined... exception. :roll_eyes:

In addition, I have this error (is this related?):

grafik

kulla commented 3 years ago

revisions is working for 1781 now, but I got an exception again on another article. I have added a revision to de.serlo-staging.dev/1619 just now, and requesting the API is giving a map of undefined... exception. roll_eyes

I need to investigate it... See https://github.com/serlo/api.serlo.org/issues/119 for tracking it.

In addition, I have this error (is this related?):

After two hours you need to reload the playground because afterwards the login token expires...