Papan GraphQL — GraphQL

Keep Papan, the gapoktan grain price service: queries, errors, nullability, enums, inputs, Node. 14 levels, played right in the browser with nothing to install.

What the levels ask

  1. Mas Agung looks after Papan, the grain price service of Gapoktan Tani Mulyo, on the secretariat's old computer. Until last week the porch TV loaded prices over REST: one request for the price list, then one more for each mill, one after another, on the village's weak wifi. Now Papan also answers GraphQL. Fill the three holes in tv-teras/papan.graphql so the TV writes each row from one request that carries only what it writes.
  2. Nenek Marni types HARGA GKP on her old phone. The SMS bot on Mas Agung's desk asks Papan, then balas.js builds the reply from the answer's keys: h.komoditas.nama, h.rp and h.selep.nama. Fill the two holes in bot-sms/harga.graphql so Papan's answer has the shape balas.js reads.
  3. The SMS bot still asks the old REST. Mas Agung is moving it to Papan's GraphQL with a plain fetch, no library at all. Fill in the address, the method and the request body in bot-sms/tanya.js so the SMS HARGA GKP is answered with its price.
  4. Pak RT wants the porch TV to show the GKP prices of the last seven days too. Mas Agung added riwayat(hari: 7) to the TV's query in a hurry, and the TV went blank. Fill the two holes in tv-teras/papan.graphql so today's prices and the week's history both show.
  5. Three SMS came in this morning. Nenek Marni asks HARGA GKP, Pak Tono HARGA GKG although Selep Sumber Rejeki has not reported yet, and Bagas types HARGA JAGUNG for fun. Papan answers all three. Fill the two conditions in bot-sms/balas.js so each villager gets the right reply.
  6. The porch TV now also writes the price's direction (up, down, steady) and the mill's name. In the database, the harga table keeps harga_kemarin, penggilingan_id and catatan_internal, the office's notes that must not leave it. Bagas is curious and tries asking from his laptop. Fill the three holes in the Harga type in skema.graphql.
  7. On Jumat Legi, Mas Agung will share Harga Tani 2.0, the gapoktan's first GraphQL app, to 120 farmers' phones over Bluetooth at the market. After that the app will never be updated again, so the names it asks for are locked. The schema the intern wrote still uses names any old way. Fill the three holes in skema.graphql; the app's query and resolver.js use the same names.
  8. Before the APK goes out, Mas Agung decides where the ! go. Maju Jaya has no phone number yet, one rice price still points at Selep Lestari, which has closed, and mill owners sometimes send the SMS LAPOR GKG without a number. Fill the three holes in skema.graphql; the bot's mutation uses the same type.
  9. The APK has been on 120 phones since Jumat Legi, and its widget asks harga(kode: GKP) forever. This morning a mill owner typed LAPOR GPK 7000. Bagas suggests changing every code to a plain String to be flexible. Fill the two holes in skema.graphql: the argument type of harga and the argument type of laporHarga.
  10. Two weeks after Jumat Legi, the Dinas Pertanian asks for grain moisture to be recorded with every report. The mill owners' phones still send laporHarga from version 2.0 with its two arguments and cannot be updated; the SMS bot can. Selep Karya Tani has no moisture meter yet. Fill the two holes in skema.graphql version 2.1.
  11. Farmers often misread berubah: rupiah or percent? Mas Agung wants it called selisihKemarin. He has already updated the porch TV and the SMS bot; 120 old phones still ask for berubah. Fill the hole in skema.graphql (v2.2), then decide next Monday's plan in rencana.txt (v2.3).
  12. The porch TV has a history page: Pak RT can tap one price or one mill, and the TV reloads it through node(id:). In the database, price number 1 and Selep Sumber Rejeki number 1 share the same id. Fill the three holes: in skema.graphql, in resolver.js, and in the TV's mill detail question.

And more, 14 levels in all.