Run a village street’s GraphQL API: tokens, field access, subscriptions, uploads, limits, a gateway. 16 levels, right in the browser.
hp-nenek/beranda.graphql so the screen fills with one request that carries only what it shows.wargaId argument and an x-warga-id header, both from the app's memory. Today Ms. Wulan signs in on Mr. Dodi's phone, and Mr. Tono opens his app after signing out last night. Fill siapa in context and pemilik in the saya resolver.warga(id) query already refuses anyone looking at another villager's data. But the Warga type can also be reached through pengumuman { penulis }, and the KartuWarga fragment on the announcements screen asks for hp and tunggakan too. The hall TV shows it without signing in. Fill the condition in pribadi, which the resolvers of those two private fields use.foto type in skema.graphql and the foto resolver in server.js.yanti, tono and ijah. Mr. Tono's entry says zero rupiah, and Mrs. Ijah's month is already paid. Mrs. Yanti's payment must still go in, and the tablet must know why the other two were refused. Fill tolakIsian in server.js and the fields chosen in tablet-rt/setor.graphql.pembayaranSaya resolver: where the next page starts, and when there are more pages.suratBerubah subscription, carried by graphql-ws over a WebSocket (ws.js). Ms. Anis at the village office changes a letter's status with an ordinary HTTP mutation. Fill the filter in subscribe and where the token comes from in context.nomorLoket checks it every five seconds for each subscriber, inside a Repeater. The hall TV watches all morning; Grandma Marni goes home once her number is called and closes her app. Fill the line after await stop.laporLampuMati mutation and a photo (scalar File, sent as a multipart request by the browser's FormData). Mr. Tono sends a 900 KB photo, Mr. Dodi his original 14 MB one, and Ms. Wulan picks a PDF by mistake. Fill the checks in the resolver and in the onRequest plugin.tetangga { ... } until he was sure it would "get everyone". Each level multiplies the resolvers that run. At the same time the neighbourhood head's tablet opens the street map and Mrs. Sari's phone opens her neighbour list. Fill the limit n in maxDepthPlugin.kas(first: 3000) with the pencatat of each row. Its depth is only three, so maxDepthPlugin lets it through. Simpul works out each query's cost with graphql-query-complexity. Fill the cost hint on the kas field and BIAYA_MAKS.sha256Hash. The lists are in operasi-v1.js (the villager app and the hall board) and operasi-v2.js (version 2.0 of the neighbourhood tablet app, which the neighbourhood head installed this morning). A visitor's laptop on the wifi tries all sorts. Fill the three holes in server.js.And more, 16 levels in all.