Skip to content

Instantly share code, notes, and snippets.

View kadeer's full-sized avatar

Abdulkadir N. A. kadeer

View GitHub Profile
@kadeer
kadeer / gist:5f35fd4048249b967e13bbbd4085d031
Created November 25, 2023 01:18
q-up with xstate and data loader
import { createMachine, DoneInvokeEvent, interpret } from "xstate";
import DataLoader from "dataloader";
import { chunk } from "lodash";
type Mode = "DryRun" | "Live";
type AuthUser = { id: string };
type BatchRecord = { email: string; active: boolean };
type AppRecord = { id: string; email: string; active: boolean };
type DBAction = "NOTHING" | "CREATE" | "UPDATE" | "DELETE";
type SalesforceAction =
@kadeer
kadeer / machine.js
Last active March 20, 2020 16:22
Generated by XState Viz: https://xstate.js.org/viz
const examinationSessionMachine = Machine({
id: "session",
initial: "inSession",
states: {
init: {
on: {
LOAD: "loading"
}
},
loading: {