submissionId stringlengths 25 25 | title stringlengths 17 64 | payload dict |
|---|---|---|
cmssugf2x0091g4p2pgtranyg | Submission TRANYG | {
"sample_query": "{ inventory(stock: 12, reserved: 8, threshold: 5) { available reorder status } }",
"resolver_code": "Query: { inventory: (_, {stock,reserved,threshold}) => { if (stock < 0 || reserved < 0 || threshold < 0 || reserved > stock) throw new Error('invalid inventory values'); const available = stock - ... |
cmssugf2x0092g4p2wt0g4jpu | Submission 0G4JPU | {
"sample_query": "{ page(total: 53, page: 3, size: 20) { offset remaining hasNext } }",
"resolver_code": "Query: { page: (_, {total,page,size}) => { if (total < 0 || page < 1 || size < 1) throw new Error('invalid pagination'); const offset=(page-1)*size; const remaining=Math.max(0,total-offset-size); return { offs... |
cmssugf2x0093g4p2zcnbps1v | Submission NBPS1V | {
"sample_query": "{ rateLimit(limit: 100, previous: 82, incoming: 25) { used remaining blocked } }",
"resolver_code": "Query: { rateLimit: (_, {limit,previous,incoming}) => { if (limit < 0 || previous < 0 || incoming < 0) throw new Error('negative counter'); const used=previous+incoming; return { used, remaining: ... |
cmssugf2x0094g4p2qpc6ojud | Submission C6OJUD | {
"sample_query": "{ reserve(capacity: 20, occupied: 17, requested: 6) { left accepted waitlisted } }",
"resolver_code": "Query: { reserve: (_, {capacity,occupied,requested}) => { if (capacity < 0 || occupied < 0 || requested < 0 || occupied > capacity) throw new Error('invalid reservation state'); const open=capac... |
cmssugf2x0095g4p2xulwvrxf | Submission LWVRXF | {
"sample_query": "{ retry(maxAttempts: 4, failures: 3, baseDelay: 2) { attempts totalDelay exhausted } }",
"resolver_code": "Query: { retry: (_, {maxAttempts,failures,baseDelay}) => { if (maxAttempts < 1 || failures < 0 || baseDelay < 0) throw new Error('invalid retry configuration'); const attempts=Math.min(failu... |
cmssugf2y0097g4p2d0vix2q3 | Submission VIX2Q3 | {
"sample_query": "{ score(theory: 38, practical: 19, passMark: 50) { total passed grade } }",
"resolver_code": "Query: { score: (_, {theory,practical,passMark}) => { if ([theory,practical].some(v => v < 0 || v > 50) || passMark < 0 || passMark > 100) throw new Error('invalid score'); const total=theory+practical; ... |
cmssugf2y0098g4p2gbajvjz6 | Submission AJVJZ6 | {
"sample_query": "{ shipping(weight: 14, distance: 160, freeAt: 1000, cart: 700) { subtotal surcharge total } }",
"resolver_code": "Query: { shipping: (_, {weight,distance,freeAt,cart}) => { if (weight < 0 || distance < 0 || freeAt < 0 || cart < 0) throw new Error('invalid shipping input'); const subtotal = cart >... |
cmssugf2y0099g4p2tsruebn4 | Submission RUEBN4 | {
"sample_query": "{ storage(capacity: 1000, used: 720, reserved: 110) { free percentUsed alert } }",
"resolver_code": "Query: { storage: (_, {capacity,used,reserved}) => { if (capacity <= 0 || used < 0 || reserved < 0 || used+reserved > capacity) throw new Error('invalid storage'); const occupied=used+reserved; co... |
cmssugf2y009ag4p2az2dcw63 | Submission 2DCW63 | {
"sample_query": "{ queue(workers: 8, active: 6, pending: 5) { runnable delayed saturated } }",
"resolver_code": "Query: { queue: (_, {workers,active,pending}) => { if (workers < 1 || active < 0 || pending < 0 || active > workers) throw new Error('invalid queue state'); const slots=workers-active; const runnable=M... |
cmssugf2y009bg4p2cx54e0e1 | Submission 54E0E1 | {
"sample_query": "{ window(length: 25, offset: 20, size: 10) { start end clipped } }",
"resolver_code": "Query: { window: (_, {length,offset,size}) => { if (length < 0 || offset < 0 || size < 0) throw new Error('negative window'); const start=Math.min(offset,length); const end=Math.min(length,start+size); return {... |
cmssugf2y009cg4p2ts0jcee7 | Submission 0JCEE7 | {
"sample_query": "{ fulfill(stock: 30, reserved: 8, order: 27) { shipped backorder remainingStock } }",
"resolver_code": "Query: { fulfill: (_, {stock,reserved,order}) => { if (stock < 0 || reserved < 0 || order < 0 || reserved > stock) throw new Error('invalid stock state'); const sellable=stock-reserved; const s... |
cmssugf2y009dg4p219ebw053 | Submission EBW053 | {
"sample_query": "{ sensor(reading: 142, baseline: 100, warnDelta: 20, criticalDelta: 40) { level delta acknowledged } }",
"resolver_code": "Query: { sensor: (_, {reading,baseline,warnDelta,criticalDelta}) => { if (warnDelta < 0 || criticalDelta < warnDelta) throw new Error('invalid thresholds'); const delta=Math.... |
cmssugf2y009eg4p2q5b6y9ym | Submission B6Y9YM | {
"sample_query": "{ credits(balance: 30, cost: 50, bonus: 25) { charged balance allowed } }",
"resolver_code": "Query: { credits: (_, {balance,cost,bonus}) => { if (balance < 0 || cost < 0 || bonus < 0) throw new Error('negative credits'); const available=balance+bonus; const allowed=available>=cost; return { char... |
cmssugf2y009fg4p23ad6edrw | Submission D6EDRW | {
"sample_query": "{ tournament(wins: 7, draws: 3, losses: 0) { points wins unbeaten } }",
"resolver_code": "Query: { tournament: (_, {wins,draws,losses}) => { if (wins < 0 || draws < 0 || losses < 0) throw new Error('negative record'); return { points: wins*3+draws, wins, unbeaten: losses===0 }; } }",
"expected_... |
cmssugf2y009gg4p20196vboj | Submission 96VBOJ | {
"sample_query": "{ rangeStats(start: 4, end: 10) { count sum evenCount } }",
"resolver_code": "Query: { rangeStats: (_, {start,end}) => { if (start > end || end-start > 1000) throw new Error('invalid range'); const count=end-start+1; const sum=(start+end)*count/2; const evenCount=Math.floor(end/2)-Math.floor((sta... |
cmssugf2y009hg4p26pyfcelj | Submission YFCELJ | {
"sample_query": "{ access(required: 4, userLevel: 2, suspended: false, overrideLevel: 5) { allowed reason effectiveLevel } }",
"resolver_code": "Query: { access: (_, {required,userLevel,suspended,overrideLevel}) => { if (required < 0 || userLevel < 0 || overrideLevel < 0) throw new Error('invalid access level'); ... |
cmssugf2y009ig4p2lk7k580h | Submission 7K580H | {
"sample_query": "{ batch(total: 80, failed: 7, skipped: 3) { completed failed successRate } }",
"resolver_code": "Query: { batch: (_, {total,failed,skipped}) => { if (total < 0 || failed < 0 || skipped < 0 || failed+skipped > total) throw new Error('invalid batch counts'); const completed=total-skipped; const suc... |
cmssugf2y009jg4p2g8emziby | Submission EMZIBY | {
"sample_query": "{ sla(target: 300, elapsed: 245, retries: 3, retryPenalty: 25) { budget consumed breached } }",
"resolver_code": "Query: { sla: (_, {target,elapsed,retries,retryPenalty}) => { if (target < 0 || elapsed < 0 || retries < 0 || retryPenalty < 0) throw new Error('invalid sla input'); const consumed=el... |
cmssugf2y009kg4p2lxujy1vd | Submission UJY1VD | {
"sample_query": "{ pick(primary: 4, secondary: 10, requested: 9) { picked short locationsUsed } }",
"resolver_code": "Query: { pick: (_, {primary,secondary,requested}) => { if (primary < 0 || secondary < 0 || requested < 0) throw new Error('negative quantity'); const fromPrimary=Math.min(primary,requested); const... |
cmssugf2y009lg4p2im1n1o7o | Submission 1N1O7O | {
"sample_query": "{ billing(included: 100, used: 128, base: 500, unitPrice: 7) { base overage total } }",
"resolver_code": "Query: { billing: (_, {included,used,base,unitPrice}) => { if (included < 0 || used < 0 || base < 0 || unitPrice < 0) throw new Error('negative billing input'); const extra=Math.max(0,used-in... |
cmssugf2y009mg4p2kzf1rbd1 | Submission F1RBD1 | {
"sample_query": "{ password(value: \"DataBounty7\", minLength: 12) { valid missing score } }",
"resolver_code": "Query: { password: (_, {value,minLength}) => { if (minLength < 1) throw new Error('invalid minimum length'); const missing=[]; if (!/[A-Z]/.test(value)) missing.push('UPPER'); if (!/[a-z]/.test(value))... |
cmssugf2y009ng4p2wutnmq9h | Submission TNMQ9H | {
"sample_query": "{ velocity(committed: 40, completed: 36, added: 8) { committed completed carryOver completionPct } }",
"resolver_code": "Query: { velocity: (_, {committed,completed,added}) => { if (committed < 0 || completed < 0 || added < 0 || completed > committed+added) throw new Error('invalid velocity'); co... |
cmssugf2y009og4p21wjdfu30 | Submission JDFU30 | {
"sample_query": "{ cache(reads: 200, hits: 150, stale: 20) { hits misses hitRate } }",
"resolver_code": "Query: { cache: (_, {reads,hits,stale}) => { if (reads < 0 || hits < 0 || stale < 0 || hits+stale > reads) throw new Error('invalid cache counters'); const effectiveHits=hits; const misses=reads-hits-stale; re... |
cmssugf2y009pg4p245bq0gbw | Submission BQ0GBW | {
"sample_query": "{ slot(start: 1380, duration: 120) { start end duration wraps } }",
"resolver_code": "Query: { slot: (_, {start,duration}) => { if (start < 0 || start >= 1440 || duration < 0 || duration > 1440) throw new Error('invalid time slot'); const raw=start+duration; return { start, end: raw%1440, duratio... |
cmssugf2y009qg4p290icsv8n | Submission ICSV8N | {
"sample_query": "{ threshold(value: 97, low: 40, high: 90) { value band distance } }",
"resolver_code": "Query: { threshold: (_, {value,low,high}) => { if (low > high) throw new Error('invalid thresholds'); const band=value<low?'LOW':value>high?'HIGH':'NORMAL'; const distance=band==='LOW'?low-value:band==='HIGH'?... |
cmssugf2y009rg4p2yw2nqyrf | Submission 2NQYRF | {
"sample_query": "{ allocate(demand: 17, primaryCapacity: 10, backupCapacity: 4) { primary backup unfilled } }",
"resolver_code": "Query: { allocate: (_, {demand,primaryCapacity,backupCapacity}) => { if (demand < 0 || primaryCapacity < 0 || backupCapacity < 0) throw new Error('negative allocation'); const primary=... |
cmssugf2y009sg4p2fa57nxlp | Submission 57NXLP | {
"sample_query": "{ tax(subtotal: 1250, exemption: 250, ratePct: 18) { taxable tax total } }",
"resolver_code": "Query: { tax: (_, {subtotal,exemption,ratePct}) => { if (subtotal < 0 || exemption < 0 || ratePct < 0 || ratePct > 100) throw new Error('invalid tax input'); const taxable=Math.max(0,subtotal-exemption)... |
cmssugf2y009tg4p28cmj73a6 | Submission MJ73A6 | {
"sample_query": "{ health(total: 12, failed: 0, degraded: 2) { healthy unhealthy state } }",
"resolver_code": "Query: { health: (_, {total,failed,degraded}) => { if (total < 0 || failed < 0 || degraded < 0 || failed+degraded > total) throw new Error('invalid health counts'); const healthy=total-failed-degraded; c... |
cmssugf2y009ug4p27bxpaqb0 | Submission XPAQB0 | {
"sample_query": "{ budget(limit: 1000, existing: 650, requested: 300, reserve: 100) { remaining spent blocked } }",
"resolver_code": "Query: { budget: (_, {limit,existing,requested,reserve}) => { if ([limit,existing,requested,reserve].some(v=>v<0) || existing+reserve>limit) throw new Error('invalid budget'); cons... |
cmst2kis300bug4p2mvsgu056 | Submission SGU056 | {
"sample_query": "{ sqrt(x: -4) }",
"resolver_code": "Query: { sqrt: (_, {x}) => { if (x < 0) throw new Error('cannot take sqrt of negative'); return Math.sqrt(x); } }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"cannot take sqrt of negative\"}]}",
"schema_definition": "type Query { sqrt(x... |
cmst2kis300bvg4p2hf1jvmzr | Submission 1JVMZR | {
"sample_query": "{ items { name weight } }",
"resolver_code": "Query: { items: () => [{name:'a', weight:1}, {name:'b'}] },\nItem: { weight: (i) => { if (i.weight === undefined) throw new Error('weight missing for ' + i.name); return i.weight; } }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\... |
cmst2kis300bwg4p2ji5an6yk | Submission 5AN6YK | {
"sample_query": "{ account(id: \"2\") }",
"resolver_code": "Query: { account: (_, {id}) => id === '1' ? 'active' : null }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"Cannot return null for non-nullable field Query.account.\"}]}",
"schema_definition": "type Query { account(id: ID!): Strin... |
cmst2kis300bxg4p2f4f3kaiu | Submission F3KAIU | {
"sample_query": "{ pick(n: 3) }",
"resolver_code": "Query: { pick: (_, {n}) => ['RED','GREEN','BLUE','PURPLE'][n] }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"Enum \\\"Color\\\" cannot represent value: \\\"PURPLE\\\"\"}]}",
"schema_definition": "enum Color { RED GREEN BLUE }\ntype Query... |
cmst2kis300byg4p2qq09x04i | Submission 09X04I | {
"sample_query": "{ rect(w: 3, h: 4) { w h area } }",
"resolver_code": "Query: { rect: (_, {w,h}) => ({w, h}) },\nRect: { area: (r) => r.w * r.h }",
"expected_response": "{\"data\":{\"rect\":{\"w\":3,\"h\":4,\"area\":12}}}",
"schema_definition": "type Rect { w: Int!, h: Int!, area: Int! }\ntype Query { rect(w:... |
cmst2kis300bzg4p2nnasknxa | Submission ASKNXA | {
"sample_query": "{ evens(upto: 4) }",
"resolver_code": "Query: { evens: (_, {upto}) => { const out=[]; for (let i=0;i<=upto;i++) out.push(i%2===0 ? i : null); return out; } }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"Cannot return null for non-nullable field Query.evens.\"}]}",
"schema... |
cmst2kis300c0g4p2brp3wqnf | Submission P3WQNF | {
"sample_query": "{ greet }",
"resolver_code": "Query: { greet: (_, {name}) => 'hello ' + name }",
"expected_response": "{\"data\":{\"greet\":\"hello world\"}}",
"schema_definition": "type Query { greet(name: String = \"world\"): String! }"
} |
cmst2kis300c1g4p2o5icwfh0 | Submission ICWFH0 | {
"sample_query": "{ a: double(x: 3) b: double(x: 10) }",
"resolver_code": "Query: { double: (_, {x}) => x * 2 }",
"expected_response": "{\"data\":{\"a\":6,\"b\":20}}",
"schema_definition": "type Query { double(x: Int!): Int! }"
} |
cmst2kis300c2g4p26i1crv53 | Submission 1CRV53 | {
"sample_query": "{ user { name nickname } }",
"resolver_code": "Query: { user: () => ({name: 'Ada', nickname: null}) }",
"expected_response": "{\"data\":{\"user\":{\"name\":\"Ada\",\"nickname\":null}}}",
"schema_definition": "type User { name: String!, nickname: String }\ntype Query { user: User! }"
} |
cmst2kis300c3g4p25fpt7amk | Submission PT7AMK | {
"sample_query": "{ reversed(xs: [1, 2, 3, 4]) }",
"resolver_code": "Query: { reversed: (_, {xs}) => [...xs].reverse() }",
"expected_response": "{\"data\":{\"reversed\":[4,3,2,1]}}",
"schema_definition": "type Query { reversed(xs: [Int!]!): [Int!]! }"
} |
cmst2kis400c4g4p2tgr46tgl | Submission R46TGL | {
"sample_query": "{ withdraw(balance: 100, amount: 150) }",
"resolver_code": "Query: { withdraw: (_, {balance, amount}) => { if (amount > balance) throw new Error('insufficient funds'); return balance - amount; } }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"insufficient funds\"}]}",
"sch... |
cmst2kis400c5g4p2c9olhc5x | Submission OLHC5X | {
"sample_query": "{ half(x: 5) }",
"resolver_code": "Query: { half: (_, {x}) => x / 2 }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"Int cannot represent non-integer value: 2.5\"}]}",
"schema_definition": "type Query { half(x: Int!): Int! }"
} |
cmst2kis400c6g4p2wjv09ig0 | Submission V09IG0 | {
"sample_query": "{ a { b { c { v } } } }",
"resolver_code": "Query: { a: () => ({}) },\nA: { b: () => ({}) },\nB: { c: () => ({}) },\nC: { v: () => 42 }",
"expected_response": "{\"data\":{\"a\":{\"b\":{\"c\":{\"v\":42}}}}}",
"schema_definition": "type C { v: Int! }\ntype B { c: C! }\ntype A { b: B! }\ntype Qu... |
cmst2kis400c7g4p2hyio0jid | Submission IO0JID | {
"sample_query": "{ dist(p: {x: -3, y: 4}) }",
"resolver_code": "Query: { dist: (_, {p}) => Math.abs(p.x) + Math.abs(p.y) }",
"expected_response": "{\"data\":{\"dist\":7}}",
"schema_definition": "input Point { x: Int!, y: Int! }\ntype Query { dist(p: Point!): Int! }"
} |
cmst2kis400c8g4p2cztsfrkw | Submission TSFRKW | {
"sample_query": "{ tags }",
"resolver_code": "Query: { tags: () => 'not-a-list' }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"Expected Iterable, but did not find one for field \\\"Query.tags\\\".\"}]}",
"schema_definition": "type Query { tags: [String!]! }"
} |
cmst2kis400c9g4p2yhb8qxsr | Submission B8QXSR | {
"sample_query": "{ between(lo: 1, hi: 10, x: 10) }",
"resolver_code": "Query: { between: (_, {lo, hi, x}) => lo <= x && x <= hi }",
"expected_response": "{\"data\":{\"between\":true}}",
"schema_definition": "type Query { between(lo: Int!, hi: Int!, x: Int!): Boolean! }"
} |
cmst2kis400cag4p295gooexm | Submission GOOEXM | {
"sample_query": "{ profile { email } }",
"resolver_code": "Query: { profile: () => ({}) }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"Cannot return null for non-nullable field Profile.email.\"}]}",
"schema_definition": "type Profile { email: String! }\ntype Query { profile: Profile! }"
} |
cmst2kis400cbg4p2rddh9q66 | Submission DH9Q66 | {
"sample_query": "{ label(n: 3) }",
"resolver_code": "Query: { label: (_, {n}) => n * 100 }",
"expected_response": "{\"data\":{\"label\":\"300\"}}",
"schema_definition": "type Query { label(n: Int!): String! }"
} |
cmst2kis400ccg4p22uox2uyl | Submission OX2UYL | {
"sample_query": "{ squares(upto: 3) { n square } }",
"resolver_code": "Query: { squares: (_, {upto}) => Array.from({length: upto}, (_, i) => ({n: i+1})) },\nSq: { square: (s) => s.n * s.n }",
"expected_response": "{\"data\":{\"squares\":[{\"n\":1,\"square\":1},{\"n\":2,\"square\":4},{\"n\":3,\"square\":9}]}}",
... |
cmst2kis400cdg4p2ts93433y | Submission 93433Y | {
"sample_query": "{ mod(a: 10, b: 0) }",
"resolver_code": "Query: { mod: (_, {a, b}) => { if (b === 0) throw new Error('modulo by zero'); return ((a % b) + b) % b; } }",
"expected_response": "{\"data\":null,\"errors\":[{\"message\":\"modulo by zero\"}]}",
"schema_definition": "type Query { mod(a: Int!, b: Int!... |
cmst6cllz00emg4p20h1tq0ot | Submission 1TQ0OT | {
"sample_query": "{\n airport(code: \"LHR\") {\n code\n city\n terminals {\n name\n boarding: gates(state: BOARDING) { code state terminal }\n everything: gates { code state }\n }\n }\n}",
"resolver_code": "Query: { airport: (_, { code }) => ({ LHR: { code: 'LHR', city: 'London', termi... |
cmst6cllz00eng4p2x4wgmw5u | Submission WGMW5U | {
"sample_query": "{\n inventory {\n __typename\n id\n label: name\n family\n ... on StringInstrument { strings bowed }\n ... on Percussion { pitched }\n ... on Wind { reed }\n }\n missing: instrument(id: \"i9\") { name }\n oboe: instrument(id: \"i3\") { __typename family ... on Wind { reed }... |
cmst6cllz00eog4p2o1jsdf3e | Submission JSDF3E | {
"sample_query": "{\n feed {\n __typename\n ...pollBits\n ...photoBits\n ... on Repost { note original { __typename ...pollBits ...photoBits } }\n }\n}\nfragment pollBits on Poll { question totalVotes options { label votes } }\nfragment photoBits on Photo { caption width height }",
"resolver_code": "... |
cmst6cllz00epg4p23rv8j1gq | Submission V8J1GQ | {
"sample_query": "mutation {\n placeOrder(input: { customer: \"acme-ltd\", coupon: \"TENOFF\", lines: [{ sku: \"BOLT-1\", qty: 4 }, { sku: \"NUT-2\" }] }) {\n id\n customer\n status\n lines { sku qty unitCents subtotalCents }\n itemsCents\n discountCents\n shippingCents\n totalCents\n }\n}"... |
cmst6cllz00eqg4p2i4shc0jv | Submission SHC0JV | {
"sample_query": "{\n allDefaults: shipments { ref region weightKg }\n heavyNorthAmerica: shipments(filter: { region: NA, weight: { min: 40 } }) { ref weightKg }\n coldApac: shipments(filter: { region: APAC, tags: [\"cold\"] }) { ref tags }\n impossible: shipments(filter: { region: EU, tags: [\"bulk\"] }) { ref ... |
cmst6cllz00erg4p2riylpyzo | Submission YLPYZO | {
"sample_query": "query Digest($limit: Int = 2, $sort: ThreadSort = REPLIES) {\n threadCount\n byDefault: threads(limit: $limit, sort: $sort) { title replies lastActivityDay }\n recentThree: threads(limit: 3, sort: RECENT) { title lastActivityDay }\n}",
"resolver_code": "Query: {\n threadCount: () => 4,\n thr... |
cmst6cllz00esg4p2n8owkhvw | Submission OWKHVW | {
"sample_query": "{\n profile {\n handle\n ...contact @include(if: true)\n ...restricted @skip(if: true)\n email @skip(if: false)\n phone @include(if: false)\n address @include(if: true) { city country @skip(if: false) }\n }\n}\nfragment contact on Profile { email phone @skip(if: true) }\nfragmen... |
cmst6cllz00etg4p2d87r4478 | Submission 7R4478 | {
"sample_query": "{\n boundingBox\n stations { name location elevation aliases }\n}",
"resolver_code": "Query: {\n boundingBox: () => ({ sw: [45.9, 5.9], ne: [47.8, 10.5] }),\n stations: () => [\n { name: 'Zermatt', lat: 46.0207, lon: 7.7491, elevation: 1605 },\n { name: 'Gornergrat', lat: 45.9836, lon: ... |
cmst6cllz00eug4p2v2fyaszu | Submission FYASZU | {
"sample_query": "{\n swatches(palette: COOL)\n __schema { queryType { name } }\n palette: __type(name: \"Palette\") {\n kind\n name\n visible: enumValues { name }\n all: enumValues(includeDeprecated: true) { name isDeprecated deprecationReason }\n }\n shape: __type(name: \"Shape\") { kind possibleT... |
cmst6cllz00evg4p25lguxmqj | Submission GUXMQJ | {
"sample_query": "{\n board(key: \"eng\") {\n key\n columns {\n name\n cards(last: 2, before: \"cur:c6\") {\n totalCount\n edges { cursor node { id title points } }\n pageInfo { hasNextPage hasPreviousPage startCursor endCursor }\n }\n }\n }\n}",
"resolver_code": "Que... |
cmst6cllz00ewg4p25k2j6or9 | Submission 2J6OR9 | {
"sample_query": "{\n roster { name jersey injury { kind weeksOut } }\n captain { name }\n vacancies { name }\n}",
"resolver_code": "Query: {\n roster: () => [\n { name: 'K. Abara', jersey: 7, injury: null },\n null,\n { name: 'T. Volkov', jersey: null, injury: { kind: 'hamstring', weeksOut: null } },... |
cmst6cllz00exg4p21tupypjb | Submission UPYPJB | {
"sample_query": "{\n crew(shift: DAY) {\n shift\n members { name badge }\n }\n}",
"resolver_code": "Query: { crew: (_, { shift }) => ({ shift, names: shift === 'DAY' ? ['Okafor', 'Lindqvist', 'Pereira'] : ['Haddad'] }) },\nCrew: { members: (crew) => crew.names.map((name) => ({ name, shift: crew.shift })) ... |
cmst6cllz00eyg4p25xciunl7 | Submission CIUNL7 | {
"sample_query": "mutation {\n transfer(from: \"acct-a\", to: \"acct-b\", cents: 5000) {\n receipt { code postedCents }\n balanceAfterCents\n }\n}",
"resolver_code": "Query: { balanceCents: (_, { account }) => ({ 'acct-a': 2500, 'acct-b': 18000 })[account] || 0 },\nMutation: { transfer: (_, args) => ({ fro... |
cmst6cllz00ezg4p20swsae1g | Submission WSAE1G | {
"sample_query": "{\n post(slug: \"ci-costs\") {\n slug\n headline\n tags { slug label }\n }\n}",
"resolver_code": "Query: { post: (_, { slug }) => { const rows = { 'ci-costs': { slug: 'ci-costs', headline: 'What our CI actually costs', rawTags: 'infra,money,ci' } }; const row = rows[slug]; if (!row) th... |
cmst6cllz00f0g4p2gve77yrs | Submission E77YRS | {
"sample_query": "{\n dishes(heat: SPICY) { name heat }\n}",
"resolver_code": "Query: { dishes: (_, { heat }) => [\n { name: 'Korma', heat: 'MILD' },\n { name: 'Rogan josh', heat: 'MEDIUM' },\n { name: 'Phaal', heat: 'HOT' }\n].filter((d) => d.heat === heat) }",
"expected_response": "{\"errors\": [{\"message... |
cmst6cllz00f1g4p2cve8n7w6 | Submission E8N7W6 | {
"sample_query": "{\n reactor(id: \"r-2\") {\n temperature { celsius }\n coolant\n }\n}",
"resolver_code": "Query: { reactor: (_, { id }) => ({ id, temperature: 318.4, coolant: { kind: 'heavy water', litres: 12400 } }) },\nReactor: { coolant: (r) => r.coolant }",
"expected_response": "{\"errors\": [{\"me... |
cmst6cllz00f2g4p22fa207cz | Submission A207CZ | {
"sample_query": "query GetPage($slug: ID!) {\n primary: page(slug: $slug) { title words }\n secondary: page(slug: $fallbackSlug) { title }\n}",
"resolver_code": "Query: { page: (_, { slug }) => ({ handbook: { slug: 'handbook', title: 'Field Handbook', words: 4200 }, faq: { slug: 'faq', title: 'FAQ', words: 900 ... |
cmst6cllz00f3g4p2r0wx7oic | Submission WX7OIC | {
"sample_query": "{\n published {\n __typename\n ...ident\n ... on Guide { steps }\n ... on Notice { severity }\n }\n notice: entity(id: \"n-4\") {\n __typename\n ...ident\n ... on Publishable { publishedAt }\n ... on Notice { severity }\n }\n}\nfragment ident on Entity { id }",
"resolv... |
cmst6cllz00f4g4p23on9fn8u | Submission N9FN8U | {
"sample_query": "{\n route(id: \"r-77\") {\n id\n km\n driveClear: eta(mode: CAR) { ...etaBits }\n driveJammed: eta(mode: CAR, trafficPct: 40) { ...etaBits }\n transit: eta(mode: TRANSIT, trafficPct: 15) { ...etaBits }\n longLeg: leg(index: 2) {\n from\n to\n km\n bike: eta(mo... |
cmst6cllz00f5g4p22ry9ncfv | Submission Y9NCFV | {
"sample_query": "{\n company(slug: \"northwind\") {\n name\n headcount\n departments {\n name\n headcount\n teams {\n name\n headcount\n lead { name title chain }\n members { name title chain }\n }\n }\n }\n}",
"resolver_code": "Query: { company: (_, {... |
cmsu4fykv00fig4p2uhczpppe | Submission CZPPPE | {
"sample_query": "{ tickets { ref } }",
"resolver_code": "Query: { tickets: () => [{ref: 'T-1'}, {ref: null}, {ref: 'T-3'}] }",
"expected_response": "{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Ticket.ref.\"}],\"data\":{\"tickets\":null}}",
"schema_definition": "type Ticket { ref: Str... |
cmsu4fykv00fjg4p2i8vvop51 | Submission VVOP51 | {
"sample_query": "{ ok: pick(c: RED) bad: pick(c: BLUE) }",
"resolver_code": "Query: { pick: (_, {c}) => 'got ' + c }",
"expected_response": "{\"errors\":[{\"message\":\"Value \\\"BLUE\\\" does not exist in \\\"Color\\\" enum.\"}]}",
"schema_definition": "enum Color { RED GREEN }\ntype Query { pick(c: Color!):... |
cmsu4fykv00fkg4p2tz6yk2dx | Submission 6YK2DX | {
"sample_query": "{ probe(id: 42) }",
"resolver_code": "Query: { probe: (_, {id}) => typeof id + ':' + id }",
"expected_response": "{\"data\":{\"probe\":\"string:42\"}}",
"schema_definition": "type Query { probe(id: ID!): String! }"
} |
cmsu4fykv00flg4p20luq0iqu | Submission UQ0IQU | {
"sample_query": "{ a: half(n: 8) b: half(n: 9) }",
"resolver_code": "Query: { half: (_, {n}) => n / 2 }",
"expected_response": "{\"data\":{\"a\":4,\"b\":4.5}}",
"schema_definition": "type Query { half(n: Int!): Float! }"
} |
cmsu4fykv00fmg4p2a55vqb5l | Submission 5VQB5L | {
"sample_query": "query { root { ...L child { ...L child { ...L } } } } fragment L on Node2 { label }",
"resolver_code": "Query: { root: () => ({label: 'a', child: {label: 'b', child: {label: 'c', child: null}}}) }",
"expected_response": "{\"data\":{\"root\":{\"label\":\"a\",\"child\":{\"label\":\"b\",\"child\":... |
cmsuh1ail00hgg4p2vht8r5lm | Submission T8R5LM | {
"sample_query": "{ cart { items { name price qty } total } }",
"resolver_code": "Query: { cart: () => { const db = { cart: { items: [{ name: 'Widget', price: 9.99, qty: 2 }, { name: 'Gadget', price: 19.99, qty: 1 }] } }; return db.cart; } },\nCart: { total: (cart) => cart.items.reduce((sum, i) => sum + i.price * ... |
cmsuh1ail00hhg4p2pmwuaqcp | Submission WUAQCP | {
"sample_query": "{ findBook(id: \"99\") { id title } }",
"resolver_code": "Query: { findBook: (_, {id}) => { const db = { books: [{ id: '1', title: 'Book One' }] }; return db.books.find(b => b.id === id) || null; } }",
"expected_response": "{\"data\": {\"findBook\": null}}",
"schema_definition": "type Book { ... |
cmsuh1ail00hig4p20mywnc3y | Submission YWNC3Y | {
"sample_query": "{ user(id: \"1\") { id status } }",
"resolver_code": "Query: { user: (_, {id}) => { const db = { users: [{ id: '1', status: 'PENDING' }, { id: '2', status: 'ACTIVE' }] }; return db.users.find(u => u.id === id); } }",
"expected_response": "{\"data\": {\"user\": {\"id\": \"1\", \"status\": \"PEND... |
cmsuh1ail00hjg4p2qk6prr1w | Submission 6PRR1W | {
"sample_query": "{ withdraw(amount: 150) }",
"resolver_code": "Query: { withdraw: (_, {amount}) => { const db = { balance: 100 }; if (amount > db.balance) throw new Error('insufficient funds'); return db.balance - amount; } }",
"expected_response": "{\"errors\": [{\"message\": \"insufficient funds\"}]}",
"sch... |
cmsuh1ail00hkg4p2w2r9k7ka | Submission R9K7KA | {
"sample_query": "{ product { name reviews { rating } averageRating } }",
"resolver_code": "Query: { product: () => { const db = { product: { name: 'Headphones', reviews: [{ rating: 4 }, { rating: 5 }, { rating: 3 }] } }; return db.product; } },\nProduct: { averageRating: (p) => p.reviews.reduce((s,r)=>s+r.rating,... |
cmsuhiol600jrg4p228a1fnne | Submission A1FNNE | {
"sample_query": "{ books(first: 2) { title } }",
"resolver_code": "Query: { books: (_, {first}) => [{title:'A'},{title:'B'},{title:'C'}].slice(0, first) }",
"expected_response": "{\"data\": {\"books\": [{\"title\": \"A\"}, {\"title\": \"B\"}]}}",
"schema_definition": "type Book { title: String! }\ntype Query ... |
cmsuhiol600jsg4p2jcgzkzzo | Submission GZKZZO | {
"sample_query": "{ author(id: \"1\") { name bookCount } }",
"resolver_code": "Query: { author: (_, {id}) => [{id:'1', name:'Toni Morrison', books:['Beloved','Sula','Jazz']}].find(a => a.id === id) },\nAuthor: { bookCount: (author) => author.books.length }",
"expected_response": "{\"data\": {\"author\": {\"name\... |
cmsuhiol600jtg4p25nvdwsb9 | Submission VDWSB9 | {
"sample_query": "{ profile(id: \"2\") { username bio } }",
"resolver_code": "Query: { profile: (_, {id}) => [{id:'2', username:'coder99', bio:null}].find(p => p.id === id) }",
"expected_response": "{\"data\": {\"profile\": {\"username\": \"coder99\", \"bio\": null}}}",
"schema_definition": "type Profile { use... |
cmsuhiol600jug4p2o7p1cdss | Submission P1CDSS | {
"sample_query": "mutation { increment(by: 5) }",
"resolver_code": "Mutation: { increment: (function() { let value = 10; return (_, {by}) => { value += by; return value; }; })() }",
"expected_response": "{\"data\": {\"increment\": 15}}",
"schema_definition": "type Query { counter: Int! }\ntype Mutation { incre... |
cmsuhiol600jvg4p25ue1futt | Submission E1FUTT | {
"sample_query": "{ order(id: \"5\") { id status } }",
"resolver_code": "Query: { order: (_, {id}) => [{id:'5', status:'SHIPPED'}].find(o => o.id === id) }",
"expected_response": "{\"data\": {\"order\": {\"id\": \"5\", \"status\": \"SHIPPED\"}}}",
"schema_definition": "enum OrderStatus { PENDING SHIPPED DELIVE... |
cmsuhl4k400jwg4p2pj5cegbw | Submission 5CEGBW | {
"sample_query": "{ movies(genre: \"Sci-Fi\") { title year } }",
"resolver_code": "Query: { movies: (_, {genre}) => [{title:'Dune', year:2021, genre:'Sci-Fi'},{title:'Heat', year:1995, genre:'Crime'},{title:'Arrival', year:2016, genre:'Sci-Fi'}].filter(m => m.genre === genre) }",
"expected_response": "{\"data\":... |
cmsuhl4k400jxg4p2056bs0mz | Submission 6BS0MZ | {
"sample_query": "{ squareRoot(n: -4) }",
"resolver_code": "Query: { squareRoot: (_, {n}) => { if (n < 0) throw new Error('cannot take square root of a negative number'); return Math.sqrt(n); } }",
"expected_response": "{\"errors\": [{\"message\": \"cannot take square root of a negative number\"}]}",
"schema_d... |
cmsuhl4k400jyg4p2kk1pzpvg | Submission 1PZPVG | {
"sample_query": "{ team(name: \"Falcons\") { name roster { name position } } }",
"resolver_code": "Query: { team: (_, {name}) => [{name:'Falcons', roster:[{name:'Sam', position:'QB'},{name:'Jo', position:'WR'}]}].find(t => t.name === name) }",
"expected_response": "{\"data\": {\"team\": {\"name\": \"Falcons\", ... |
cmsuhl4k400jzg4p216z00gwp | Submission Z00GWP | {
"sample_query": "{ product(id: \"p1\") { name price onSale } }",
"resolver_code": "Query: { product: (_, {id}) => { const p = [{id:'p1', name:'Headphones', price:49.99}].find(x => x.id === id); return {...p, onSale: p.price < 50}; } }",
"expected_response": "{\"data\": {\"product\": {\"name\": \"Headphones\", \... |
cmsuhl4k400k0g4p2159tywli | Submission 9TYWLI | {
"sample_query": "{ todos(done: true) { text } }",
"resolver_code": "Query: { todos: (_, {done}) => [{text:'Buy milk', done:true},{text:'Write report', done:false},{text:'Call mom', done:true}].filter(t => t.done === done) }",
"expected_response": "{\"data\": {\"todos\": [{\"text\": \"Buy milk\"}, {\"text\": \"C... |
cmsujbjjc00m1g4p2qcaz5fq9 | Submission AZ5FQ9 | {
"sample_query": "{ booksByAuthor(author: \"Orwell\") { title year } }",
"resolver_code": "Query: { booksByAuthor: (_, {author}) => { const db = { books: [{ title: '1984', author: 'Orwell', year: 1949 }, { title: 'Animal Farm', author: 'Orwell', year: 1945 }, { title: 'Brave New World', author: 'Huxley', year: 193... |
cmsujbjjc00m2g4p29k681ny6 | Submission 681NY6 | {
"sample_query": "{ safeSqrt(n: -4) }",
"resolver_code": "Query: { safeSqrt: (_, {n}) => { if (n < 0) throw new Error('cannot take sqrt of negative number'); return Math.sqrt(n); } }",
"expected_response": "{\"errors\": [{\"message\": \"cannot take sqrt of negative number\"}]}",
"schema_definition": "type Quer... |
cmsujbjjc00m3g4p24f615p6n | Submission 615P6N | {
"sample_query": "{ ordersByStatus(status: \"SHIPPED\") { id total } }",
"resolver_code": "Query: { ordersByStatus: (_, {status}) => { const db = { orders: [{ id: 'o1', status: 'SHIPPED', total: 59.5 }, { id: 'o2', status: 'PENDING', total: 12.25 }, { id: 'o3', status: 'SHIPPED', total: 99.0 }] }; return db.orders... |
cmsujbjjc00m4g4p27gbgfo93 | Submission BGFO93 | {
"sample_query": "{ formatCurrency(amount: 42.5, currency: \"USD\") }",
"resolver_code": "Query: { formatCurrency: (_, {amount, currency}) => { const symbols = {USD: '$', EUR: 'e', GBP: 'GBP '}; const sym = symbols[currency] || currency + ' '; return sym + amount.toFixed(2); } }",
"expected_response": "{\"data\"... |
cmsujbjjc00m5g4p2i5zgyg9y | Submission ZGYG9Y | {
"sample_query": "mutation { toggleTask(id: \"t1\") { id done } }",
"resolver_code": "Query: { placeholder: () => 'ok' },\nMutation: { toggleTask: (_, {id}) => { const db = { tasks: [{ id: 't1', done: false }] }; const t = db.tasks.find(t => t.id === id); if (!t) throw new Error('task not found'); t.done = !t.done... |
cmsuk7q7p00qcg4p2qjwciluj | Submission WCILUJ | {
"sample_query": "{ author(id: \"1\") { name books { title reviews { stars comment } } } }",
"resolver_code": "Query: (() => {\n globalThis.__db1 = {\n authors: [{ id: \"1\", name: \"Isaac Asimov\" }],\n books: [\n { id: \"b1\", title: \"Foundation\", authorId: \"1\" },\n { id: \"b2\", title: \"I,... |
cmsuk7q7p00qdg4p2w7ahncsv | Submission AHNCSV | {
"sample_query": "{ order(id: \"o9\") { customer total } }",
"resolver_code": "Query: (() => {\n const db = {\n orders: [\n { id: \"o1\", customer: \"Alice\", items: [{sku:\"A1\", qty:2, price:10.5}, {sku:\"A2\", qty:1, price:5.25}] }\n ]\n };\n return {\n order: (_, {id}) => {\n const order ... |
cmsuk7q7p00qeg4p22pg5jkdo | Submission G5JKDO | {
"sample_query": "{ post(id: \"p1\") { body comments { text likes { user } } } }",
"resolver_code": "Query: (() => {\n globalThis.__db3 = {\n posts: [{ id: \"p1\", body: \"Hello social world\" }],\n comments: [\n { id: \"c1\", postId: \"p1\", text: \"Nice!\" },\n { id: \"c2\", postId: \"p1\", text... |
cmsuk7q7p00qfg4p2mc3fr4gi | Submission 3FR4GI | {
"sample_query": "mutation { addComment(issueId: \"i1\", author: \"sam\", text: \"Working on it\") { title status comments { author text } } }",
"resolver_code": "Query: (() => {\n const db = {\n issues: [{ id: \"i1\", title: \"Login fails on Safari\", status: \"OPEN\", comments: [] }]\n };\n return {\n i... |
cmsuk7q7p00qgg4p27xbtp4xq | Submission BTP4XQ | {
"sample_query": "{ shipOrder(warehouseId: \"w1\", sku: \"S1\", qty: 50) }",
"resolver_code": "Query: (() => {\n const db = {\n warehouses: [\n { id: \"w1\", name: \"North DC\", products: [{ sku: \"S1\", stock: 12 }] }\n ]\n };\n return {\n warehouse: (_, {id}) => db.warehouses.find(w => w.id === ... |
cmsuk7q7p00qhg4p2iz9xubw6 | Submission 9XUBW6 | {
"sample_query": "{ posts { title tags { name } } }",
"resolver_code": "Query: (() => {\n const db = {\n posts: [\n { id: \"p1\", title: \"GraphQL Basics\", tagIds: [\"t1\", \"t2\"] },\n { id: \"p2\", title: \"Advanced Resolvers\", tagIds: [\"t2\"] }\n ],\n tags: [{ id: \"t1\", name: \"beginner... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.