kronusaturn / lw2-viewer

An alternative frontend for LessWrong 2.0
https://www.greaterwrong.com/
MIT License
63 stars 6 forks source link

Content api changes incoming: New revision system and renaming of a lot of content fields #14

Open Discordius opened 5 years ago

Discordius commented 5 years ago

Hey,

We are just about to publish a new revision system, which required some changes to the API. I expect this will break GreaterWrong, until you update your graphql fragments.

You can see the new fragments and GraphQL types at https://lessestwrong.com/graphiql.

Sorry for the inconvenience.

jimrandomh commented 5 years ago

Actually, it looks like lessestwrong.com isn't on the new branch yet, but it will be in an hour or so.

jimrandomh commented 5 years ago

In particular, the API for things that use the editor is different; instead of querying htmlBody, query contents, which then has subfields for the different formats (HTML, DraftJS, Markdown) you might want it in. contents takes an optional revision argument, which you can mostly ignore (it's useful if you want to build a UI for viewing old versions of posts).

Revisions are tagged as major or minor updates; in the near future, we're going to be updating the Sequences, and the main LW client is going to display a warning on comments that were made prior to the last major update.