{"submissionId":"cmsl775n1000aw6p2flflj4ez","title":"Submission FLJ4EZ","payload":{"sample_query":"query { author(id: \"a-7\") { name posts { title words } } }","resolver_code":"Query: { author: (_p, { id }) => id === 'a-7' ? { name: 'Ida Lane', postRows: [['Maps', 900], ['Trails', 1200]] } : null }, Author: { posts: (parent) => parent.postRows.map(([title, words]) => ({ title, words })) }","expected_response":"{\"data\":{\"author\":{\"name\":\"Ida Lane\",\"posts\":[{\"title\":\"Maps\",\"words\":900},{\"title\":\"Trails\",\"words\":1200}]}}}","schema_definition":"type Post { title: String!, words: Int! } type Author { name: String!, posts: [Post!]! } type Query { author(id: ID!): Author }"}} {"submissionId":"cmsl775n1000bw6p26wkjcdqh","title":"Submission KJCDQH","payload":{"sample_query":"query { repeat(word: \"go\") }","resolver_code":"Query: { repeat: (_p, { word, times }) => Array(times).fill(word).join('-') }","expected_response":"{\"data\":{\"repeat\":\"go-go-go\"}}","schema_definition":"type Query { repeat(word: String!, times: Int = 3): String! }"}} {"submissionId":"cmsl775n1000cw6p28t4rpk59","title":"Submission 4RPK59","payload":{"sample_query":"query { tickets(min: MED) { key priority } }","resolver_code":"Query: { tickets: (_p, { min }) => { const rank = { LOW: 0, MED: 1, HIGH: 2 }; const rows = [{ key: 'T-1', priority: 'LOW' }, { key: 'T-2', priority: 'HIGH' }, { key: 'T-3', priority: 'MED' }]; return rows.filter(r => rank[r.priority] >= rank[min]); } }","expected_response":"{\"data\":{\"tickets\":[{\"key\":\"T-2\",\"priority\":\"HIGH\"},{\"key\":\"T-3\",\"priority\":\"MED\"}]}}","schema_definition":"enum Priority { LOW MED HIGH } type Ticket { key: String!, priority: Priority! } type Query { tickets(min: Priority!): [Ticket!]! }"}} {"submissionId":"cmsl775n1000dw6p2bqj31h4n","title":"Submission J31H4N","payload":{"sample_query":"query { rect(w: 16, h: 9) { w h area landscape } }","resolver_code":"Query: { rect: (_p, { w, h }) => ({ w, h }) }, Rect: { area: (parent) => parent.w * parent.h, landscape: (parent) => parent.w > parent.h }","expected_response":"{\"data\":{\"rect\":{\"w\":16,\"h\":9,\"area\":144,\"landscape\":true}}}","schema_definition":"type Rect { w: Int!, h: Int!, area: Int!, landscape: Boolean! } type Query { rect(w: Int!, h: Int!): Rect! }"}} {"submissionId":"cmsl775n1000ew6p27k7dvpro","title":"Submission 7DVPRO","payload":{"sample_query":"query { stats(xs: [1.5, 2.5, 5.0]) { count mean spread } }","resolver_code":"Query: { stats: (_p, { xs }) => { const mean = xs.reduce((a, b) => a + b, 0) / xs.length; return { count: xs.length, mean, spread: Math.max(...xs) - Math.min(...xs) }; } }","expected_response":"{\"data\":{\"stats\":{\"count\":3,\"mean\":3,\"spread\":3.5}}}","schema_definition":"type Stats { count: Int!, mean: Float!, spread: Float! } type Query { stats(xs: [Float!]!): Stats! }"}} {"submissionId":"cmsmurl1f0077dmp23hmt8g25","title":"Submission MT8G25","payload":{"sample_query":"query { add(a: 7, b: 5) }","resolver_code":"Query: { add: (_p, { a, b }) => a + b }","expected_response":"{\"data\":{\"add\":12}}","schema_definition":"type Query { add(a: Int!, b: Int!): Int! }"}} {"submissionId":"cmsmurl1f0078dmp2be6r7ph7","title":"Submission 6R7PH7","payload":{"sample_query":"query { shout(text: \"hello\") }","resolver_code":"Query: { shout: (_p, { text }) => text.toUpperCase() }","expected_response":"{\"data\":{\"shout\":\"HELLO\"}}","schema_definition":"type Query { shout(text: String!): String! }"}} {"submissionId":"cmsmurl1f0079dmp2lhoef0sb","title":"Submission OEF0SB","payload":{"sample_query":"query { evens(limit: 4) }","resolver_code":"Query: { evens: (_p, { limit }) => Array.from({length: limit}, (_, i) => i * 2) }","expected_response":"{\"data\":{\"evens\":[0,2,4,6]}}","schema_definition":"type Query { evens(limit: Int!): [Int!]! }"}} {"submissionId":"cmsmurl1f007admp2r0c0ft56","title":"Submission C0FT56","payload":{"sample_query":"query { user(id: \"1\") { id name } }","resolver_code":"Query: { user: (_p, { id }) => id === '1' ? { id: '1', name: 'Ada' } : null }","expected_response":"{\"data\":{\"user\":{\"id\":\"1\",\"name\":\"Ada\"}}}","schema_definition":"type User { id: ID!, name: String! } type Query { user(id: ID!): User }"}} {"submissionId":"cmsmurl1f007bdmp2dd0tl7lr","title":"Submission 0TL7LR","payload":{"sample_query":"query { isEven(n: 10) }","resolver_code":"Query: { isEven: (_p, { n }) => n % 2 === 0 }","expected_response":"{\"data\":{\"isEven\":true}}","schema_definition":"type Query { isEven(n: Int!): Boolean! }"}} {"submissionId":"cmsmurl1f007cdmp2p9jiz3x0","title":"Submission JIZ3X0","payload":{"sample_query":"query { next(c: RED) }","resolver_code":"Query: { next: (_p, { c }) => ({ RED: 'GREEN', GREEN: 'BLUE', BLUE: 'RED' })[c] }","expected_response":"{\"data\":{\"next\":\"GREEN\"}}","schema_definition":"enum Color { RED GREEN BLUE } type Query { next(c: Color!): Color! }"}} {"submissionId":"cmsmurl1f007ddmp2hvcpz5l6","title":"Submission CPZ5L6","payload":{"sample_query":"query { repeat(s: \"ab\", n: 3) }","resolver_code":"Query: { repeat: (_p, { s, n }) => s.repeat(n) }","expected_response":"{\"data\":{\"repeat\":\"ababab\"}}","schema_definition":"type Query { repeat(s: String!, n: Int!): String! }"}} {"submissionId":"cmsmurl1f007edmp2a9ldojs4","title":"Submission LDOJS4","payload":{"sample_query":"query { stats(values: [3, 7, 1, 9]) { min max sum } }","resolver_code":"Query: { stats: (_p, { values }) => ({ min: Math.min(...values), max: Math.max(...values), sum: values.reduce((a,b)=>a+b,0) }) }","expected_response":"{\"data\":{\"stats\":{\"min\":1,\"max\":9,\"sum\":20}}}","schema_definition":"type Stats { min: Int!, max: Int!, sum: Int! } type Query { stats(values: [Int!]!): Stats! }"}} {"submissionId":"cmsmurl1f007fdmp21s0d3bct","title":"Submission 0D3BCT","payload":{"sample_query":"query { greeting }","resolver_code":"Query: { greeting: (_p, { name }) => `Hi ${name || 'there'}` }","expected_response":"{\"data\":{\"greeting\":\"Hi there\"}}","schema_definition":"type Query { greeting(name: String): String! }"}} {"submissionId":"cmsmurl1g007gdmp2fsue74ae","title":"Submission UE74AE","payload":{"sample_query":"query { cart { sku qty } }","resolver_code":"Query: { cart: () => [{ sku: 'A1', qty: 2 }, { sku: 'B2', qty: 1 }] }","expected_response":"{\"data\":{\"cart\":[{\"sku\":\"A1\",\"qty\":2},{\"sku\":\"B2\",\"qty\":1}]}}","schema_definition":"type Item { sku: String!, qty: Int! } type Query { cart: [Item!]! }"}} {"submissionId":"cmsmurl1g007hdmp2yl6on54l","title":"Submission 6ON54L","payload":{"sample_query":"query { toFixed(x: 3.14159, digits: 2) }","resolver_code":"Query: { toFixed: (_p, { x, digits }) => x.toFixed(digits) }","expected_response":"{\"data\":{\"toFixed\":\"3.14\"}}","schema_definition":"type Query { toFixed(x: Float!, digits: Int!): String! }"}} {"submissionId":"cmsmurl1g007idmp2n81yo20l","title":"Submission 1YO20L","payload":{"sample_query":"query { reverse(items: [\"a\", \"b\", \"c\"]) }","resolver_code":"Query: { reverse: (_p, { items }) => [...items].reverse() }","expected_response":"{\"data\":{\"reverse\":[\"c\",\"b\",\"a\"]}}","schema_definition":"type Query { reverse(items: [String!]!): [String!]! }"}} {"submissionId":"cmsmurl1g007jdmp2okm1t1g9","title":"Submission M1T1G9","payload":{"sample_query":"query { translate(x: 1, y: 2, dx: 5, dy: -3) { x y } }","resolver_code":"Query: { translate: (_p, { x, y, dx, dy }) => ({ x: x + dx, y: y + dy }) }","expected_response":"{\"data\":{\"translate\":{\"x\":6,\"y\":-1}}}","schema_definition":"type Point { x: Int!, y: Int! } type Query { translate(x: Int!, y: Int!, dx: Int!, dy: Int!): Point! }"}} {"submissionId":"cmsmurl1g007kdmp2p387zrdc","title":"Submission 87ZRDC","payload":{"sample_query":"query { clamp(v: 15, lo: 0, hi: 10) }","resolver_code":"Query: { clamp: (_p, { v, lo, hi }) => Math.max(lo, Math.min(v, hi)) }","expected_response":"{\"data\":{\"clamp\":10}}","schema_definition":"type Query { clamp(v: Int!, lo: Int!, hi: Int!): Int! }"}} {"submissionId":"cmsmurl1g007ldmp2dzmia2qd","title":"Submission MIA2QD","payload":{"sample_query":"query { profile(handle: \"maheshk218\") { handle followers } }","resolver_code":"Query: { profile: (_p, { handle }) => ({ handle, followers: handle.length * 10 }) }","expected_response":"{\"data\":{\"profile\":{\"handle\":\"maheshk218\",\"followers\":100}}}","schema_definition":"type Profile { handle: String!, followers: Int! } type Query { profile(handle: String!): Profile }"}} {"submissionId":"cmsmurl1g007mdmp2wwkfhm5g","title":"Submission KFHM5G","payload":{"sample_query":"query { median(values: [5, 1, 3, 2]) }","resolver_code":"Query: { median: (_p, { values }) => { const s = [...values].sort((a,b)=>a-b); const m = Math.floor(s.length/2); return s.length % 2 ? s[m] : (s[m-1]+s[m])/2; } }","expected_response":"{\"data\":{\"median\":2.5}}","schema_definition":"type Query { median(values: [Int!]!): Float! }"}} {"submissionId":"cmsmurl1g007ndmp2f43m6pnn","title":"Submission 3M6PNN","payload":{"sample_query":"query { countWords(text: \"the quick brown fox\") }","resolver_code":"Query: { countWords: (_p, { text }) => text.trim().split(/\\s+/).filter(Boolean).length }","expected_response":"{\"data\":{\"countWords\":4}}","schema_definition":"type Query { countWords(text: String!): Int! }"}} {"submissionId":"cmsmurl1g007odmp20vhyioce","title":"Submission HYIOCE","payload":{"sample_query":"query { order(id: \"3\") { id total } }","resolver_code":"Query: { order: (_p, { id }) => ({ id, total: Number(id) * 100 }) }","expected_response":"{\"data\":{\"order\":{\"id\":\"3\",\"total\":300}}}","schema_definition":"type Order { id: ID!, total: Int! } type Query { order(id: ID!): Order }"}} {"submissionId":"cmsnc5up2008m6zp250dyz798","title":"Submission DYZ798","payload":{"sample_query":"{ greeting(name: \"Ada\") }","resolver_code":"Query: { greeting: (_, {name}) => `Hello, ${name}!` }","expected_response":"{\"data\":{\"greeting\":\"Hello, Ada!\"}}","schema_definition":"type Query { greeting(name: String!): String! }"}} {"submissionId":"cmsnc5up2008n6zp27wu8di1k","title":"Submission U8DI1K","payload":{"sample_query":"{ add(a: 17, b: 25) }","resolver_code":"Query: { add: (_, {a,b}) => a + b }","expected_response":"{\"data\":{\"add\":42}}","schema_definition":"type Query { add(a: Int!, b: Int!): Int! }"}} {"submissionId":"cmsnc5up2008o6zp2zvbl9wfo","title":"Submission BL9WFO","payload":{"sample_query":"{ isEven(value: 14) }","resolver_code":"Query: { isEven: (_, {value}) => value % 2 === 0 }","expected_response":"{\"data\":{\"isEven\":true}}","schema_definition":"type Query { isEven(value: Int!): Boolean! }"}} {"submissionId":"cmsnc5up2008p6zp20to5xfbu","title":"Submission O5XFBU","payload":{"sample_query":"{ clamp(value: 17, min: 0, max: 10) }","resolver_code":"Query: { clamp: (_, {value,min,max}) => Math.min(max, Math.max(min, value)) }","expected_response":"{\"data\":{\"clamp\":10}}","schema_definition":"type Query { clamp(value: Int!, min: Int!, max: Int!): Int! }"}} {"submissionId":"cmsnc5up2008q6zp2b7ncyhps","title":"Submission NCYHPS","payload":{"sample_query":"{ repeat(text: \"ab\", times: 3) }","resolver_code":"Query: { repeat: (_, {text,times}) => text.repeat(times) }","expected_response":"{\"data\":{\"repeat\":\"ababab\"}}","schema_definition":"type Query { repeat(text: String!, times: Int!): String! }"}} {"submissionId":"cmsnc5up2008r6zp2hmyhalk8","title":"Submission YHALK8","payload":{"sample_query":"{ numbers(limit: 4) }","resolver_code":"Query: { numbers: (_, {limit}) => Array.from({length: limit}, (_,i) => i + 1) }","expected_response":"{\"data\":{\"numbers\":[1,2,3,4]}}","schema_definition":"type Query { numbers(limit: Int!): [Int!]! }"}} {"submissionId":"cmsnc5up2008s6zp23ipysys6","title":"Submission PYSYS6","payload":{"sample_query":"{ person { name age } }","resolver_code":"Query: { person: () => ({name: 'Mira', age: 29}) }","expected_response":"{\"data\":{\"person\":{\"name\":\"Mira\",\"age\":29}}}","schema_definition":"type Person { name: String!, age: Int! } type Query { person: Person! }"}} {"submissionId":"cmsnc5up2008t6zp2wogb1xg7","title":"Submission GB1XG7","payload":{"sample_query":"{ metrics { key value } }","resolver_code":"Query: { metrics: () => [{key:'cpu',value:0.75},{key:'memory',value:0.5}] }","expected_response":"{\"data\":{\"metrics\":[{\"key\":\"cpu\",\"value\":0.75},{\"key\":\"memory\",\"value\":0.5}]}}","schema_definition":"type Metric { key: String!, value: Float! } type Query { metrics: [Metric!]! }"}} {"submissionId":"cmsnc5up2008u6zp2dvhka7nx","title":"Submission HKA7NX","payload":{"sample_query":"{ uppercase(text: \"Graphql\") }","resolver_code":"Query: { uppercase: (_, {text}) => text.toUpperCase() }","expected_response":"{\"data\":{\"uppercase\":\"GRAPHQL\"}}","schema_definition":"type Query { uppercase(text: String!): String! }"}} {"submissionId":"cmsnc5up2008v6zp28xz93l38","title":"Submission Z93L38","payload":{"sample_query":"{ divideExact(a: 7, b: 2) }","resolver_code":"Query: { divideExact: (_, {a,b}) => { if (b === 0) throw new Error('zero denominator'); return a / b; } }","expected_response":"{\"data\":{\"divideExact\":3.5}}","schema_definition":"type Query { divideExact(a: Int!, b: Int!): Float! }"}} {"submissionId":"cmsnc5up2008w6zp22hjyb5aa","title":"Submission JYB5AA","payload":{"sample_query":"{ safeDivide(a: 9, b: 0) }","resolver_code":"Query: { safeDivide: (_, {a,b}) => { if (b === 0) throw new Error('cannot divide by zero'); return a / b; } }","expected_response":"{\"errors\":[{\"message\":\"cannot divide by zero\"}]}","schema_definition":"type Query { safeDivide(a: Int!, b: Int!): Float! }"}} {"submissionId":"cmsnc5up2008x6zp2ua09eng1","title":"Submission 09ENG1","payload":{"sample_query":"{ min(values: [8, 3, 11, -2]) }","resolver_code":"Query: { min: (_, {values}) => values.length ? Math.min(...values) : null }","expected_response":"{\"data\":{\"min\":-2}}","schema_definition":"type Query { min(values: [Int!]!): Int }"}} {"submissionId":"cmsnc5up3008y6zp2xrxcn29z","title":"Submission XCN29Z","payload":{"sample_query":"{ countWords(text: \"one two three\") }","resolver_code":"Query: { countWords: (_, {text}) => text.trim() ? text.trim().split(/\\s+/).length : 0 }","expected_response":"{\"data\":{\"countWords\":3}}","schema_definition":"type Query { countWords(text: String!): Int! }"}} {"submissionId":"cmsnc5up3008z6zp2boxzsncq","title":"Submission XZSNCQ","payload":{"sample_query":"{ item(id: \"2\") { id label } }","resolver_code":"Query: { item: (_, {id}) => id === '2' ? {id:'2',label:'second'} : null }","expected_response":"{\"data\":{\"item\":{\"id\":\"2\",\"label\":\"second\"}}}","schema_definition":"type Item { id: ID!, label: String! } type Query { item(id: ID!): Item }"}} {"submissionId":"cmsnc5up300906zp21kvzh8ac","title":"Submission VZH8AC","payload":{"sample_query":"{ unique(values: [\"a\", \"b\", \"a\", \"c\", \"b\"]) }","resolver_code":"Query: { unique: (_, {values}) => [...new Set(values)] }","expected_response":"{\"data\":{\"unique\":[\"a\",\"b\",\"c\"]}}","schema_definition":"type Query { unique(values: [String!]!): [String!]! }"}} {"submissionId":"cmsnc5up300916zp221t0k8lk","title":"Submission T0K8LK","payload":{"sample_query":"{ stats(values: [2, 4, 6, 8]) { total average } }","resolver_code":"Query: { stats: (_, {values}) => ({total: values.reduce((a,b)=>a+b,0), average: values.length ? values.reduce((a,b)=>a+b,0)/values.length : 0}) }","expected_response":"{\"data\":{\"stats\":{\"total\":20,\"average\":5}}}","schema_definition":"type Stats { total: Int!, average: Float! } type Query { stats(values: [Int!]!): Stats! }"}} {"submissionId":"cmsnc5up300926zp2tbhw0z71","title":"Submission HW0Z71","payload":{"sample_query":"{ reverse(text: \"stressed\") }","resolver_code":"Query: { reverse: (_, {text}) => [...text].reverse().join('') }","expected_response":"{\"data\":{\"reverse\":\"desserts\"}}","schema_definition":"type Query { reverse(text: String!): String! }"}} {"submissionId":"cmsnc5up300936zp2azpr2yrx","title":"Submission PR2YRX","payload":{"sample_query":"{ features { name enabled } }","resolver_code":"Query: { features: () => [{name:'search',enabled:true},{name:'legacy',enabled:false}] }","expected_response":"{\"data\":{\"features\":[{\"name\":\"search\",\"enabled\":true},{\"name\":\"legacy\",\"enabled\":false}]}}","schema_definition":"type Entry { name: String!, enabled: Boolean! } type Query { features: [Entry!]! }"}} {"submissionId":"cmsnc5up300946zp29gkfmyvn","title":"Submission KFMYVN","payload":{"sample_query":"{ severity(score: 65) }","resolver_code":"Query: { severity: (_, {score}) => score >= 80 ? 'HIGH' : score >= 40 ? 'MEDIUM' : 'LOW' }","expected_response":"{\"data\":{\"severity\":\"MEDIUM\"}}","schema_definition":"enum Level { LOW MEDIUM HIGH } type Query { severity(score: Int!): Level! }"}} {"submissionId":"cmsnc5up300956zp2lole2qio","title":"Submission LE2QIO","payload":{"sample_query":"{ slice(values: [10,20,30,40,50], start: 1, count: 3) }","resolver_code":"Query: { slice: (_, {values,start,count}) => values.slice(start, start + count) }","expected_response":"{\"data\":{\"slice\":[20,30,40]}}","schema_definition":"type Query { slice(values: [Int!]!, start: Int!, count: Int!): [Int!]! }"}} {"submissionId":"cmso87qva00c86zp22gn4lctc","title":"Submission N4LCTC","payload":{"sample_query":"{ square(x: 7) }","resolver_code":"Query: { square: (_, {x}) => x*x }","expected_response":"{\"data\":{\"square\":49}}","schema_definition":"type Query { square(x:Int!): Int! }"}} {"submissionId":"cmso87qva00c96zp2wu83165l","title":"Submission 83165L","payload":{"sample_query":"{ greet(name:\"Ada\") }","resolver_code":"Query: { greet: (_, {name}) => `Hello, ${name}!` }","expected_response":"{\"data\":{\"greet\":\"Hello, Ada!\"}}","schema_definition":"type Query { greet(name:String!): String! }"}} {"submissionId":"cmso87qva00ca6zp2ugdmip0r","title":"Submission DMIP0R","payload":{"sample_query":"{ even(x: 12) }","resolver_code":"Query: { even: (_, {x}) => x % 2 === 0 }","expected_response":"{\"data\":{\"even\":true}}","schema_definition":"type Query { even(x:Int!): Boolean! }"}} {"submissionId":"cmso87qva00cc6zp2tpiq7ll1","title":"Submission IQ7LL1","payload":{"sample_query":"{ initials(first:\"Grace\",last:\"Hopper\") }","resolver_code":"Query: { initials: (_, {first,last}) => first[0]+last[0] }","expected_response":"{\"data\":{\"initials\":\"GH\"}}","schema_definition":"type Query { initials(first:String!, last:String!): String! }"}} {"submissionId":"cmso87qva00cd6zp2i1ym9el4","title":"Submission YM9EL4","payload":{"sample_query":"{ max(a:-2,b:5) }","resolver_code":"Query: { max: (_, {a,b}) => Math.max(a,b) }","expected_response":"{\"data\":{\"max\":5}}","schema_definition":"type Query { max(a:Int!,b:Int!): Int! }"}} {"submissionId":"cmso87qva00cf6zp2zt2w91fu","title":"Submission 2W91FU","payload":{"sample_query":"{ length(text:\"dataset\") }","resolver_code":"Query: { length: (_, {text}) => text.length }","expected_response":"{\"data\":{\"length\":7}}","schema_definition":"type Query { length(text:String!): Int! }"}} {"submissionId":"cmso87qva00cg6zp2opyckcpd","title":"Submission YCKCPD","payload":{"sample_query":"{ upper(text:\"Graphql\") }","resolver_code":"Query: { upper: (_, {text}) => text.toUpperCase() }","expected_response":"{\"data\":{\"upper\":\"GRAPHQL\"}}","schema_definition":"type Query { upper(text:String!): String! }"}} {"submissionId":"cmso87qva00ch6zp2inhrnk0z","title":"Submission HRNK0Z","payload":{"sample_query":"{ add(a:1.5,b:2.25) }","resolver_code":"Query: { add: (_, {a,b}) => a+b }","expected_response":"{\"data\":{\"add\":3.75}}","schema_definition":"type Query { add(a:Float!,b:Float!): Float! }"}} {"submissionId":"cmso87qvb00ci6zp2wcotj931","title":"Submission OTJ931","payload":{"sample_query":"{ abs(x:-19) }","resolver_code":"Query: { abs: (_, {x}) => Math.abs(x) }","expected_response":"{\"data\":{\"abs\":19}}","schema_definition":"type Query { abs(x:Int!): Int! }"}} {"submissionId":"cmso87qvb00cj6zp21mbpy9v7","title":"Submission BPY9V7","payload":{"sample_query":"{ contains(text:\"community pool\",part:\"pool\") }","resolver_code":"Query: { contains: (_, {text,part}) => text.includes(part) }","expected_response":"{\"data\":{\"contains\":true}}","schema_definition":"type Query { contains(text:String!, part:String!): Boolean! }"}} {"submissionId":"cmso87qvb00ck6zp2sf78n12a","title":"Submission 78N12A","payload":{"sample_query":"{ first(values:[8,3,1]) }","resolver_code":"Query: { first: (_, {values}) => values.length ? values[0] : null }","expected_response":"{\"data\":{\"first\":8}}","schema_definition":"type Query { first(values:[Int!]!): Int }"}} {"submissionId":"cmso87qvb00cl6zp2sduhbhk3","title":"Submission UHBHK3","payload":{"sample_query":"{ sum(values:[2,4,6]) }","resolver_code":"Query: { sum: (_, {values}) => values.reduce((a,b)=>a+b,0) }","expected_response":"{\"data\":{\"sum\":12}}","schema_definition":"type Query { sum(values:[Int!]!): Int! }"}} {"submissionId":"cmso87qvb00cm6zp2qc719b3o","title":"Submission 719B3O","payload":{"sample_query":"{ count(values:[\"a\",\"b\",\"c\"]) }","resolver_code":"Query: { count: (_, {values}) => values.length }","expected_response":"{\"data\":{\"count\":3}}","schema_definition":"type Query { count(values:[String!]!): Int! }"}} {"submissionId":"cmso87qvb00cn6zp285s9cwqj","title":"Submission S9CWQJ","payload":{"sample_query":"{ join(values:[\"a\",\"b\",\"c\"],sep:\"-\") }","resolver_code":"Query: { join: (_, {values,sep}) => values.join(sep) }","expected_response":"{\"data\":{\"join\":\"a-b-c\"}}","schema_definition":"type Query { join(values:[String!]!, sep:String!): String! }"}} {"submissionId":"cmso87qvb00co6zp2bk8dfuh9","title":"Submission 8DFUH9","payload":{"sample_query":"{ reverse(text:\"abcde\") }","resolver_code":"Query: { reverse: (_, {text}) => [...text].reverse().join('') }","expected_response":"{\"data\":{\"reverse\":\"edcba\"}}","schema_definition":"type Query { reverse(text:String!): String! }"}} {"submissionId":"cmso87qvd00cp6zp22oxfjpv2","title":"Submission XFJPV2","payload":{"sample_query":"{ positive(x:0) }","resolver_code":"Query: { positive: (_, {x}) => x > 0 }","expected_response":"{\"data\":{\"positive\":false}}","schema_definition":"type Query { positive(x:Int!): Boolean! }"}} {"submissionId":"cmso87qvd00cq6zp2ww13qxm2","title":"Submission 13QXM2","payload":{"sample_query":"{ range(n:4) }","resolver_code":"Query: { range: (_, {n}) => Array.from({length:n},(_,i)=>i) }","expected_response":"{\"data\":{\"range\":[0,1,2,3]}}","schema_definition":"type Query { range(n:Int!): [Int!]! }"}} {"submissionId":"cmso87qvd00cr6zp2pv5ld4ej","title":"Submission 5LD4EJ","payload":{"sample_query":"{ min(values:[9,-2,5]) }","resolver_code":"Query: { min: (_, {values}) => Math.min(...values) }","expected_response":"{\"data\":{\"min\":-2}}","schema_definition":"type Query { min(values:[Int!]!): Int! }"}} {"submissionId":"cmso87qvd00cs6zp2m8bk2ack","title":"Submission BK2ACK","payload":{"sample_query":"{ starts(text:\"resolver\",prefix:\"res\") }","resolver_code":"Query: { starts: (_, {text,prefix}) => text.startsWith(prefix) }","expected_response":"{\"data\":{\"starts\":true}}","schema_definition":"type Query { starts(text:String!, prefix:String!): Boolean! }"}} {"submissionId":"cmso87qvd00ct6zp2ph73l0w7","title":"Submission 73L0W7","payload":{"sample_query":"{ power(a:3,b:4) }","resolver_code":"Query: { power: (_, {a,b}) => a ** b }","expected_response":"{\"data\":{\"power\":81}}","schema_definition":"type Query { power(a:Int!,b:Int!): Int! }"}} {"submissionId":"cmso87qvd00cu6zp24difot2t","title":"Submission IFOT2T","payload":{"sample_query":"{ safeDivide(a:9,b:0) }","resolver_code":"Query: { safeDivide: (_, {a,b}) => b===0 ? null : a/b }","expected_response":"{\"data\":{\"safeDivide\":null}}","schema_definition":"type Query { safeDivide(a:Int!,b:Int!): Float }"}} {"submissionId":"cmso87qvd00cv6zp2s9061srr","title":"Submission 061SRR","payload":{"sample_query":"{ last(values:[\"x\",\"y\",\"z\"]) }","resolver_code":"Query: { last: (_, {values}) => values.length ? values[values.length-1] : null }","expected_response":"{\"data\":{\"last\":\"z\"}}","schema_definition":"type Query { last(values:[String!]!): String }"}} {"submissionId":"cmso87qvd00cw6zp2i64ffydj","title":"Submission 4FFYDJ","payload":{"sample_query":"{ words(text:\"one two three\") }","resolver_code":"Query: { words: (_, {text}) => text.trim() ? text.trim().split(/\\s+/).length : 0 }","expected_response":"{\"data\":{\"words\":3}}","schema_definition":"type Query { words(text:String!): Int! }"}} {"submissionId":"cmso87qvd00cx6zp2zv0c18ow","title":"Submission 0C18OW","payload":{"sample_query":"{ xor(a:true,b:false) }","resolver_code":"Query: { xor: (_, {a,b}) => a !== b }","expected_response":"{\"data\":{\"xor\":true}}","schema_definition":"type Query { xor(a:Boolean!,b:Boolean!): Boolean! }"}} {"submissionId":"cmso87qvd00cy6zp2xt8xm8i0","title":"Submission 8XM8I0","payload":{"sample_query":"{ median3(a:9,b:2,c:5) }","resolver_code":"Query: { median3: (_, {a,b,c}) => [a,b,c].sort((x,y)=>x-y)[1] }","expected_response":"{\"data\":{\"median3\":5}}","schema_definition":"type Query { median3(a:Int!,b:Int!,c:Int!): Int! }"}} {"submissionId":"cmso87qvd00cz6zp2hhep6jmx","title":"Submission EP6JMX","payload":{"sample_query":"{ replace(text:\"a-b-a\",from:\"a\",to:\"x\") }","resolver_code":"Query: { replace: (_, {text,from,to}) => text.split(from).join(to) }","expected_response":"{\"data\":{\"replace\":\"x-b-x\"}}","schema_definition":"type Query { replace(text:String!,from:String!,to:String!): String! }"}} {"submissionId":"cmso87qvd00d06zp22d3rtrb5","title":"Submission 3RTRB5","payload":{"sample_query":"{ factorial(n:6) }","resolver_code":"Query: { factorial: (_, {n}) => { let r=1; for(let i=2;i<=n;i++) r*=i; return r; } }","expected_response":"{\"data\":{\"factorial\":720}}","schema_definition":"type Query { factorial(n:Int!): Int! }"}} {"submissionId":"cmso87qvd00d16zp2gjf027ac","title":"Submission F027AC","payload":{"sample_query":"{ unique(values:[1,2,1,3,2]) }","resolver_code":"Query: { unique: (_, {values}) => [...new Set(values)] }","expected_response":"{\"data\":{\"unique\":[1,2,3]}}","schema_definition":"type Query { unique(values:[Int!]!): [Int!]! }"}} {"submissionId":"cmsr3le8d000032p23kkyil4r","title":"Submission KYIL4R","payload":{"sample_query":"{ account(id: \"acct-7\") { id tier usage(multiplier: 2) { requests storageGb } } }","resolver_code":"Query: { account: (_, {id}) => id === 'acct-7' ? ({ id, tier: 'PRO', requests: 1200, storage: 18.5 }) : null }, Account: { usage: (a, {multiplier}) => ({ requests: a.requests * multiplier, storageGb: a.storage * multiplier }) }","expected_response":"{\"data\":{\"account\":{\"id\":\"acct-7\",\"tier\":\"PRO\",\"usage\":{\"requests\":2400,\"storageGb\":37}}}}","schema_definition":"enum Tier { FREE PRO ENTERPRISE }\ntype Usage { requests: Int!, storageGb: Float! }\ntype Account { id: ID!, tier: Tier!, usage(multiplier: Int = 1): Usage! }\ntype Query { account(id: ID!): Account }"}} {"submissionId":"cmsr3le8e000132p2np7co8m7","title":"Submission 7CO8M7","payload":{"sample_query":"{ order(id:\"ord-9\") { id items(minQty:2) { sku qty subtotal } total(minQty:2) } }","resolver_code":"Query: { order: (_, {id}) => ({ id, items: [{sku:'A1',qty:2,unitPrice:4.5},{sku:'B2',qty:1,unitPrice:9},{sku:'C3',qty:3,unitPrice:2}] }) }, Order: { items: (o,{minQty}) => o.items.filter(x => x.qty >= minQty), total: (o,{minQty}) => o.items.filter(x => x.qty >= minQty).reduce((s,x)=>s+x.qty*x.unitPrice,0) }, LineItem: { subtotal: (x) => x.qty * x.unitPrice }","expected_response":"{\"data\":{\"order\":{\"id\":\"ord-9\",\"items\":[{\"sku\":\"A1\",\"qty\":2,\"subtotal\":9},{\"sku\":\"C3\",\"qty\":3,\"subtotal\":6}],\"total\":15}}}","schema_definition":"type LineItem { sku: String!, qty: Int!, unitPrice: Float!, subtotal: Float! }\ntype Order { id: ID!, items(minQty: Int!): [LineItem!]!, total(minQty: Int!): Float! }\ntype Query { order(id: ID!): Order }"}} {"submissionId":"cmsr3le8e000232p2ln6rw5x2","title":"Submission 6RW5X2","payload":{"sample_query":"{ sensor(id:\"s-2\") { readings(from:2,to:4){ minute value } average(from:2,to:4) } }","resolver_code":"Query: { sensor: (_, {id}) => ({ id, readings: [{minute:1,value:10},{minute:2,value:14},{minute:3,value:8},{minute:4,value:12}] }) }, Sensor: { readings: (s,{from,to}) => s.readings.filter(r => r.minute >= from && r.minute <= to), average: (s,{from,to}) => { const xs=s.readings.filter(r=>r.minute>=from&&r.minute<=to); return xs.length ? xs.reduce((a,b)=>a+b.value,0)/xs.length : null; } }","expected_response":"{\"data\":{\"sensor\":{\"readings\":[{\"minute\":2,\"value\":14},{\"minute\":3,\"value\":8},{\"minute\":4,\"value\":12}],\"average\":11.333333333333334}}}","schema_definition":"type Reading { minute: Int!, value: Float! }\ntype Sensor { id: ID!, readings(from: Int!, to: Int!): [Reading!]!, average(from: Int!, to: Int!): Float }\ntype Query { sensor(id: ID!): Sensor! }"}} {"submissionId":"cmsr3le8e000332p2wwwzurvt","title":"Submission WZURVT","payload":{"sample_query":"{ node(id:\"t-3\") { id ... on User { name score } ... on Team { name members } } }","resolver_code":"Query: { node: (_, {id}) => id.startsWith('u') ? ({__kind:'User',id,name:'Mira',score:91}) : ({__kind:'Team',id,name:'Atlas',members:6}) }, Node: { __resolveType: (obj) => obj.__kind }","expected_response":"{\"data\":{\"node\":{\"id\":\"t-3\",\"name\":\"Atlas\",\"members\":6}}}","schema_definition":"interface Node { id: ID! }\ntype User implements Node { id: ID!, name: String!, score: Int! }\ntype Team implements Node { id: ID!, name: String!, members: Int! }\ntype Query { node(id: ID!): Node }"}} {"submissionId":"cmsr3le8e000432p23ldy5w0c","title":"Submission DY5W0C","payload":{"sample_query":"{ search(term:\"GRAPH\") { __typename ... on Article { title words } ... on Repository { name stars } } }","resolver_code":"Query: { search: (_, {term}) => term.toLowerCase() === 'graph' ? [{kind:'Article',title:'Graph Systems',words:1800},{kind:'Repository',name:'graph-kit',stars:420}] : [] }, SearchResult: { __resolveType: (obj) => obj.kind }","expected_response":"{\"data\":{\"search\":[{\"__typename\":\"Article\",\"title\":\"Graph Systems\",\"words\":1800},{\"__typename\":\"Repository\",\"name\":\"graph-kit\",\"stars\":420}]}}","schema_definition":"union SearchResult = Article | Repository\ntype Article { title: String!, words: Int! }\ntype Repository { name: String!, stars: Int! }\ntype Query { search(term: String!): [SearchResult!]! }"}} {"submissionId":"cmsr3le8e000532p2x6g184c7","title":"Submission G184C7","payload":{"sample_query":"{ products(minPrice:30, sort:DESC){ totalCount nodes { name price } } }","resolver_code":"Query: { products: (_, {minPrice,sort}) => { const all=[{name:'Desk',price:120},{name:'Lamp',price:35},{name:'Chair',price:85},{name:'Mat',price:25}].filter(p=>p.price>=minPrice); all.sort((a,b)=>sort==='ASC'?a.price-b.price:b.price-a.price); return {nodes:all,totalCount:all.length}; } }","expected_response":"{\"data\":{\"products\":{\"totalCount\":3,\"nodes\":[{\"name\":\"Desk\",\"price\":120},{\"name\":\"Chair\",\"price\":85},{\"name\":\"Lamp\",\"price\":35}]}}}","schema_definition":"enum Sort { ASC DESC }\ntype Product { name: String!, price: Float! }\ntype ProductPage { nodes: [Product!]!, totalCount: Int! }\ntype Query { products(minPrice: Float!, sort: Sort!): ProductPage! }"}} {"submissionId":"cmsr3le8e000632p2r5u5wr6n","title":"Submission U5WR6N","payload":{"sample_query":"{ post(slug:\"deep-dive\") { title commentCount comments(limit:2){ author body } } }","resolver_code":"Query: { post: (_, {slug}) => slug === 'deep-dive' ? ({title:'Deep Dive',comments:[{body:'First',author:'Ana'},{body:'Second',author:'Bo'},{body:'Third',author:'Cy'}]}) : null }, Post: { comments: (p,{limit}) => p.comments.slice(0,limit), commentCount: (p) => p.comments.length }","expected_response":"{\"data\":{\"post\":{\"title\":\"Deep Dive\",\"commentCount\":3,\"comments\":[{\"author\":\"Ana\",\"body\":\"First\"},{\"author\":\"Bo\",\"body\":\"Second\"}]}}}","schema_definition":"type Comment { body: String!, author: String! }\ntype Post { title: String!, comments(limit: Int = 2): [Comment!]!, commentCount: Int! }\ntype Query { post(slug: String!): Post }"}} {"submissionId":"cmsr3le8e000732p2cemdu3jy","title":"Submission MDU3JY","payload":{"sample_query":"{ invoice(id:\"inv-4\") { id net { currency amount } tax(rate:0.08){ amount } gross(rate:0.08){ amount } } }","resolver_code":"Query: { invoice: (_, {id}) => ({id,base:250,currency:'USD'}) }, Invoice: { net: (i) => ({currency:i.currency,amount:i.base}), tax: (i,{rate}) => ({currency:i.currency,amount:i.base*rate}), gross: (i,{rate}) => ({currency:i.currency,amount:i.base*(1+rate)}) }","expected_response":"{\"data\":{\"invoice\":{\"id\":\"inv-4\",\"net\":{\"currency\":\"USD\",\"amount\":250},\"tax\":{\"amount\":20},\"gross\":{\"amount\":270}}}}","schema_definition":"type Money { currency: String!, amount: Float! }\ntype Invoice { id: ID!, net: Money!, tax(rate: Float!): Money!, gross(rate: Float!): Money! }\ntype Query { invoice(id: ID!): Invoice! }"}} {"submissionId":"cmsr3le8e000832p25fdxdmxu","title":"Submission DXDMXU","payload":{"sample_query":"{ matrix(size:3) { size diagonalSum cells(minValue:7){ row col value } } }","resolver_code":"Query: { matrix: (_, {size}) => ({size,cells:Array.from({length:size*size},(_,i)=>({row:Math.floor(i/size),col:i%size,value:i+1}))}) }, Matrix: { cells: (m,{minValue}) => m.cells.filter(c=>c.value>=minValue), diagonalSum: (m) => m.cells.filter(c=>c.row===c.col).reduce((s,c)=>s+c.value,0) }","expected_response":"{\"data\":{\"matrix\":{\"size\":3,\"diagonalSum\":15,\"cells\":[{\"row\":2,\"col\":0,\"value\":7},{\"row\":2,\"col\":1,\"value\":8},{\"row\":2,\"col\":2,\"value\":9}]}}}","schema_definition":"type Cell { row: Int!, col: Int!, value: Int! }\ntype Matrix { size: Int!, cells(minValue: Int!): [Cell!]!, diagonalSum: Int! }\ntype Query { matrix(size: Int!): Matrix! }"}} {"submissionId":"cmsr3le8e000932p2dohd1zkn","title":"Submission HD1ZKN","payload":{"sample_query":"{ network { routes(maxDistance:12){ from to distance } longest { from to distance } } }","resolver_code":"Query: { network: () => ({routes:[{from:'A',to:'B',distance:7},{from:'B',to:'C',distance:12},{from:'A',to:'C',distance:15}]}) }, Network: { routes: (n,{maxDistance}) => n.routes.filter(r=>r.distance<=maxDistance), longest: (n) => n.routes.reduce((a,b)=>a.distance>b.distance?a:b) }","expected_response":"{\"data\":{\"network\":{\"routes\":[{\"from\":\"A\",\"to\":\"B\",\"distance\":7},{\"from\":\"B\",\"to\":\"C\",\"distance\":12}],\"longest\":{\"from\":\"A\",\"to\":\"C\",\"distance\":15}}}}","schema_definition":"type Route { from: String!, to: String!, distance: Int! }\ntype Network { routes(maxDistance: Int!): [Route!]!, longest: Route }\ntype Query { network: Network! }"}} {"submissionId":"cmsr3le8e000a32p2g16sa4gf","title":"Submission 6SA4GF","payload":{"sample_query":"{ histogram(values:[3,11,18,25,27,8,14]) { total buckets { label count } maxBucket { label count } } }","resolver_code":"Query: { histogram: (_, {values}) => { const bands=[{label:'low',test:x=>x<10},{label:'mid',test:x=>x>=10&&x<20},{label:'high',test:x=>x>=20}]; const buckets=bands.map(b=>({label:b.label,count:values.filter(b.test).length})); return {buckets,total:values.length}; } }, Histogram: { maxBucket: (h) => h.buckets.reduce((a,b)=>a.count>=b.count?a:b) }","expected_response":"{\"data\":{\"histogram\":{\"total\":7,\"buckets\":[{\"label\":\"low\",\"count\":2},{\"label\":\"mid\",\"count\":3},{\"label\":\"high\",\"count\":2}],\"maxBucket\":{\"label\":\"mid\",\"count\":3}}}}","schema_definition":"type Bucket { label: String!, count: Int! }\ntype Histogram { buckets: [Bucket!]!, total: Int!, maxBucket: Bucket! }\ntype Query { histogram(values: [Int!]!): Histogram! }"}} {"submissionId":"cmsr3le8e000b32p2h2rshcye","title":"Submission RSHCYE","payload":{"sample_query":"{ numbers(after:2, first:3) { edges { cursor value } hasNextPage } }","resolver_code":"Query: { numbers: (_, {after,first}) => { const all=[2,4,6,8,10,12]; const slice=all.slice(after,after+first); return {edges:slice.map((v,i)=>({cursor:String(after+i+1),value:v})),hasNextPage:after+first ({name:code==='ENG'?'Engineering':'Other',employees:[{name:'Ira',salary:90000},{name:'Jules',salary:115000},{name:'Kai',salary:78000}]}) }, Department: { employees: (d,{minSalary})=>d.employees.filter(e=>e.salary>=minSalary), payroll: (d)=>d.employees.reduce((s,e)=>s+e.salary,0) }, Employee: { bonus: (e,{multiplier})=>e.salary*multiplier }","expected_response":"{\"data\":{\"department\":{\"name\":\"Engineering\",\"payroll\":283000,\"employees\":[{\"name\":\"Ira\",\"bonus\":9000},{\"name\":\"Jules\",\"bonus\":11500}]}}}","schema_definition":"type Employee { name: String!, salary: Int!, bonus(multiplier: Float!): Float! }\ntype Department { name: String!, employees(minSalary: Int!): [Employee!]!, payroll: Int! }\ntype Query { department(code: String!): Department! }"}} {"submissionId":"cmsr3le8e000d32p2c93alhff","title":"Submission 3ALHFF","payload":{"sample_query":"{ matches(includeDraws:false){ home away winner } }","resolver_code":"Query: { matches: (_, {includeDraws}) => [{home:'Red',away:'Blue',homeGoals:2,awayGoals:1},{home:'Gold',away:'Green',homeGoals:0,awayGoals:0},{home:'Black',away:'White',homeGoals:1,awayGoals:3}].filter(m=>includeDraws||m.homeGoals!==m.awayGoals) }, Match: { winner: (m)=>m.homeGoals===m.awayGoals?null:(m.homeGoals>m.awayGoals?m.home:m.away) }","expected_response":"{\"data\":{\"matches\":[{\"home\":\"Red\",\"away\":\"Blue\",\"winner\":\"Red\"},{\"home\":\"Black\",\"away\":\"White\",\"winner\":\"White\"}]}}","schema_definition":"type Match { home: String!, away: String!, homeGoals: Int!, awayGoals: Int!, winner: String }\ntype Query { matches(includeDraws: Boolean!): [Match!]! }"}} {"submissionId":"cmsr3le8e000e32p2s9g0oicy","title":"Submission G0OICY","payload":{"sample_query":"{ stats(range:{min:3,max:8}) { values mean evenCount } }","resolver_code":"Query: { stats: (_, {range}) => { const values=Array.from({length:range.max-range.min+1},(_,i)=>range.min+i); return {values}; } }, Stats: { mean: (s)=>s.values.reduce((a,b)=>a+b,0)/s.values.length, evenCount:(s)=>s.values.filter(x=>x%2===0).length }","expected_response":"{\"data\":{\"stats\":{\"values\":[3,4,5,6,7,8],\"mean\":5.5,\"evenCount\":3}}}","schema_definition":"input RangeInput { min: Int!, max: Int! }\ntype Stats { values: [Int!]!, mean: Float!, evenCount: Int! }\ntype Query { stats(range: RangeInput!): Stats! }"}} {"submissionId":"cmsr3le8e000f32p2mj3km5cd","title":"Submission 3KM5CD","payload":{"sample_query":"{ directory(name:\"src\") { name totalBytes files(ext:\"js\") { path bytes extension } } }","resolver_code":"Query: { directory: (_, {name}) => ({name,files:[{path:'a.js',bytes:120},{path:'b.py',bytes:80},{path:'c.js',bytes:200}]}) }, Directory: { files: (d,{ext})=>ext?d.files.filter(f=>f.path.endsWith('.'+ext)):d.files, totalBytes:(d)=>d.files.reduce((s,f)=>s+f.bytes,0) }, File: { extension:(f)=>f.path.split('.').pop() }","expected_response":"{\"data\":{\"directory\":{\"name\":\"src\",\"totalBytes\":400,\"files\":[{\"path\":\"a.js\",\"bytes\":120,\"extension\":\"js\"},{\"path\":\"c.js\",\"bytes\":200,\"extension\":\"js\"}]}}}","schema_definition":"type File { path: String!, bytes: Int!, extension: String! }\ntype Directory { name: String!, files(ext: String): [File!]!, totalBytes: Int! }\ntype Query { directory(name: String!): Directory! }"}} {"submissionId":"cmsr3le8e000g32p2vfi9cx07","title":"Submission I9CX07","payload":{"sample_query":"{ pipeline(id:\"p1\") { totalDuration steps(criticalOnly:true){ name duration critical } } }","resolver_code":"Query: { pipeline: (_, {id}) => ({id,steps:[{name:'lint',duration:12,critical:false},{name:'test',duration:45,critical:true},{name:'build',duration:30,critical:true}]}) }, Pipeline: { steps:(p,{criticalOnly})=>criticalOnly?p.steps.filter(s=>s.critical):p.steps, totalDuration:(p)=>p.steps.reduce((a,b)=>a+b.duration,0) }","expected_response":"{\"data\":{\"pipeline\":{\"totalDuration\":87,\"steps\":[{\"name\":\"test\",\"duration\":45,\"critical\":true},{\"name\":\"build\",\"duration\":30,\"critical\":true}]}}}","schema_definition":"type Step { name: String!, duration: Int!, critical: Boolean! }\ntype Pipeline { steps(criticalOnly: Boolean = false): [Step!]!, totalDuration: Int! }\ntype Query { pipeline(id: ID!): Pipeline! }"}} {"submissionId":"cmsr3le8e000h32p2ms5t81qn","title":"Submission 5T81QN","payload":{"sample_query":"{ election { totalVotes winner { name votes share(total:120) } } }","resolver_code":"Query: { election: () => ({candidates:[{name:'A',votes:42},{name:'B',votes:57},{name:'C',votes:21}]}) }, Election: { totalVotes:(e)=>e.candidates.reduce((s,c)=>s+c.votes,0), winner:(e)=>e.candidates.reduce((a,b)=>a.votes>b.votes?a:b) }, Candidate: { share:(c,{total})=>c.votes/total }","expected_response":"{\"data\":{\"election\":{\"totalVotes\":120,\"winner\":{\"name\":\"B\",\"votes\":57,\"share\":0.475}}}}","schema_definition":"type Candidate { name: String!, votes: Int!, share(total: Int!): Float! }\ntype Election { candidates: [Candidate!]!, totalVotes: Int!, winner: Candidate! }\ntype Query { election: Election! }"}} {"submissionId":"cmsr3le8e000i32p2ent4djzp","title":"Submission T4DJZP","payload":{"sample_query":"{ quiz(id:\"q7\") { average best { user score } attempts(minScore:80){ user score } } }","resolver_code":"Query: { quiz: (_, {id}) => ({id,attempts:[{user:'u1',score:72},{user:'u2',score:95},{user:'u3',score:84},{user:'u4',score:61}]}) }, Quiz: { attempts:(q,{minScore})=>q.attempts.filter(a=>a.score>=minScore), best:(q)=>q.attempts.reduce((a,b)=>a.score>b.score?a:b), average:(q)=>q.attempts.reduce((s,a)=>s+a.score,0)/q.attempts.length }","expected_response":"{\"data\":{\"quiz\":{\"average\":78,\"best\":{\"user\":\"u2\",\"score\":95},\"attempts\":[{\"user\":\"u2\",\"score\":95},{\"user\":\"u3\",\"score\":84}]}}}","schema_definition":"type Attempt { user: String!, score: Int! }\ntype Quiz { attempts(minScore: Int!): [Attempt!]!, best: Attempt, average: Float! }\ntype Query { quiz(id: ID!): Quiz! }"}} {"submissionId":"cmsr3le8e000j32p2zgou88p8","title":"Submission OU88P8","payload":{"sample_query":"{ timeline { covered segments(minLength:5){ start end length } } }","resolver_code":"Query: { timeline: () => ({segments:[{start:0,end:5},{start:7,end:10},{start:12,end:20}]}) }, Timeline: { segments:(t,{minLength})=>t.segments.filter(s=>s.end-s.start>=minLength), covered:(t)=>t.segments.reduce((sum,s)=>sum+s.end-s.start,0) }, Segment: { length:(s)=>s.end-s.start }","expected_response":"{\"data\":{\"timeline\":{\"covered\":16,\"segments\":[{\"start\":0,\"end\":5,\"length\":5},{\"start\":12,\"end\":20,\"length\":8}]}}}","schema_definition":"type Segment { start: Int!, end: Int!, length: Int! }\ntype Timeline { segments(minLength: Int!): [Segment!]!, covered: Int! }\ntype Query { timeline: Timeline! }"}} {"submissionId":"cmsr3le8e000k32p25155chqq","title":"Submission 55CHQQ","payload":{"sample_query":"{ airport(code:\"NTH\") { code flights(minAvailable:10){ code available } } }","resolver_code":"Query: { airport: (_, {code}) => ({code,flights:[{code:'ZX1',seats:100,booked:84},{code:'ZX2',seats:80,booked:60},{code:'ZX3',seats:120,booked:115}]}) }, Airport: { flights:(a,{minAvailable})=>a.flights.filter(f=>f.seats-f.booked>=minAvailable) }, Flight: { available:(f)=>f.seats-f.booked }","expected_response":"{\"data\":{\"airport\":{\"code\":\"NTH\",\"flights\":[{\"code\":\"ZX1\",\"available\":16},{\"code\":\"ZX2\",\"available\":20}]}}}","schema_definition":"type Flight { code: String!, seats: Int!, booked: Int!, available: Int! }\ntype Airport { code: String!, flights(minAvailable: Int!): [Flight!]! }\ntype Query { airport(code: String!): Airport! }"}} {"submissionId":"cmsr3le8e000l32p2whcnvq94","title":"Submission CNVQ94","payload":{"sample_query":"{ package(name:\"core\") { name versions(stableOnly:true){ number stable } latestStable { number } } }","resolver_code":"Query: { package: (_, {name}) => ({name,versions:[{number:1,stable:true},{number:2,stable:false},{number:3,stable:true},{number:4,stable:false}]}) }, Package: { versions:(p,{stableOnly})=>stableOnly?p.versions.filter(v=>v.stable):p.versions, latestStable:(p)=>p.versions.filter(v=>v.stable).reduce((a,b)=>a.number>b.number?a:b) }","expected_response":"{\"data\":{\"package\":{\"name\":\"core\",\"versions\":[{\"number\":1,\"stable\":true},{\"number\":3,\"stable\":true}],\"latestStable\":{\"number\":3}}}}","schema_definition":"type Version { number: Int!, stable: Boolean! }\ntype Package { name: String!, versions(stableOnly: Boolean!): [Version!]!, latestStable: Version }\ntype Query { package(name: String!): Package! }"}} {"submissionId":"cmsr3le8e000m32p2ye02aa62","title":"Submission 02AA62","payload":{"sample_query":"{ normalize(values:[10,20,15,30]) range(values:[10,20,15,30]) { low high span } }","resolver_code":"Query: { normalize: (_, {values}) => { const lo=Math.min(...values), hi=Math.max(...values); return values.map(v=>hi===lo?0:(v-lo)/(hi-lo)); }, range:(_, {values})=>({low:Math.min(...values),high:Math.max(...values)}) }, Range: { span:(r)=>r.high-r.low }","expected_response":"{\"data\":{\"normalize\":[0,0.5,0.25,1],\"range\":{\"low\":10,\"high\":30,\"span\":20}}}","schema_definition":"type Range { low: Int!, high: Int!, span: Int! }\ntype Query { normalize(values: [Int!]!): [Float!]!, range(values: [Int!]!): Range! }"}} {"submissionId":"cmsr3le8e000n32p2b3tywyv6","title":"Submission TYWYV6","payload":{"sample_query":"{ queue { items(minPriority:3){ id priority age rank } } }","resolver_code":"Query: { queue: () => ({items:[{id:'a',priority:2,age:5},{id:'b',priority:5,age:1},{id:'c',priority:5,age:4},{id:'d',priority:3,age:9}]}) }, Queue: { items:(q,{minPriority})=>q.items.filter(x=>x.priority>=minPriority).sort((a,b)=>b.priority-a.priority||b.age-a.age).map((x,i)=>({...x,rank:i+1})) }","expected_response":"{\"data\":{\"queue\":{\"items\":[{\"id\":\"c\",\"priority\":5,\"age\":4,\"rank\":1},{\"id\":\"b\",\"priority\":5,\"age\":1,\"rank\":2},{\"id\":\"d\",\"priority\":3,\"age\":9,\"rank\":3}]}}}","schema_definition":"type QueueItem { id: ID!, priority: Int!, age: Int!, rank: Int! }\ntype Queue { items(minPriority: Int!): [QueueItem!]! }\ntype Query { queue: Queue! }"}} {"submissionId":"cmsr3le8e000o32p2ruopa3l4","title":"Submission OPA3L4","payload":{"sample_query":"{ cart { lines { sku lineTotal } subtotal discountedTotal(threshold:75,rate:0.2) } }","resolver_code":"Query: { cart: () => ({lines:[{sku:'P1',qty:2,price:12.5},{sku:'P2',qty:1,price:40},{sku:'P3',qty:3,price:5}]}) }, Cart: { subtotal:(c)=>c.lines.reduce((s,l)=>s+l.qty*l.price,0), discountedTotal:(c,{threshold,rate})=>{const s=c.lines.reduce((a,l)=>a+l.qty*l.price,0);return s>=threshold?s*(1-rate):s;} }, CartLine:{ lineTotal:(l)=>l.qty*l.price }","expected_response":"{\"data\":{\"cart\":{\"lines\":[{\"sku\":\"P1\",\"lineTotal\":25},{\"sku\":\"P2\",\"lineTotal\":40},{\"sku\":\"P3\",\"lineTotal\":15}],\"subtotal\":80,\"discountedTotal\":64}}}","schema_definition":"type CartLine { sku: String!, qty: Int!, price: Float!, lineTotal: Float! }\ntype Cart { lines: [CartLine!]!, subtotal: Float!, discountedTotal(threshold: Float!, rate: Float!): Float! }\ntype Query { cart: Cart! }"}} {"submissionId":"cmsr3le8e000p32p2gbs27dsk","title":"Submission S27DSK","payload":{"sample_query":"{ path(coords:[[0,0],[2,1],[2,4],[-1,4]]) { points { x y manhattan } totalDistance } }","resolver_code":"Query: { path: (_, {coords}) => ({points:coords.map(([x,y])=>({x,y}))}) }, Point: { manhattan:(p)=>Math.abs(p.x)+Math.abs(p.y) }, Path: { totalDistance:(p)=>p.points.slice(1).reduce((s,pt,i)=>s+Math.abs(pt.x-p.points[i].x)+Math.abs(pt.y-p.points[i].y),0) }","expected_response":"{\"data\":{\"path\":{\"points\":[{\"x\":0,\"y\":0,\"manhattan\":0},{\"x\":2,\"y\":1,\"manhattan\":3},{\"x\":2,\"y\":4,\"manhattan\":6},{\"x\":-1,\"y\":4,\"manhattan\":5}],\"totalDistance\":9}}}","schema_definition":"type Point { x: Int!, y: Int!, manhattan: Int! }\ntype Path { points: [Point!]!, totalDistance: Int! }\ntype Query { path(coords: [[Int!]!]!): Path! }"}} {"submissionId":"cmsr3le8e000q32p2c0nztxfm","title":"Submission NZTXFM","payload":{"sample_query":"{ sprint { tasks(done:false){ id effort } completedEffort remainingEffort } }","resolver_code":"Query: { sprint: () => ({tasks:[{id:'t1',effort:3,done:true},{id:'t2',effort:8,done:false},{id:'t3',effort:5,done:true},{id:'t4',effort:2,done:false}]}) }, Sprint: { tasks:(s,{done})=>typeof done==='boolean'?s.tasks.filter(t=>t.done===done):s.tasks, completedEffort:(s)=>s.tasks.filter(t=>t.done).reduce((a,t)=>a+t.effort,0), remainingEffort:(s)=>s.tasks.filter(t=>!t.done).reduce((a,t)=>a+t.effort,0) }","expected_response":"{\"data\":{\"sprint\":{\"tasks\":[{\"id\":\"t2\",\"effort\":8},{\"id\":\"t4\",\"effort\":2}],\"completedEffort\":8,\"remainingEffort\":10}}}","schema_definition":"type Task { id: ID!, effort: Int!, done: Boolean! }\ntype Sprint { tasks(done: Boolean): [Task!]!, completedEffort: Int!, remainingEffort: Int! }\ntype Query { sprint: Sprint! }"}} {"submissionId":"cmsr3le8e000r32p2lxn3g6fa","title":"Submission N3G6FA","payload":{"sample_query":"{ table { rows(min:8,max:15){ key value } sum(min:8,max:15) } }","resolver_code":"Query: { table: () => ({rows:[{key:'a',value:4},{key:'b',value:9},{key:'c',value:13},{key:'d',value:21}]}) }, Table: { rows:(t,{min,max})=>t.rows.filter(r=>r.value>=min&&r.value<=max), sum:(t,{min,max})=>t.rows.filter(r=>r.value>=min&&r.value<=max).reduce((s,r)=>s+r.value,0) }","expected_response":"{\"data\":{\"table\":{\"rows\":[{\"key\":\"b\",\"value\":9},{\"key\":\"c\",\"value\":13}],\"sum\":22}}}","schema_definition":"type Record { key: String!, value: Int! }\ntype Table { rows(min: Int!, max: Int!): [Record!]!, sum(min: Int!, max: Int!): Int! }\ntype Query { table: Table! }"}} {"submissionId":"cmsr3le8e000s32p27dwm4ekh","title":"Submission WM4EKH","payload":{"sample_query":"{ classify(value:17) bands { name contains(value:17) } }","resolver_code":"Query: { bands: () => [{name:'low',min:0,max:9},{name:'mid',min:10,max:19},{name:'high',min:20,max:99}], classify:(_, {value}) => value<10?'low':value<20?'mid':'high' }, Band: { contains:(b,{value})=>value>=b.min&&value<=b.max }","expected_response":"{\"data\":{\"classify\":\"mid\",\"bands\":[{\"name\":\"low\",\"contains\":false},{\"name\":\"mid\",\"contains\":true},{\"name\":\"high\",\"contains\":false}]}}","schema_definition":"type Band { name: String!, min: Int!, max: Int!, contains(value: Int!): Boolean! }\ntype Query { bands: [Band!]!, classify(value: Int!): String! }"}} {"submissionId":"cmsr3le8e000t32p2ouvqjbfn","title":"Submission VQJBFN","payload":{"sample_query":"{ ledger { entries(kind:\"debit\"){ kind amount } balance } }","resolver_code":"Query: { ledger: () => ({entries:[{kind:'credit',amount:100},{kind:'debit',amount:35.5},{kind:'credit',amount:22},{kind:'debit',amount:10}]}) }, Ledger: { entries:(l,{kind})=>kind?l.entries.filter(e=>e.kind===kind):l.entries, balance:(l)=>l.entries.reduce((s,e)=>s+(e.kind==='credit'?e.amount:-e.amount),0) }","expected_response":"{\"data\":{\"ledger\":{\"entries\":[{\"kind\":\"debit\",\"amount\":35.5},{\"kind\":\"debit\",\"amount\":10}],\"balance\":76.5}}}","schema_definition":"type LedgerEntry { kind: String!, amount: Float! }\ntype Ledger { entries(kind: String): [LedgerEntry!]!, balance: Float! }\ntype Query { ledger: Ledger! }"}} {"submissionId":"cmsrccrhp0028q2p21h52mki8","title":"Submission 52MKI8","payload":{"sample_query":"{ cart { total expensive(min: 25) { id subtotal } } }","resolver_code":"Query: { cart: () => ({ items: [{id:'A',price:12.5,qty:2},{id:'B',price:8,qty:3},{id:'C',price:30,qty:1}] }) },\nCart: { total: c => c.items.reduce((s,i)=>s+i.price*i.qty,0), expensive: (c,{min}) => c.items.filter(i=>i.price*i.qty>=min) },\nItem: { subtotal: i => i.price*i.qty }","expected_response":"{\"data\":{\"cart\":{\"total\":79,\"expensive\":[{\"id\":\"A\",\"subtotal\":25},{\"id\":\"C\",\"subtotal\":30}]}}}","schema_definition":"type Item { id: ID!, price: Float!, qty: Int!, subtotal: Float! }\ntype Cart { items: [Item!]!, total: Float!, expensive(min: Float!): [Item!]! }\ntype Query { cart: Cart! }"}} {"submissionId":"cmsrccrhp0029q2p2l6bz2308","title":"Submission BZ2308","payload":{"sample_query":"{ summary { count average above(limit: 12) { sensor value } } }","resolver_code":"Query: { summary: () => ({ readings:[{sensor:'s1',value:10},{sensor:'s2',value:18},{sensor:'s3',value:14}] }) },\nSummary: { count: s => s.readings.length, average: s => s.readings.reduce((a,r)=>a+r.value,0)/s.readings.length, above: (s,{limit}) => s.readings.filter(r=>r.value>limit) }","expected_response":"{\"data\":{\"summary\":{\"count\":3,\"average\":14,\"above\":[{\"sensor\":\"s2\",\"value\":18},{\"sensor\":\"s3\",\"value\":14}]}}}","schema_definition":"type Reading { sensor: String!, value: Float! }\ntype Summary { count: Int!, average: Float!, above(limit: Float!): [Reading!]! }\ntype Query { summary: Summary! }"}} {"submissionId":"cmsrccrhp002aq2p2whcbt04a","title":"Submission CBT04A","payload":{"sample_query":"{ sprint { completedPoints pending(limit: 4) { name points } } }","resolver_code":"Query: { sprint: () => ({tasks:[{name:'api',points:5,done:true},{name:'ui',points:3,done:false},{name:'tests',points:8,done:false}]}) },\nSprint: { completedPoints: s => s.tasks.filter(t=>t.done).reduce((a,t)=>a+t.points,0), pending: (s,{limit}) => s.tasks.filter(t=>!t.done && t.points>=limit) }","expected_response":"{\"data\":{\"sprint\":{\"completedPoints\":5,\"pending\":[{\"name\":\"tests\",\"points\":8}]}}}","schema_definition":"type Task { name: String!, points: Int!, done: Boolean! }\ntype Sprint { tasks: [Task!]!, completedPoints: Int!, pending(limit: Int!): [Task!]! }\ntype Query { sprint: Sprint! }"}} {"submissionId":"cmsrccrhp002bq2p2qazdk7jc","title":"Submission ZDK7JC","payload":{"sample_query":"{ catalog { lowStock(max: 2) { sku available } } }","resolver_code":"Query: { catalog: () => ({products:[{sku:'P1',price:9.5,stock:2},{sku:'P2',price:20,stock:0},{sku:'P3',price:4,stock:7}]}) },\nCatalog: { lowStock: (c,{max}) => c.products.filter(p=>p.stock<=max) },\nProduct: { available: p => p.stock>0 }","expected_response":"{\"data\":{\"catalog\":{\"lowStock\":[{\"sku\":\"P1\",\"available\":true},{\"sku\":\"P2\",\"available\":false}]}}}","schema_definition":"type Product { sku: String!, price: Float!, stock: Int!, available: Boolean! }\ntype Catalog { products: [Product!]!, lowStock(max: Int!): [Product!]! }\ntype Query { catalog: Catalog! }"}} {"submissionId":"cmsrccrhp002cq2p2hdli8923","title":"Submission LI8923","payload":{"sample_query":"{ election { totalWeight winner } }","resolver_code":"Query: { election: () => ({votes:[{choice:'A',weight:3},{choice:'B',weight:5},{choice:'A',weight:4}]}) },\nElection: { totalWeight: e => e.votes.reduce((s,v)=>s+v.weight,0), winner: e => { const m={}; e.votes.forEach(v=>m[v.choice]=(m[v.choice]||0)+v.weight); return Object.keys(m).sort((a,b)=>m[b]-m[a]||a.localeCompare(b))[0]; } }","expected_response":"{\"data\":{\"election\":{\"totalWeight\":12,\"winner\":\"A\"}}}","schema_definition":"type Vote { choice: String!, weight: Int! }\ntype Election { votes: [Vote!]!, totalWeight: Int!, winner: String! }\ntype Query { election: Election! }"}} {"submissionId":"cmsrccrhp002dq2p245spnyrh","title":"Submission SPNYRH","payload":{"sample_query":"{ network { outgoing(city: \"A\") { to km } distanceFrom(city: \"A\") } }","resolver_code":"Query: { network: () => ({routes:[{from:'A',to:'B',km:5},{from:'A',to:'C',km:7},{from:'B',to:'C',km:4}]}) },\nNetwork: { outgoing: (n,{city}) => n.routes.filter(r=>r.from===city), distanceFrom: (n,{city}) => n.routes.filter(r=>r.from===city).reduce((s,r)=>s+r.km,0) }","expected_response":"{\"data\":{\"network\":{\"outgoing\":[{\"to\":\"B\",\"km\":5},{\"to\":\"C\",\"km\":7}],\"distanceFrom\":12}}}","schema_definition":"type Route { from: String!, to: String!, km: Int! }\ntype Network { routes: [Route!]!, outgoing(city: String!): [Route!]!, distanceFrom(city: String!): Int! }\ntype Query { network: Network! }"}} {"submissionId":"cmsrccrhp002eq2p2c9l4g0nf","title":"Submission L4G0NF","payload":{"sample_query":"{ players(minTotal: 10) { name total best } }","resolver_code":"Query: { players: (_, {minTotal}) => [{name:'Ana',scores:[3,5,4]},{name:'Ben',scores:[2,2,3]},{name:'Cy',scores:[6,1,6]}].filter(p=>p.scores.reduce((a,x)=>a+x,0)>=minTotal) },\nPlayer: { total: p => p.scores.reduce((a,x)=>a+x,0), best: p => Math.max(...p.scores) }","expected_response":"{\"data\":{\"players\":[{\"name\":\"Ana\",\"total\":12,\"best\":5},{\"name\":\"Cy\",\"total\":13,\"best\":6}]}}","schema_definition":"type Player { name: String!, scores: [Int!]!, total: Int!, best: Int! }\ntype Query { players(minTotal: Int!): [Player!]! }"}} {"submissionId":"cmsrccrhp002fq2p264vnhubf","title":"Submission VNHUBF","payload":{"sample_query":"{ buckets { label sum evenCount } }","resolver_code":"Query: { buckets: () => [{label:'x',values:[1,2,3,4]},{label:'y',values:[6,7]}] },\nBucket: { sum: b => b.values.reduce((a,x)=>a+x,0), evenCount: b => b.values.filter(x=>x%2===0).length }","expected_response":"{\"data\":{\"buckets\":[{\"label\":\"x\",\"sum\":10,\"evenCount\":2},{\"label\":\"y\",\"sum\":13,\"evenCount\":1}]}}","schema_definition":"type Bucket { label: String!, values: [Int!]!, sum: Int!, evenCount: Int! }\ntype Query { buckets: [Bucket!]! }"}} {"submissionId":"cmsrccrhp002gq2p2iwdgaclk","title":"Submission DGACLK","payload":{"sample_query":"{ queue { successRate slow(min: 30) { id ok } } }","resolver_code":"Query: { queue: () => ({jobs:[{id:'j1',duration:10,ok:true},{id:'j2',duration:40,ok:false},{id:'j3',duration:30,ok:true}]}) },\nQueue: { successRate: q => q.jobs.filter(j=>j.ok).length/q.jobs.length, slow: (q,{min}) => q.jobs.filter(j=>j.duration>=min) }","expected_response":"{\"data\":{\"queue\":{\"successRate\":0.6666666666666666,\"slow\":[{\"id\":\"j2\",\"ok\":false},{\"id\":\"j3\",\"ok\":true}]}}}","schema_definition":"type Job { id: ID!, duration: Int!, ok: Boolean! }\ntype Queue { jobs: [Job!]!, successRate: Float!, slow(min: Int!): [Job!]! }\ntype Query { queue: Queue! }"}} {"submissionId":"cmsrccrhp002hq2p29jwjtipo","title":"Submission WJTIPO","payload":{"sample_query":"{ invoice { subtotal tax(rate: 0.1) lines { sku amount } } }","resolver_code":"Query: { invoice: () => ({lines:[{sku:'A',qty:2,unit:5},{sku:'B',qty:1,unit:12}]}) },\nLine: { amount: l => l.qty*l.unit },\nInvoice: { subtotal: i => i.lines.reduce((s,l)=>s+l.qty*l.unit,0), tax: (i,{rate}) => i.lines.reduce((s,l)=>s+l.qty*l.unit,0)*rate }","expected_response":"{\"data\":{\"invoice\":{\"subtotal\":22,\"tax\":2.2,\"lines\":[{\"sku\":\"A\",\"amount\":10},{\"sku\":\"B\",\"amount\":12}]}}}","schema_definition":"type Line { sku: String!, qty: Int!, unit: Float!, amount: Float! }\ntype Invoice { lines: [Line!]!, subtotal: Float!, tax(rate: Float!): Float! }\ntype Query { invoice: Invoice! }"}} {"submissionId":"cmsrccrhp002iq2p2iha2jxd4","title":"Submission A2JXD4","payload":{"sample_query":"{ timeline { totalLength segments { name length } } }","resolver_code":"Query: { timeline: () => ({segments:[{name:'a',start:0,end:5},{name:'b',start:5,end:9},{name:'c',start:10,end:15}]}) },\nSegment: { length: s => s.end-s.start },\nTimeline: { totalLength: t => t.segments.reduce((a,s)=>a+s.end-s.start,0) }","expected_response":"{\"data\":{\"timeline\":{\"totalLength\":14,\"segments\":[{\"name\":\"a\",\"length\":5},{\"name\":\"b\",\"length\":4},{\"name\":\"c\",\"length\":5}]}}}","schema_definition":"type Segment { name: String!, start: Int!, end: Int!, length: Int! }\ntype Timeline { segments: [Segment!]!, totalLength: Int! }\ntype Query { timeline: Timeline! }"}} {"submissionId":"cmsrccrhp002jq2p2rr412o1w","title":"Submission 412O1W","payload":{"sample_query":"{ accounts(positiveOnly: true) { id balance positive } }","resolver_code":"Query: { accounts: (_, {positiveOnly}) => { const a=[{id:'A',credits:[10,5],debits:[3]},{id:'B',credits:[2],debits:[7]}]; const bal=x=>x.credits.reduce((s,v)=>s+v,0)-x.debits.reduce((s,v)=>s+v,0); return positiveOnly?a.filter(x=>bal(x)>0):a; } },\nAccount: { balance: a => a.credits.reduce((s,v)=>s+v,0)-a.debits.reduce((s,v)=>s+v,0), positive: a => a.credits.reduce((s,v)=>s+v,0)>a.debits.reduce((s,v)=>s+v,0) }","expected_response":"{\"data\":{\"accounts\":[{\"id\":\"A\",\"balance\":12,\"positive\":true}]}}","schema_definition":"type Account { id: ID!, credits: [Int!]!, debits: [Int!]!, balance: Int!, positive: Boolean! }\ntype Query { accounts(positiveOnly: Boolean!): [Account!]! }"}} {"submissionId":"cmsrccrhp002kq2p2xi04lrft","title":"Submission 04LRFT","payload":{"sample_query":"{ numberSet { min max range } }","resolver_code":"Query: { numberSet: () => ({values:[8,3,11,5]}) },\nNumberSet: { min: n => Math.min(...n.values), max: n => Math.max(...n.values), range: n => Math.max(...n.values)-Math.min(...n.values) }","expected_response":"{\"data\":{\"numberSet\":{\"min\":3,\"max\":11,\"range\":8}}}","schema_definition":"type NumberSet { values: [Int!]!, min: Int!, max: Int!, range: Int! }\ntype Query { numberSet: NumberSet! }"}} {"submissionId":"cmsrccrhp002lq2p2j0oeeumg","title":"Submission OEEUMG","payload":{"sample_query":"{ entries { key average passing(min: 8) } }","resolver_code":"Query: { entries: () => [{key:'a',values:[5,8,9]},{key:'b',values:[3,4,10]}] },\nEntry: { average: e => e.values.reduce((s,v)=>s+v,0)/e.values.length, passing: (e,{min}) => e.values.filter(v=>v>=min).length }","expected_response":"{\"data\":{\"entries\":[{\"key\":\"a\",\"average\":7.333333333333333,\"passing\":2},{\"key\":\"b\",\"average\":5.666666666666667,\"passing\":1}]}}","schema_definition":"type Entry { key: String!, values: [Int!]!, average: Float!, passing(min: Int!): Int! }\ntype Query { entries: [Entry!]! }"}} {"submissionId":"cmsrccrhp002mq2p24jzowo3w","title":"Submission ZOWO3W","payload":{"sample_query":"{ packages(minVersions: 2) { name latest count } }","resolver_code":"Query: { packages: (_, {minVersions}) => [{name:'core',versions:['1.0','1.2','2.0']},{name:'ui',versions:['3.1']},{name:'db',versions:['2.1','2.2']}].filter(p=>p.versions.length>=minVersions) },\nPackage: { latest: p => p.versions[p.versions.length-1], count: p => p.versions.length }","expected_response":"{\"data\":{\"packages\":[{\"name\":\"core\",\"latest\":\"2.0\",\"count\":3},{\"name\":\"db\",\"latest\":\"2.2\",\"count\":2}]}}","schema_definition":"type Package { name: String!, versions: [String!]!, latest: String!, count: Int! }\ntype Query { packages(minVersions: Int!): [Package!]! }"}} {"submissionId":"cmsrccrhp002nq2p2t7t74jmu","title":"Submission T74JMU","payload":{"sample_query":"{ path { totalManhattan points { x y manhattan } } }","resolver_code":"Query: { path: () => ({points:[{x:1,y:2},{x:-3,y:4},{x:0,y:-2}]}) },\nPoint: { manhattan: p => Math.abs(p.x)+Math.abs(p.y) },\nPath: { totalManhattan: p => p.points.reduce((s,q)=>s+Math.abs(q.x)+Math.abs(q.y),0) }","expected_response":"{\"data\":{\"path\":{\"totalManhattan\":12,\"points\":[{\"x\":1,\"y\":2,\"manhattan\":3},{\"x\":-3,\"y\":4,\"manhattan\":7},{\"x\":0,\"y\":-2,\"manhattan\":2}]}}}","schema_definition":"type Point { x: Int!, y: Int!, manhattan: Int! }\ntype Path { points: [Point!]!, totalManhattan: Int! }\ntype Query { path: Path! }"}} {"submissionId":"cmsrccrhp002oq2p2jgdjnw3m","title":"Submission DJNW3M","payload":{"sample_query":"{ matches(decidedOnly: false) { home away winner } }","resolver_code":"Query: { matches: (_, {decidedOnly}) => { const m=[{home:'A',away:'B',homeScore:2,awayScore:1},{home:'C',away:'D',homeScore:0,awayScore:0}]; return decidedOnly?m.filter(x=>x.homeScore!==x.awayScore):m; } },\nMatch: { winner: m => m.homeScore===m.awayScore?'DRAW':(m.homeScore>m.awayScore?m.home:m.away) }","expected_response":"{\"data\":{\"matches\":[{\"home\":\"A\",\"away\":\"B\",\"winner\":\"A\"},{\"home\":\"C\",\"away\":\"D\",\"winner\":\"DRAW\"}]}}","schema_definition":"type Match { home: String!, away: String!, homeScore: Int!, awayScore: Int!, winner: String! }\ntype Query { matches(decidedOnly: Boolean!): [Match!]! }"}} {"submissionId":"cmsrccrhp002pq2p2svvq7h23","title":"Submission VQ7H23","payload":{"sample_query":"{ matrix { rowSums maxValue } }","resolver_code":"Query: { matrix: () => ({rows:[[1,4,2],[7,0,3]]}) },\nMatrix: { rowSums: m => m.rows.map(r=>r.reduce((a,x)=>a+x,0)), maxValue: m => Math.max(...m.rows.flat()) }","expected_response":"{\"data\":{\"matrix\":{\"rowSums\":[7,10],\"maxValue\":7}}}","schema_definition":"type Matrix { rows: [[Int!]!]!, rowSums: [Int!]!, maxValue: Int! }\ntype Query { matrix: Matrix! }"}} {"submissionId":"cmsrccrhp002qq2p2obem9pjr","title":"Submission EM9PJR","payload":{"sample_query":"{ flags { enabledCount audienceTotal(enabledOnly: true) } }","resolver_code":"Query: { flags: () => ({features:[{name:'a',enabled:true,audience:10},{name:'b',enabled:false,audience:30},{name:'c',enabled:true,audience:20}]}) },\nFlags: { enabledCount: f => f.features.filter(x=>x.enabled).length, audienceTotal: (f,{enabledOnly}) => f.features.filter(x=>!enabledOnly||x.enabled).reduce((s,x)=>s+x.audience,0) }","expected_response":"{\"data\":{\"flags\":{\"enabledCount\":2,\"audienceTotal\":30}}}","schema_definition":"type Feature { name: String!, enabled: Boolean!, audience: Int! }\ntype Flags { features: [Feature!]!, enabledCount: Int!, audienceTotal(enabledOnly: Boolean!): Int! }\ntype Query { flags: Flags! }"}} {"submissionId":"cmsrccrhp002rq2p2safr5np3","title":"Submission FR5NP3","payload":{"sample_query":"{ candidates { name total qualified(cutoff: 20) } }","resolver_code":"Query: { candidates: () => [{name:'Ada',scores:[8,9,7]},{name:'Bo',scores:[5,6,4]}] },\nCandidate: { total: c => c.scores.reduce((a,x)=>a+x,0), qualified: (c,{cutoff}) => c.scores.reduce((a,x)=>a+x,0)>=cutoff }","expected_response":"{\"data\":{\"candidates\":[{\"name\":\"Ada\",\"total\":24,\"qualified\":true},{\"name\":\"Bo\",\"total\":15,\"qualified\":false}]}}","schema_definition":"type Candidate { name: String!, scores: [Int!]!, total: Int!, qualified(cutoff: Int!): Boolean! }\ntype Query { candidates: [Candidate!]! }"}} {"submissionId":"cmsrcqpbc004gq2p2lxzm026b","title":"Submission ZM026B","payload":{"sample_query":"query { user(id: \"1\") { name email } }","resolver_code":"Query: (() => {\n const db = { users: [{ id: '1', name: 'Alice', email: 'alice@example.com' }] };\n return {\n user: (_, { id }) => db.users.find(u => u.id === id)\n };\n })()","expected_response":"{\"data\": {\"user\": {\"name\": \"Alice\", \"email\": \"alice@example.com\"}}}","schema_definition":"type Query {\n user(id: ID!): User\n}\ntype User {\n id: ID!\n name: String!\n email: String!\n}"}} {"submissionId":"cmsrcqpbc004hq2p2j8uche88","title":"Submission UCHE88","payload":{"sample_query":"query { product(id: \"p2\") { title price inStock } }","resolver_code":"Query: (() => {\n const db = { products: [{ id: 'p1', title: 'Widget', price: 9.99, inStock: true }, { id: 'p2', title: 'Gadget', price: 24.50, inStock: false }] };\n return {\n product: (_, { id }) => db.products.find(p => p.id === id)\n };\n })()","expected_response":"{\"data\": {\"product\": {\"title\": \"Gadget\", \"price\": 24.50, \"inStock\": false}}}","schema_definition":"type Query {\n product(id: ID!): Product\n}\ntype Product {\n id: ID!\n title: String!\n price: Float!\n inStock: Boolean!\n}"}} {"submissionId":"cmsrcqpbc004iq2p2xya784ag","title":"Submission A784AG","payload":{"sample_query":"query { posts { id title } }","resolver_code":"Query: (() => {\n const db = { posts: [{ id: '1', title: 'Hello World', published: true }, { id: '2', title: 'Draft Post', published: false }] };\n return {\n posts: () => db.posts\n };\n })()","expected_response":"{\"data\": {\"posts\": [{\"id\": \"1\", \"title\": \"Hello World\"}, {\"id\": \"2\", \"title\": \"Draft Post\"}]}}","schema_definition":"type Query {\n posts: [Post!]!\n}\ntype Post {\n id: ID!\n title: String!\n published: Boolean!\n}"}} {"submissionId":"cmsrcqpbc004jq2p2crfat0tx","title":"Submission FAT0TX","payload":{"sample_query":"query { searchUsers(name: \"an\") { id name } }","resolver_code":"Query: (() => {\n const db = { users: [{ id: '1', name: 'Anna' }, { id: '2', name: 'Bob' }, { id: '3', name: 'Hannah' }] };\n return {\n searchUsers: (_, { name }) =>\n db.users.filter(u => u.name.toLowerCase().includes(name.toLowerCase()))\n };\n })()","expected_response":"{\"data\": {\"searchUsers\": [{\"id\": \"1\", \"name\": \"Anna\"}, {\"id\": \"3\", \"name\": \"Hannah\"}]}}","schema_definition":"type Query {\n searchUsers(name: String!): [User!]!\n}\ntype User {\n id: ID!\n name: String!\n}"}} {"submissionId":"cmsrcqpbc004kq2p24uhycrex","title":"Submission HYCREX","payload":{"sample_query":"mutation { createUser(name: \"Carol\", email: \"carol@example.com\") { id name email } }","resolver_code":"Mutation: {\n createUser: (() => {\n const db = { users: [] };\n let nextId = 10;\n return (_, { name, email }) => {\n const user = { id: String(nextId++), name, email };\n db.users.push(user);\n return user;\n };\n })()\n }","expected_response":"{\"data\": {\"createUser\": {\"id\": \"10\", \"name\": \"Carol\", \"email\": \"carol@example.com\"}}}","schema_definition":"type Query {\n ping: Boolean!\n}\ntype Mutation {\n createUser(name: String!, email: String!): User!\n}\ntype User {\n id: ID!\n name: String!\n email: String!\n}"}} {"submissionId":"cmsrcqpbc004lq2p2smxr6tlv","title":"Submission XR6TLV","payload":{"sample_query":"query { order(id: \"o1\") { total status items { sku qty } } }","resolver_code":"Query: (() => {\n const db = { orders: [{ id: 'o1', total: 59.98, status: 'shipped', items: [{ sku: 'A1', qty: 2 }, { sku: 'B3', qty: 1 }] }] };\n return {\n order: (_, { id }) => db.orders.find(o => o.id === id)\n };\n })()","expected_response":"{\"data\": {\"order\": {\"total\": 59.98, \"status\": \"shipped\", \"items\": [{\"sku\": \"A1\", \"qty\": 2}, {\"sku\": \"B3\", \"qty\": 1}]}}}","schema_definition":"type Query {\n order(id: ID!): Order\n}\ntype Order {\n id: ID!\n total: Float!\n status: String!\n items: [OrderItem!]!\n}\ntype OrderItem {\n sku: String!\n qty: Int!\n}"}} {"submissionId":"cmsrcqpbc004mq2p26uloq91z","title":"Submission LOQ91Z","payload":{"sample_query":"query { me { id name role } }","resolver_code":"Query: {\n me: () => ({ id: 'u9', name: 'Dev User', role: 'admin' })\n }","expected_response":"{\"data\": {\"me\": {\"id\": \"u9\", \"name\": \"Dev User\", \"role\": \"admin\"}}}","schema_definition":"type Query {\n me: User\n}\ntype User {\n id: ID!\n name: String!\n role: String!\n}"}} {"submissionId":"cmsrcqpbc004nq2p2jie0dtrb","title":"Submission E0DTRB","payload":{"sample_query":"query { article(slug: \"intro-to-gql\") { title wordCount readingTimeMin } }","resolver_code":"Query: (() => {\n const db = { articles: [{ slug: 'intro-to-gql', title: 'Intro to GraphQL', wordCount: 820 }] };\n return {\n article: (_, { slug }) => db.articles.find(a => a.slug === slug)\n };\n })(),\n Article: {\n readingTimeMin: (parent) => Math.ceil(parent.wordCount / 200)\n }","expected_response":"{\"data\": {\"article\": {\"title\": \"Intro to GraphQL\", \"wordCount\": 820, \"readingTimeMin\": 5}}}","schema_definition":"type Query {\n article(slug: String!): Article\n}\ntype Article {\n slug: String!\n title: String!\n wordCount: Int!\n readingTimeMin: Int!\n}"}} {"submissionId":"cmsrcqpbc004oq2p2jygagkxp","title":"Submission GAGKXP","payload":{"sample_query":"query { teamMembers(teamId: \"t1\") { id name } }","resolver_code":"Query: (() => {\n const db = { users: [{ id: '1', name: 'Alice', teamId: 't1' }, { id: '2', name: 'Bob', teamId: 't2' }, { id: '3', name: 'Carol', teamId: 't1' }] };\n return {\n teamMembers: (_, { teamId }) =>\n db.users.filter(u => u.teamId === teamId)\n };\n })()","expected_response":"{\"data\": {\"teamMembers\": [{\"id\": \"1\", \"name\": \"Alice\"}, {\"id\": \"3\", \"name\": \"Carol\"}]}}","schema_definition":"type Query {\n teamMembers(teamId: ID!): [User!]!\n}\ntype User {\n id: ID!\n name: String!\n teamId: ID!\n}"}} {"submissionId":"cmsrcqpbc004pq2p2nli69vf7","title":"Submission I69VF7","payload":{"sample_query":"query { topProducts(limit: 2) { name score } }","resolver_code":"Query: (() => {\n const db = { products: [{ id: 'p1', name: 'Alpha', score: 4.2 }, { id: 'p2', name: 'Beta', score: 4.8 }, { id: 'p3', name: 'Gamma', score: 3.9 }] };\n return {\n topProducts: (_, { limit }) =>\n [...db.products].sort((a, b) => b.score - a.score).slice(0, limit)\n };\n })()","expected_response":"{\"data\": {\"topProducts\": [{\"name\": \"Beta\", \"score\": 4.8}, {\"name\": \"Alpha\", \"score\": 4.2}]}}","schema_definition":"type Query {\n topProducts(limit: Int!): [Product!]!\n}\ntype Product {\n id: ID!\n name: String!\n score: Float!\n}"}} {"submissionId":"cmsrcqpbc004qq2p275jhm0i1","title":"Submission JHM0I1","payload":{"sample_query":"mutation { deletePost(id: \"99\") }","resolver_code":"Mutation: (() => {\n const db = { posts: [{ id: '1' }, { id: '2' }] };\n return {\n deletePost: (_, { id }) => {\n const idx = db.posts.findIndex(p => p.id === id);\n if (idx === -1) return false;\n db.posts.splice(idx, 1);\n return true;\n }\n };\n })()","expected_response":"{\"data\": {\"deletePost\": false}}","schema_definition":"type Query {\n ping: Boolean!\n}\ntype Mutation {\n deletePost(id: ID!): Boolean!\n}"}} {"submissionId":"cmsrcqpbc004rq2p2grdmclq6","title":"Submission DMCLQ6","payload":{"sample_query":"query { invoice(id: \"inv1\") { subtotal tax total } }","resolver_code":"Query: (() => {\n const db = { invoices: [{ id: 'inv1', subtotal: 100.00, tax: 8.75 }] };\n return {\n invoice: (_, { id }) => db.invoices.find(i => i.id === id)\n };\n })(),\n Invoice: {\n total: (parent) => parseFloat((parent.subtotal + parent.tax).toFixed(2))\n }","expected_response":"{\"data\": {\"invoice\": {\"subtotal\": 100.00, \"tax\": 8.75, \"total\": 108.75}}}","schema_definition":"type Query {\n invoice(id: ID!): Invoice\n}\ntype Invoice {\n id: ID!\n subtotal: Float!\n tax: Float!\n total: Float!\n}"}} {"submissionId":"cmsrcqpbc004sq2p2koudvx3w","title":"Submission UDVX3W","payload":{"sample_query":"query { event(id: \"e1\") { name attendeeCount attendees { name } } }","resolver_code":"...(() => {\n const db = {\n events: [{ id: 'e1', name: 'Hackathon', attendeeIds: ['1', '3'] }],\n users: [{ id: '1', name: 'Alice' }, { id: '2', name: 'Bob' }, { id: '3', name: 'Carol' }]\n };\n return {\n Query: {\n event: (_, { id }) => db.events.find(e => e.id === id)\n },\n Event: {\n attendees: (parent) => parent.attendeeIds.map(aid => db.users.find(u => u.id === aid)),\n attendeeCount: (parent) => parent.attendeeIds.length\n }\n };\n })()","expected_response":"{\"data\": {\"event\": {\"name\": \"Hackathon\", \"attendeeCount\": 2, \"attendees\": [{\"name\": \"Alice\"}, {\"name\": \"Carol\"}]}}}","schema_definition":"type Query {\n event(id: ID!): Event\n}\ntype Event {\n id: ID!\n name: String!\n attendees: [User!]!\n attendeeCount: Int!\n}\ntype User {\n id: ID!\n name: String!\n}"}} {"submissionId":"cmsrcqpbc004tq2p2oap7po8y","title":"Submission P7PO8Y","payload":{"sample_query":"query { config(key: \"API_KEY\") { key value isSecret } }","resolver_code":"Query: (() => {\n const db = { config: [{ key: 'API_KEY', value: 'secret123', isSecret: true }] };\n return {\n config: (_, { key }) => db.config.find(c => c.key === key)\n };\n })(),\n ConfigEntry: {\n value: (parent) => parent.isSecret ? '***' : parent.value\n }","expected_response":"{\"data\": {\"config\": {\"key\": \"API_KEY\", \"value\": \"***\", \"isSecret\": true}}}","schema_definition":"type Query {\n config(key: String!): ConfigEntry\n}\ntype ConfigEntry {\n key: String!\n value: String!\n isSecret: Boolean!\n}"}} {"submissionId":"cmsrcqpbc004uq2p2h24qmws1","title":"Submission 4QMWS1","payload":{"sample_query":"mutation { updateUserEmail(id: \"1\", email: \"new@example.com\") { id name email } }","resolver_code":"Mutation: (() => {\n const db = { users: [{ id: '1', name: 'Alice', email: 'old@example.com' }] };\n return {\n updateUserEmail: (_, { id, email }) => {\n const user = db.users.find(u => u.id === id);\n if (!user) return null;\n user.email = email;\n return user;\n }\n };\n })()","expected_response":"{\"data\": {\"updateUserEmail\": {\"id\": \"1\", \"name\": \"Alice\", \"email\": \"new@example.com\"}}}","schema_definition":"type Query {\n ping: Boolean!\n}\ntype Mutation {\n updateUserEmail(id: ID!, email: String!): User\n}\ntype User {\n id: ID!\n name: String!\n email: String!\n}"}} {"submissionId":"cmsrcqpbc004vq2p2v0avqwzs","title":"Submission AVQWZS","payload":{"sample_query":"query { paginated(page: 2, pageSize: 3) { items totalPages } }","resolver_code":"Query: (() => {\n const db = { items: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'] };\n return {\n paginated: (_, { page, pageSize }) => {\n const all = db.items;\n const start = (page - 1) * pageSize;\n return {\n items: all.slice(start, start + pageSize),\n totalPages: Math.ceil(all.length / pageSize)\n };\n }\n };\n })()","expected_response":"{\"data\": {\"paginated\": {\"items\": [\"d\", \"e\", \"f\"], \"totalPages\": 3}}}","schema_definition":"type Query {\n paginated(page: Int!, pageSize: Int!): PaginatedResult!\n}\ntype PaginatedResult {\n items: [String!]!\n totalPages: Int!\n}"}} {"submissionId":"cmsrcqpbc004wq2p2z8mq6tvz","title":"Submission MQ6TVZ","payload":{"sample_query":"query { stats { userCount orderCount revenue } }","resolver_code":"Query: (() => {\n const db = { users: [{}, {}, {}], orders: [{ amount: 100 }, { amount: 69.99 }] };\n return {\n stats: (_, __, ctx) => ({\n userCount: db.users.length,\n orderCount: db.orders.length,\n revenue: db.orders.reduce((sum, o) => sum + o.amount, 0)\n })\n };\n })()","expected_response":"{\"data\": {\"stats\": {\"userCount\": 3, \"orderCount\": 2, \"revenue\": 169.99}}}","schema_definition":"type Query {\n stats: Stats!\n}\ntype Stats {\n userCount: Int!\n orderCount: Int!\n revenue: Float!\n}"}} {"submissionId":"cmsrcqpbc004yq2p2bc127aj4","title":"Submission 127AJ4","payload":{"sample_query":"query { latestVersion(pkg: \"lodash\") { pkg version downloads } }","resolver_code":"Query: (() => {\n const db = { packages: [{ pkg: 'lodash', version: '4.17.20', downloads: 80000 }, { pkg: 'lodash', version: '4.17.21', downloads: 120000 }] };\n return {\n latestVersion: (_, { pkg }) => {\n const versions = db.packages.filter(p => p.pkg === pkg);\n if (!versions.length) return null;\n return versions.reduce((best, cur) => cur.downloads > best.downloads ? cur : best);\n }\n };\n })()","expected_response":"{\"data\": {\"latestVersion\": {\"pkg\": \"lodash\", \"version\": \"4.17.21\", \"downloads\": 120000}}}","schema_definition":"type Query {\n latestVersion(pkg: String!): PackageVersion\n}\ntype PackageVersion {\n pkg: String!\n version: String!\n downloads: Int!\n}"}} {"submissionId":"cmsrcqpbc004zq2p2h8nwqhf3","title":"Submission NWQHF3","payload":{"sample_query":"query { nodes(ids: [\"i1\", \"i3\"]) { id ... on Item { label } } }","resolver_code":"Query: (() => {\n const db = { items: [{ id: 'i1', label: 'First' }, { id: 'i2', label: 'Second' }, { id: 'i3', label: 'Third' }] };\n return {\n nodes: (_, { ids }) => ids.map(id => db.items.find(i => i.id === id)).filter(Boolean)\n };\n })()","expected_response":"{\"data\": {\"nodes\": [{\"id\": \"i1\", \"label\": \"First\"}, {\"id\": \"i3\", \"label\": \"Third\"}]}}","schema_definition":"type Query {\n nodes(ids: [ID!]!): [Item!]!\n}\ntype Item {\n id: ID!\n label: String!\n}"}} {"submissionId":"cmsrcsze10050q2p26qypsklu","title":"Submission YPSKLU","payload":{"sample_query":"{ user(id: \"1\") { name email } }","resolver_code":"Query: {\n user: (_, {id}) => [{id:\"1\",name:\"Alice\",email:\"alice@example.com\"},{id:\"2\",name:\"Bob\",email:\"bob@example.com\"}].find(u => u.id === id)\n}","expected_response":"{\"data\": {\"user\": {\"name\": \"Alice\", \"email\": \"alice@example.com\"}}}","schema_definition":"type Query {\n user(id: ID!): User\n}\ntype User {\n id: ID!\n name: String!\n email: String!\n}"}} {"submissionId":"cmsrcsze10051q2p20q27fe6c","title":"Submission 27FE6C","payload":{"sample_query":"{ divide(a: 10, b: 4) }","resolver_code":"Query: {\n divide: (_, {a, b}) => {\n if (b === 0) throw new Error('division by zero');\n return a / b;\n }\n}","expected_response":"{\"data\": {\"divide\": 2.5}}","schema_definition":"type Query {\n divide(a: Float!, b: Float!): Float!\n}"}} {"submissionId":"cmsrcsze10052q2p2l09htpma","title":"Submission 9HTPMA","payload":{"sample_query":"{ palindrome(word: \"racecar\") }","resolver_code":"Query: {\n palindrome: (_, {word}) => word === word.split('').reverse().join('')\n}","expected_response":"{\"data\": {\"palindrome\": true}}","schema_definition":"type Query {\n palindrome(word: String!): Boolean!\n}"}} {"submissionId":"cmsrcsze10053q2p2d1d4xm5b","title":"Submission D4XM5B","payload":{"sample_query":"{ fibonacci(n: 10) }","resolver_code":"Query: {\n fibonacci: (_, {n}) => {\n if (n <= 1) return n;\n let a = 0, b = 1;\n for (let i = 2; i <= n; i++) { [a, b] = [b, a + b]; }\n return b;\n }\n}","expected_response":"{\"data\": {\"fibonacci\": 55}}","schema_definition":"type Query {\n fibonacci(n: Int!): Int!\n}"}} {"submissionId":"cmsrcsze10054q2p2407eefdi","title":"Submission 7EEFDI","payload":{"sample_query":"{ product(id: \"p1\") { name price discountedPrice } }","resolver_code":"const products = [{id:\"p1\",name:\"Widget\",price:100.0},{id:\"p2\",name:\"Gadget\",price:200.0}];\nQuery: {\n product: (_, {id}) => products.find(p => p.id === id)\n},\nProduct: {\n discountedPrice: (p) => parseFloat((p.price * 0.9).toFixed(2))\n}","expected_response":"{\"data\": {\"product\": {\"name\": \"Widget\", \"price\": 100, \"discountedPrice\": 90}}}","schema_definition":"type Query {\n product(id: ID!): Product\n}\ntype Product {\n id: ID!\n name: String!\n price: Float!\n discountedPrice: Float!\n}"}} {"submissionId":"cmsrcsze10055q2p2tug3qiqw","title":"Submission G3QIQW","payload":{"sample_query":"{ greet(name: \"Alice\", lang: \"es\") }","resolver_code":"Query: {\n greet: (_, {name, lang}) => {\n const greetings = {en: 'Hello', es: 'Hola', fr: 'Bonjour'};\n return `${greetings[lang] || 'Hi'}, ${name}!`;\n }\n}","expected_response":"{\"data\": {\"greet\": \"Hola, Alice!\"}}","schema_definition":"type Query {\n greet(name: String!, lang: String!): String!\n}"}} {"submissionId":"cmsrcsze10056q2p2c0vh06jy","title":"Submission VH06JY","payload":{"sample_query":"{ posts(published: true) { id title } }","resolver_code":"const posts = [{id:\"1\",title:\"Hello\",published:true},{id:\"2\",title:\"Draft\",published:false},{id:\"3\",title:\"World\",published:true}];\nQuery: {\n posts: (_, {published}) => published === undefined ? posts : posts.filter(p => p.published === published)\n}","expected_response":"{\"data\": {\"posts\": [{\"id\": \"1\", \"title\": \"Hello\"}, {\"id\": \"3\", \"title\": \"World\"}]}}","schema_definition":"type Query {\n posts(published: Boolean): [Post!]!\n}\ntype Post {\n id: ID!\n title: String!\n published: Boolean!\n}"}} {"submissionId":"cmsrcsze10057q2p21qu2l7zb","title":"Submission U2L7ZB","payload":{"sample_query":"{ clamp(value: 150, min: 0, max: 100) }","resolver_code":"Query: {\n clamp: (_, {value, min, max}) => Math.min(Math.max(value, min), max)\n}","expected_response":"{\"data\": {\"clamp\": 100}}","schema_definition":"type Query {\n clamp(value: Int!, min: Int!, max: Int!): Int!\n}"}} {"submissionId":"cmsrcsze10058q2p298gecsm8","title":"Submission GECSM8","payload":{"sample_query":"{ users { id name teamId } }","resolver_code":"const users = [{id:\"u1\",name:\"Alice\",teamId:\"t1\"},{id:\"u2\",name:\"Bob\",teamId:\"t2\"},{id:\"u3\",name:\"Carol\",teamId:\"t1\"}];\nQuery: { users: () => users }","expected_response":"{\"data\": {\"users\": [{\"id\": \"u1\", \"name\": \"Alice\", \"teamId\": \"t1\"}, {\"id\": \"u2\", \"name\": \"Bob\", \"teamId\": \"t2\"}, {\"id\": \"u3\", \"name\": \"Carol\", \"teamId\": \"t1\"}]}}","schema_definition":"type Query {\n users: [User!]!\n}\ntype User {\n id: ID!\n name: String!\n teamId: ID!\n}"}} {"submissionId":"cmsrcsze10059q2p2xngbw7pv","title":"Submission GBW7PV","payload":{"sample_query":"{ factorial(n: 5) }","resolver_code":"Query: {\n factorial: (_, {n}) => {\n if (n < 0) throw new Error('negative input');\n let result = 1;\n for (let i = 2; i <= n; i++) result *= i;\n return result;\n }\n}","expected_response":"{\"data\": {\"factorial\": 120}}","schema_definition":"type Query {\n factorial(n: Int!): Int!\n}"}} {"submissionId":"cmsrcsze1005aq2p2g6fwnkep","title":"Submission FWNKEP","payload":{"sample_query":"{ temperatureConvert(celsius: 100) { celsius fahrenheit kelvin } }","resolver_code":"Query: {\n temperatureConvert: (_, {celsius}) => ({\n celsius,\n fahrenheit: parseFloat((celsius * 9/5 + 32).toFixed(2)),\n kelvin: parseFloat((celsius + 273.15).toFixed(2))\n })\n}","expected_response":"{\"data\": {\"temperatureConvert\": {\"celsius\": 100, \"fahrenheit\": 212, \"kelvin\": 373.15}}}","schema_definition":"type Query {\n temperatureConvert(celsius: Float!): Temps!\n}\ntype Temps {\n celsius: Float!\n fahrenheit: Float!\n kelvin: Float!\n}"}} {"submissionId":"cmsrcsze1005bq2p2gvyfmdd6","title":"Submission YFMDD6","payload":{"sample_query":"{ reverseWords(sentence: \"hello world foo\") }","resolver_code":"Query: {\n reverseWords: (_, {sentence}) => sentence.split(' ').reverse().join(' ')\n}","expected_response":"{\"data\": {\"reverseWords\": \"foo world hello\"}}","schema_definition":"type Query {\n reverseWords(sentence: String!): String!\n}"}} {"submissionId":"cmsrcsze1005cq2p2z0oy9hgp","title":"Submission OY9HGP","payload":{"sample_query":"mutation { addNumbers(a: 37, b: 58) }","resolver_code":"Mutation: {\n addNumbers: (_, {a, b}) => a + b\n}","expected_response":"{\"data\": {\"addNumbers\": 95}}","schema_definition":"type Query {\n ping: Boolean!\n}\ntype Mutation {\n addNumbers(a: Int!, b: Int!): Int!\n}"}} {"submissionId":"cmsrcsze1005dq2p275hoqrex","title":"Submission HOQREX","payload":{"sample_query":"{ invoice(subtotal: 200.0, taxRate: 0.08) { subtotal tax total } }","resolver_code":"Query: {\n invoice: (_, {subtotal, taxRate}) => ({\n subtotal,\n tax: parseFloat((subtotal * taxRate).toFixed(2)),\n total: parseFloat((subtotal * (1 + taxRate)).toFixed(2))\n })\n}","expected_response":"{\"data\": {\"invoice\": {\"subtotal\": 200, \"tax\": 16, \"total\": 216}}}","schema_definition":"type Query {\n invoice(subtotal: Float!, taxRate: Float!): Invoice!\n}\ntype Invoice {\n subtotal: Float!\n tax: Float!\n total: Float!\n}"}} {"submissionId":"cmsrcsze1005eq2p26l345rjj","title":"Submission 345RJJ","payload":{"sample_query":"{ search(items: [\"apple\", \"banana\", \"Apricot\", \"cherry\"], query: \"ap\") }","resolver_code":"Query: {\n search: (_, {items, query}) => items.filter(item => item.toLowerCase().includes(query.toLowerCase()))\n}","expected_response":"{\"data\": {\"search\": [\"apple\", \"Apricot\"]}}","schema_definition":"type Query {\n search(items: [String!]!, query: String!): [String!]!\n}"}} {"submissionId":"cmsrcsze1005fq2p2m0d4yph6","title":"Submission D4YPH6","payload":{"sample_query":"{ stats(values: [3.0, 1.0, 4.0, 1.0, 5.0]) { min max mean } }","resolver_code":"Query: {\n stats: (_, {values}) => ({\n min: Math.min(...values),\n max: Math.max(...values),\n mean: parseFloat((values.reduce((s,v) => s+v, 0) / values.length).toFixed(4))\n })\n}","expected_response":"{\"data\": {\"stats\": {\"min\": 1, \"max\": 5, \"mean\": 2.8}}}","schema_definition":"type Query {\n stats(values: [Float!]!): Stats!\n}\ntype Stats {\n min: Float!\n max: Float!\n mean: Float!\n}"}} {"submissionId":"cmsrcsze1005gq2p2kaeaidk8","title":"Submission EAIDK8","payload":{"sample_query":"{ slugify(title: \"Hello, World! This is a Test.\") }","resolver_code":"Query: {\n slugify: (_, {title}) => title.toLowerCase().trim().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')\n}","expected_response":"{\"data\": {\"slugify\": \"hello-world-this-is-a-test\"}}","schema_definition":"type Query {\n slugify(title: String!): String!\n}"}} {"submissionId":"cmsrcsze1005hq2p2l17zu91u","title":"Submission 7ZU91U","payload":{"sample_query":"{ paginate(total: 95, page: 3, perPage: 10) { totalPages currentPage hasNext hasPrev } }","resolver_code":"Query: {\n paginate: (_, {total, page, perPage}) => {\n const totalPages = Math.ceil(total / perPage);\n return { totalPages, currentPage: page, hasNext: page < totalPages, hasPrev: page > 1 };\n }\n}","expected_response":"{\"data\": {\"paginate\": {\"totalPages\": 10, \"currentPage\": 3, \"hasNext\": true, \"hasPrev\": true}}}","schema_definition":"type Query {\n paginate(total: Int!, page: Int!, perPage: Int!): Pagination!\n}\ntype Pagination {\n totalPages: Int!\n currentPage: Int!\n hasNext: Boolean!\n hasPrev: Boolean!\n}"}} {"submissionId":"cmsrcsze1005iq2p2mb0mjvdo","title":"Submission 0MJVDO","payload":{"sample_query":"{ leapYear(year: 2000) }","resolver_code":"Query: {\n leapYear: (_, {year}) => (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0\n}","expected_response":"{\"data\": {\"leapYear\": true}}","schema_definition":"type Query {\n leapYear(year: Int!): Boolean!\n}"}} {"submissionId":"cmsrcsze1005jq2p258ut1yq6","title":"Submission UT1YQ6","payload":{"sample_query":"{ truncate(text: \"The quick brown fox\", maxLen: 9) { result truncated } }","resolver_code":"Query: {\n truncate: (_, {text, maxLen}) => ({\n result: text.length > maxLen ? text.slice(0, maxLen) + '...' : text,\n truncated: text.length > maxLen\n })\n}","expected_response":"{\"data\": {\"truncate\": {\"result\": \"The quick...\", \"truncated\": true}}}","schema_definition":"type Query {\n truncate(text: String!, maxLen: Int!): TruncatedText!\n}\ntype TruncatedText {\n result: String!\n truncated: Boolean!\n}"}} {"submissionId":"cmsrf92n70000y8p2tkhuc8x4","title":"Submission HUC8X4","payload":{"sample_query":"{ order(id: \"A7\") { id subtotal taxRate total } }","resolver_code":"Query: { order: (_, {id}) => ({ id, subtotal: id === 'A7' ? 125.5 : 80, taxRate: 0.08 }) }, Order: { total: (o) => Number((o.subtotal * (1 + o.taxRate)).toFixed(2)) }","expected_response":"{\"data\":{\"order\":{\"id\":\"A7\",\"subtotal\":125.5,\"taxRate\":0.08,\"total\":135.54}}}","schema_definition":"type Order { id: ID!, subtotal: Float!, taxRate: Float!, total: Float! }\ntype Query { order(id: ID!): Order! }"}} {"submissionId":"cmsrf92n70001y8p2lhgkake6","title":"Submission GKAKE6","payload":{"sample_query":"{ user(name: \"Ada Lovelace\") { id name initials } }","resolver_code":"Query: { user: (_, {name}) => ({ id: name.toLowerCase().replace(/\\s+/g,'-'), name }) }, User: { initials: (u) => u.name.split(/\\s+/).filter(Boolean).map(x => x[0].toUpperCase()).join('') }","expected_response":"{\"data\":{\"user\":{\"id\":\"ada-lovelace\",\"name\":\"Ada Lovelace\",\"initials\":\"AL\"}}}","schema_definition":"type User { id: ID!, name: String!, initials: String! }\ntype Query { user(name: String!): User! }"}} {"submissionId":"cmsrf92n70002y8p2sxqetjok","title":"Submission QETJOK","payload":{"sample_query":"{ stats(values: [4, 9, 2, 5]) { values min max average } }","resolver_code":"Query: { stats: (_, {values}) => ({ values }) }, Stats: { min: (s) => Math.min(...s.values), max: (s) => Math.max(...s.values), average: (s) => s.values.reduce((a,b)=>a+b,0)/s.values.length }","expected_response":"{\"data\":{\"stats\":{\"values\":[4,9,2,5],\"min\":2,\"max\":9,\"average\":5}}}","schema_definition":"type Stats { values: [Int!]!, min: Int!, max: Int!, average: Float! }\ntype Query { stats(values: [Int!]!): Stats! }"}} {"submissionId":"cmsrf92n70003y8p2dhagl4xg","title":"Submission AGL4XG","payload":{"sample_query":"{ product(sku: \"P9\", price: 199.99, discountPct: 15) { sku price discountPct finalPrice } }","resolver_code":"Query: { product: (_, args) => args }, Product: { finalPrice: (p) => Number((p.price * (100 - p.discountPct) / 100).toFixed(2)) }","expected_response":"{\"data\":{\"product\":{\"sku\":\"P9\",\"price\":199.99,\"discountPct\":15,\"finalPrice\":169.99}}}","schema_definition":"type Product { sku: ID!, price: Float!, discountPct: Int!, finalPrice: Float! }\ntype Query { product(sku: ID!, price: Float!, discountPct: Int!): Product! }"}} {"submissionId":"cmsrf92n70004y8p2w0ssr5ph","title":"Submission SSR5PH","payload":{"sample_query":"{ range(start: 3, end: 7) { start end count values } }","resolver_code":"Query: { range: (_, {start,end}) => ({ start, end }) }, Range: { values: (r) => Array.from({length: Math.max(0, r.end-r.start+1)}, (_,i)=>r.start+i), count: (r) => Math.max(0, r.end-r.start+1) }","expected_response":"{\"data\":{\"range\":{\"start\":3,\"end\":7,\"count\":5,\"values\":[3,4,5,6,7]}}}","schema_definition":"type Range { start: Int!, end: Int!, values: [Int!]!, count: Int! }\ntype Query { range(start: Int!, end: Int!): Range! }"}} {"submissionId":"cmsrf92n70005y8p2fzgir20n","title":"Submission GIR20N","payload":{"sample_query":"{ analyze(text: \"graph resolvers are composable\") { wordCount words longest } }","resolver_code":"Query: { analyze: (_, {text}) => ({ text, words: text.trim().split(/\\s+/).filter(Boolean) }) }, TextAnalysis: { wordCount: (x) => x.words.length, longest: (x) => x.words.reduce((a,b)=>b.length>a.length?b:a,'') }","expected_response":"{\"data\":{\"analyze\":{\"wordCount\":4,\"words\":[\"graph\",\"resolvers\",\"are\",\"composable\"],\"longest\":\"composable\"}}}","schema_definition":"type TextAnalysis { text: String!, words: [String!]!, wordCount: Int!, longest: String! }\ntype Query { analyze(text: String!): TextAnalysis! }"}} {"submissionId":"cmsrf92n80006y8p2ukkw9k5f","title":"Submission KW9K5F","payload":{"sample_query":"{ matrixInfo(matrix: [[1,2,3],[4,5,6]]) { rows cols rowSums total } }","resolver_code":"Query: { matrixInfo: (_, {matrix}) => ({ matrix }) }, MatrixInfo: { rows: (m) => m.matrix.length, cols: (m) => m.matrix.length ? m.matrix[0].length : 0, rowSums: (m) => m.matrix.map(r=>r.reduce((a,b)=>a+b,0)), total: (m) => m.matrix.flat().reduce((a,b)=>a+b,0) }","expected_response":"{\"data\":{\"matrixInfo\":{\"rows\":2,\"cols\":3,\"rowSums\":[6,15],\"total\":21}}}","schema_definition":"type MatrixInfo { rows: Int!, cols: Int!, rowSums: [Int!]!, total: Int! }\ntype Query { matrixInfo(matrix: [[Int!]!]!): MatrixInfo! }"}} {"submissionId":"cmsrf92n80007y8p2k6ep04bp","title":"Submission EP04BP","payload":{"sample_query":"{ leaderboard { items { name score } top { name score } } }","resolver_code":"Query: { leaderboard: () => ({ items: [{name:'beta',score:17},{name:'alpha',score:23},{name:'gamma',score:23}] }) }, Leaderboard: { top: (l) => [...l.items].sort((a,b)=>b.score-a.score || a.name.localeCompare(b.name))[0] }","expected_response":"{\"data\":{\"leaderboard\":{\"items\":[{\"name\":\"beta\",\"score\":17},{\"name\":\"alpha\",\"score\":23},{\"name\":\"gamma\",\"score\":23}],\"top\":{\"name\":\"alpha\",\"score\":23}}}}","schema_definition":"type Item { name: String!, score: Int! }\ntype Leaderboard { items: [Item!]!, top: Item! }\ntype Query { leaderboard: Leaderboard! }"}} {"submissionId":"cmsrf92n80008y8p2xsjdi2ym","title":"Submission JDI2YM","payload":{"sample_query":"{ numbers(page: 2, pageSize: 3) { page pageSize items hasNext } }","resolver_code":"Query: { numbers: (_, {page,pageSize}) => { const all=[10,20,30,40,50,60,70]; const start=(page-1)*pageSize; return {items:all.slice(start,start+pageSize),page,pageSize,total:all.length,start}; } }, Page: { hasNext: (p) => p.start + p.pageSize < p.total }","expected_response":"{\"data\":{\"numbers\":{\"page\":2,\"pageSize\":3,\"items\":[40,50,60],\"hasNext\":true}}}","schema_definition":"type Page { items: [Int!]!, page: Int!, pageSize: Int!, hasNext: Boolean! }\ntype Query { numbers(page: Int!, pageSize: Int!): Page! }"}} {"submissionId":"cmsrf92n80009y8p2tg66qkg4","title":"Submission 66QKG4","payload":{"sample_query":"{ account(id: \"blocked\") { id balance status } }","resolver_code":"Query: { account: (_, {id}) => { if (id === 'blocked') throw new Error('account unavailable'); return {id,balance:245.75,status:'ACTIVE'}; } }","expected_response":"{\"errors\":[{\"message\":\"account unavailable\"}]}","schema_definition":"type Account { id: ID!, balance: Float!, status: String! }\ntype Query { account(id: ID!): Account! }"}} {"submissionId":"cmsrf92n8000ay8p2e2fvp908","title":"Submission FVP908","payload":{"sample_query":"{ temperature(celsius: 25) { celsius fahrenheit kelvin } }","resolver_code":"Query: { temperature: (_, {celsius}) => ({ celsius }) }, Temperature: { fahrenheit: (t) => t.celsius*9/5+32, kelvin: (t) => Number((t.celsius+273.15).toFixed(2)) }","expected_response":"{\"data\":{\"temperature\":{\"celsius\":25,\"fahrenheit\":77,\"kelvin\":298.15}}}","schema_definition":"type Temperature { celsius: Float!, fahrenheit: Float!, kelvin: Float! }\ntype Query { temperature(celsius: Float!): Temperature! }"}} {"submissionId":"cmsrf92n8000by8p27inyb610","title":"Submission NYB610","payload":{"sample_query":"{ a: pair(left: 4, right: 6) { sum product } b: pair(left: -3, right: 5) { sum product } }","resolver_code":"Query: { pair: (_, args) => args }, Pair: { sum: (p) => p.left+p.right, product: (p) => p.left*p.right }","expected_response":"{\"data\":{\"a\":{\"sum\":10,\"product\":24},\"b\":{\"sum\":2,\"product\":-15}}}","schema_definition":"type Pair { left: Int!, right: Int!, sum: Int!, product: Int! }\ntype Query { pair(left: Int!, right: Int!): Pair! }"}} {"submissionId":"cmsrf92n8000cy8p2qyp6sc0x","title":"Submission P6SC0X","payload":{"sample_query":"{ buckets { key values sum } }","resolver_code":"Query: { buckets: () => [{key:'odd',values:[1,3,5]},{key:'even',values:[2,4,6,8]}] }, Bucket: { sum: (b) => b.values.reduce((a,x)=>a+x,0) }","expected_response":"{\"data\":{\"buckets\":[{\"key\":\"odd\",\"values\":[1,3,5],\"sum\":9},{\"key\":\"even\",\"values\":[2,4,6,8],\"sum\":20}]}}","schema_definition":"type Bucket { key: String!, values: [Int!]!, sum: Int! }\ntype Query { buckets: [Bucket!]! }"}} {"submissionId":"cmsrf92n8000dy8p2i52ae0xt","title":"Submission 2AE0XT","payload":{"sample_query":"{ token(raw: \"JOB-2048\") { raw prefix id } }","resolver_code":"Query: { token: (_, {raw}) => { const m=/^([A-Z]+)-(\\d+)$/.exec(raw); if(!m) throw new Error('invalid token'); return {raw,prefix:m[1],id:Number(m[2])}; } }","expected_response":"{\"data\":{\"token\":{\"raw\":\"JOB-2048\",\"prefix\":\"JOB\",\"id\":2048}}}","schema_definition":"type Token { raw: String!, prefix: String!, id: Int! }\ntype Query { token(raw: String!): Token! }"}} {"submissionId":"cmsrf92n8000ey8p2mknekt41","title":"Submission NEKT41","payload":{"sample_query":"{ inventory(stock: 25, reserved: 7) { available canFulfill(qty: 18) canFulfillTooMuch: canFulfill(qty: 19) } }","resolver_code":"Query: { inventory: (_, args) => args }, Inventory: { available: (i) => Math.max(0,i.stock-i.reserved), canFulfill: (i,{qty}) => qty <= Math.max(0,i.stock-i.reserved) }","expected_response":"{\"data\":{\"inventory\":{\"available\":18,\"canFulfill\":true,\"canFulfillTooMuch\":false}}}","schema_definition":"type Inventory { stock: Int!, reserved: Int!, available: Int!, canFulfill(qty: Int!): Boolean! }\ntype Query { inventory(stock: Int!, reserved: Int!): Inventory! }"}} {"submissionId":"cmsrf92n8000fy8p28ao14147","title":"Submission O14147","payload":{"sample_query":"{ date(raw: \"2026-08-13\") { year month day iso } }","resolver_code":"Query: { date: (_, {raw}) => { const m=/^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(raw); if(!m) throw new Error('invalid date format'); return {raw,year:+m[1],month:+m[2],day:+m[3]}; } }, DateParts: { iso: (d) => `${String(d.year).padStart(4,'0')}-${String(d.month).padStart(2,'0')}-${String(d.day).padStart(2,'0')}` }","expected_response":"{\"data\":{\"date\":{\"year\":2026,\"month\":8,\"day\":13,\"iso\":\"2026-08-13\"}}}","schema_definition":"type DateParts { raw: String!, year: Int!, month: Int!, day: Int!, iso: String! }\ntype Query { date(raw: String!): DateParts! }"}} {"submissionId":"cmsrf92n8000gy8p2a4yimy01","title":"Submission YIMY01","payload":{"sample_query":"{ groups(prefix: \"a\") { name size members } }","resolver_code":"Query: { groups: (_, {prefix}) => [{name:'alpha',members:['amy','alan']},{name:'beta',members:['bob']},{name:'atlas',members:['ava','ari','axel']}].filter(g=>g.name.startsWith(prefix)) }, Group: { size: (g) => g.members.length }","expected_response":"{\"data\":{\"groups\":[{\"name\":\"alpha\",\"size\":2,\"members\":[\"amy\",\"alan\"]},{\"name\":\"atlas\",\"size\":3,\"members\":[\"ava\",\"ari\",\"axel\"]}]}}","schema_definition":"type Group { name: String!, members: [String!]!, size: Int! }\ntype Query { groups(prefix: String!): [Group!]! }"}} {"submissionId":"cmsrf92n8000hy8p2i6lh80cm","title":"Submission LH80CM","payload":{"sample_query":"{ metric(name: \"cpu\") { name samples latest delta } }","resolver_code":"Query: { metric: (_, {name}) => ({name,samples:name==='cpu'?[0.42,0.51,0.47]:[1.0]}) }, Metric: { latest: (m) => m.samples[m.samples.length-1], delta: (m) => Number((m.samples[m.samples.length-1]-m.samples[0]).toFixed(2)) }","expected_response":"{\"data\":{\"metric\":{\"name\":\"cpu\",\"samples\":[0.42,0.51,0.47],\"latest\":0.47,\"delta\":0.05}}}","schema_definition":"type Metric { name: String!, samples: [Float!]!, latest: Float!, delta: Float! }\ntype Query { metric(name: String!): Metric! }"}} {"submissionId":"cmsrf92n8000iy8p2emi3o4gm","title":"Submission I3O4GM","payload":{"sample_query":"{ rectangle(width: 7.5, height: 4) { area perimeter square } }","resolver_code":"Query: { rectangle: (_, args) => args }, Rectangle: { area: (r) => r.width*r.height, perimeter: (r) => 2*(r.width+r.height), square: (r) => r.width===r.height }","expected_response":"{\"data\":{\"rectangle\":{\"area\":30,\"perimeter\":23,\"square\":false}}}","schema_definition":"type Rectangle { width: Float!, height: Float!, area: Float!, perimeter: Float!, square: Boolean! }\ntype Query { rectangle(width: Float!, height: Float!): Rectangle! }"}} {"submissionId":"cmsrf92n8000jy8p26y8gmrh2","title":"Submission 8GMRH2","payload":{"sample_query":"{ found: search(values: [\"Alpha\",\"Beta\",\"Gamma\"], needle: \"beta\") { value index } missing: search(values: [\"Alpha\",\"Beta\"], needle: \"delta\") { value index } }","resolver_code":"Query: { search: (_, {values,needle}) => { const index=values.findIndex(v=>v.toLowerCase()===needle.toLowerCase()); return index<0?null:{value:values[index],index}; } }","expected_response":"{\"data\":{\"found\":{\"value\":\"Beta\",\"index\":1},\"missing\":null}}","schema_definition":"type SearchResult { value: String!, index: Int! }\ntype Query { search(values: [String!]!, needle: String!): SearchResult }"}} {"submissionId":"cmsrfkkch002dy8p2ly2pw60h","title":"Submission 2PW60H","payload":{"sample_query":"{ invoice(discountPct: 10) { lines { sku qty amount } subtotal discount total } }","resolver_code":"Query: { invoice: (_, {discountPct}) => ({ discountPct, lines: [{sku:'A',qty:2,unit:12.5},{sku:'B',qty:1,unit:20}] }) }, Line: { amount: (l) => l.qty*l.unit }, Invoice: { subtotal: (i) => i.lines.reduce((s,l)=>s+l.qty*l.unit,0), discount: (i) => i.lines.reduce((s,l)=>s+l.qty*l.unit,0)*i.discountPct/100, total: (i) => { const sub=i.lines.reduce((s,l)=>s+l.qty*l.unit,0); return sub-sub*i.discountPct/100; } }","expected_response":"{\"data\":{\"invoice\":{\"lines\":[{\"sku\":\"A\",\"qty\":2,\"amount\":25},{\"sku\":\"B\",\"qty\":1,\"amount\":20}],\"subtotal\":45,\"discount\":4.5,\"total\":40.5}}}","schema_definition":"type Line { sku: ID!, qty: Int!, unit: Float!, amount: Float! }\ntype Invoice { lines: [Line!]!, subtotal: Float!, discount: Float!, total: Float! }\ntype Query { invoice(discountPct: Int!): Invoice! }"}} {"submissionId":"cmsrfkkch002ey8p28xaeh5wf","title":"Submission AEH5WF","payload":{"sample_query":"{ sensor(name: \"cpu\") { name average alertCount(threshold: 0.6) readings { value above(threshold: 0.8) } } }","resolver_code":"Query: { sensor: (_, {name}) => ({ name, readings: name==='cpu'?[{value:0.4},{value:0.9},{value:0.7}]:[] }) }, Reading: { above: (r,{threshold}) => r.value > threshold }, Sensor: { average: (s) => s.readings.reduce((a,r)=>a+r.value,0)/s.readings.length, alertCount: (s,{threshold}) => s.readings.filter(r=>r.value>threshold).length }","expected_response":"{\"data\":{\"sensor\":{\"name\":\"cpu\",\"average\":0.6666666666666666,\"alertCount\":2,\"readings\":[{\"value\":0.4,\"above\":false},{\"value\":0.9,\"above\":true},{\"value\":0.7,\"above\":false}]}}}","schema_definition":"type Reading { value: Float!, above(threshold: Float!): Boolean! }\ntype Sensor { name: String!, readings: [Reading!]!, average: Float!, alertCount(threshold: Float!): Int! }\ntype Query { sensor(name: String!): Sensor! }"}} {"submissionId":"cmsrfkkch002fy8p2kodlignf","title":"Submission DLIGNF","payload":{"sample_query":"{ window(values: [5,10,15,20,25], start: 1, size: 3) { items total start end truncated } }","resolver_code":"Query: { window: (_, {values,start,size}) => { const s=Math.max(0,start); const items=values.slice(s,s+Math.max(0,size)); return {items,total:values.length,start:s,end:s+items.length}; } }, Window: { truncated: (w) => w.end < w.total }","expected_response":"{\"data\":{\"window\":{\"items\":[10,15,20],\"total\":5,\"start\":1,\"end\":4,\"truncated\":true}}}","schema_definition":"type Window { items: [Int!]!, total: Int!, start: Int!, end: Int!, truncated: Boolean! }\ntype Query { window(values: [Int!]!, start: Int!, size: Int!): Window! }"}} {"submissionId":"cmsrfkkch002gy8p22amnyzsn","title":"Submission MNYZSN","payload":{"sample_query":"{ parseTag(raw: \"worker-api@v12-beta\") { raw key version stable } }","resolver_code":"Query: { parseTag: (_, {raw}) => { const m=/^([a-z][a-z0-9-]*)@v([1-9]\\d*)(-beta)?$/.exec(raw); if(!m) throw new Error('invalid release tag'); return {raw,key:m[1],version:Number(m[2]),stable:!m[3]}; } }","expected_response":"{\"data\":{\"parseTag\":{\"raw\":\"worker-api@v12-beta\",\"key\":\"worker-api\",\"version\":12,\"stable\":false}}}","schema_definition":"type ParseResult { raw: String!, key: String!, version: Int!, stable: Boolean! }\ntype Query { parseTag(raw: String!): ParseResult! }"}} {"submissionId":"cmsrfkkch002hy8p2ao44sndb","title":"Submission 44SNDB","payload":{"sample_query":"{ ranking(minScore: 10) { eligible { id score eligible } winner { id score } } }","resolver_code":"Query: { ranking: (_, {minScore}) => ({ minScore, candidates: [{id:'c',score:8},{id:'a',score:12},{id:'b',score:12},{id:'d',score:5}] }) }, Candidate: { eligible: (c,_,ctx,info) => true }, Ranking: { eligible: (r) => r.candidates.filter(c=>c.score>=r.minScore).map(c=>({...c,eligible:true})), winner: (r) => [...r.candidates].filter(c=>c.score>=r.minScore).sort((a,b)=>b.score-a.score || a.id.localeCompare(b.id))[0] || null }","expected_response":"{\"data\":{\"ranking\":{\"eligible\":[{\"id\":\"a\",\"score\":12,\"eligible\":true},{\"id\":\"b\",\"score\":12,\"eligible\":true}],\"winner\":{\"id\":\"a\",\"score\":12}}}}","schema_definition":"type Candidate { id: ID!, score: Int!, eligible: Boolean! }\ntype Ranking { candidates: [Candidate!]!, eligible: [Candidate!]!, winner: Candidate }\ntype Query { ranking(minScore: Int!): Ranking! }"}} {"submissionId":"cmsrh4o3m00b4y8p2ikyibs86","title":"Submission YIBS86","payload":{"sample_query":"{ quote(unit:7, qty:3, discountPct:0) { subtotal discount total } }","resolver_code":"Query: { quote: (_, {unit,qty,discountPct}) => { if(qty<0 || discountPct<0 || discountPct>100) throw new Error(\"invalid quote arguments\"); const subtotal=unit*qty; const discount=Math.floor(subtotal*discountPct/100); return {subtotal,discount,total:subtotal-discount}; } }","expected_response":"{\"data\":{\"quote\":{\"subtotal\":21,\"discount\":0,\"total\":21}}}","schema_definition":"type Quote { subtotal: Int!, discount: Int!, total: Int! }\ntype Query { quote(unit: Int!, qty: Int!, discountPct: Int!): Quote! }"}} {"submissionId":"cmsrh4o3m00b9y8p2d2dz30l9","title":"Submission DZ30L9","payload":{"sample_query":"{ analyze(values:[3,8,0,11,5], floor:4) { count sum min max } }","resolver_code":"Query: { analyze: (_, {values,floor}) => { const kept=values.filter(v=>v>=floor); return {count:kept.length,sum:kept.reduce((a,b)=>a+b,0),min:kept.length?Math.min(...kept):null,max:kept.length?Math.max(...kept):null}; } }","expected_response":"{\"data\":{\"analyze\":{\"count\":3,\"sum\":24,\"min\":5,\"max\":11}}}","schema_definition":"type Stats { count: Int!, sum: Int!, min: Int, max: Int }\ntype Query { analyze(values: [Int!]!, floor: Int!): Stats! }"}} {"submissionId":"cmsrh4o3m00bey8p2ztbke61f","title":"Submission BKE61F","payload":{"sample_query":"{ page(values:[1,3,5,7,9,11], offset:0, limit:2) }","resolver_code":"Query: { page: (_, {values,offset,limit}) => { if(offset<0 || limit<1) throw new Error(\"invalid page bounds\"); return values.slice(offset,offset+limit); } }","expected_response":"{\"data\":{\"page\":[1,3]}}","schema_definition":"type Query { page(values: [Int!]!, offset: Int!, limit: Int!): [Int!]! }"}} {"submissionId":"cmsrh4o3m00bjy8p2u1tlricj","title":"Submission TLRICJ","payload":{"sample_query":"{ normalize(value:\" Alpha Beta 0 \", mode:LOWER) }","resolver_code":"Query: { normalize: (_, {value,mode}) => { const clean=value.trim().replace(/\\s+/g,\" \"); if(mode===\"LOWER\") return clean.toLowerCase(); if(mode===\"UPPER\") return clean.toUpperCase(); return clean.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\"); } }","expected_response":"{\"data\":{\"normalize\":\"alpha beta 0\"}}","schema_definition":"enum TextMode { LOWER UPPER SLUG }\ntype Query { normalize(value: String!, mode: TextMode!): String! }"}} {"submissionId":"cmsrh4o3m00boy8p2bgfv1yqp","title":"Submission FV1YQP","payload":{"sample_query":"{ eligibility(age:16, verified:true, balance:20) { eligible reasons } }","resolver_code":"Query: { eligibility: (_, {age,verified,balance}) => { const reasons=[]; if(age<18) reasons.push(\"underage\"); if(!verified) reasons.push(\"unverified\"); if(balance<50) reasons.push(\"low_balance\"); return {eligible:reasons.length===0,reasons}; } }","expected_response":"{\"data\":{\"eligibility\":{\"eligible\":false,\"reasons\":[\"underage\",\"low_balance\"]}}}","schema_definition":"type Eligibility { eligible: Boolean!, reasons: [String!]! }\ntype Query { eligibility(age: Int!, verified: Boolean!, balance: Int!): Eligibility! }"}} {"submissionId":"cmsrh4o3n00bty8p2jio7e37n","title":"Submission O7E37N","payload":{"sample_query":"{ histogram(values:[10,35,50,72,91], lowCut:30, highCut:70) { low mid high } }","resolver_code":"Query: { histogram: (_, {values,lowCut,highCut}) => { if(lowCut>=highCut) throw new Error(\"cuts out of order\"); const out={low:0,mid:0,high:0}; values.forEach(v=>out[v args }, Order: { total: (o) => o.base + Math.floor(o.base*o.taxPct/100) + o.fee }","expected_response":"{\"data\":{\"order\":{\"base\":100,\"taxPct\":5,\"fee\":0,\"total\":105}}}","schema_definition":"type Order { base: Int!, taxPct: Int!, fee: Int!, total: Int! }\ntype Query { order(base: Int!, taxPct: Int!, fee: Int!): Order! }"}} {"submissionId":"cmsrh4o3n00c3y8p2b1meuxtk","title":"Submission MEUXTK","payload":{"sample_query":"mutation { adjust(current:20, delta:-35, min:0, max:60) { before delta after clamped } }","resolver_code":"Query: { health: () => \"ok\" }, Mutation: { adjust: (_, {current,delta,min,max}) => { if(min>max) throw new Error(\"invalid bounds\"); const raw=current+delta; const after=Math.max(min,Math.min(max,raw)); return {before:current,delta,after,clamped:after!==raw}; } }","expected_response":"{\"data\":{\"adjust\":{\"before\":20,\"delta\":-35,\"after\":0,\"clamped\":true}}}","schema_definition":"type Adjustment { before: Int!, delta: Int!, after: Int!, clamped: Boolean! }\ntype Mutation { adjust(current: Int!, delta: Int!, min: Int!, max: Int!): Adjustment! }\ntype Query { health: String! }"}} {"submissionId":"cmsrh4o3n00c8y8p2toj1ccns","title":"Submission J1CCNS","payload":{"sample_query":"{ classify(score:12, passAt:60) { band passing margin } }","resolver_code":"Query: { classify: (_, {score,passAt}) => { if(score<0 || score>100) throw new Error(\"score outside range\"); return {band:score<50?\"LOW\":score<80?\"MEDIUM\":\"HIGH\",passing:score>=passAt,margin:score-passAt}; } }","expected_response":"{\"data\":{\"classify\":{\"band\":\"LOW\",\"passing\":false,\"margin\":-48}}}","schema_definition":"enum Band { LOW MEDIUM HIGH }\ntype Classification { band: Band!, passing: Boolean!, margin: Int! }\ntype Query { classify(score: Int!, passAt: Int!): Classification! }"}} {"submissionId":"cmsrh67rz00d6y8p2c8y3xbrj","title":"Submission Y3XBRJ","payload":{"sample_query":"{ orderCase32(base:120, taxPct:6, fee:3) { base taxPct fee total } }","resolver_code":"Query: { orderCase32: (_, args) => args }, Order: { total: (o) => o.base + Math.floor(o.base*o.taxPct/100) + o.fee }","expected_response":"{\"data\":{\"orderCase32\":{\"base\":120,\"taxPct\":6,\"fee\":3,\"total\":130}}}","schema_definition":"type Order { base: Int!, taxPct: Int!, fee: Int!, total: Int! }\ntype Query { orderCase32(base: Int!, taxPct: Int!, fee: Int!): Order! }"}} {"submissionId":"cmsrh67rz00d7y8p2oov7hq1l","title":"Submission V7HQ1L","payload":{"sample_query":"{ orderCase33(base:140, taxPct:7, fee:6) { base taxPct fee total } }","resolver_code":"Query: { orderCase33: (_, args) => args }, Order: { total: (o) => o.base + Math.floor(o.base*o.taxPct/100) + o.fee }","expected_response":"{\"data\":{\"orderCase33\":{\"base\":140,\"taxPct\":7,\"fee\":6,\"total\":155}}}","schema_definition":"type Order { base: Int!, taxPct: Int!, fee: Int!, total: Int! }\ntype Query { orderCase33(base: Int!, taxPct: Int!, fee: Int!): Order! }"}} {"submissionId":"cmsrh67rz00d9y8p21nioo6gk","title":"Submission IOO6GK","payload":{"sample_query":"{ orderCase35(base:180, taxPct:9, fee:12) { base taxPct fee total } }","resolver_code":"Query: { orderCase35: (_, args) => args }, Order: { total: (o) => o.base + Math.floor(o.base*o.taxPct/100) + o.fee }","expected_response":"{\"data\":{\"orderCase35\":{\"base\":180,\"taxPct\":9,\"fee\":12,\"total\":208}}}","schema_definition":"type Order { base: Int!, taxPct: Int!, fee: Int!, total: Int! }\ntype Query { orderCase35(base: Int!, taxPct: Int!, fee: Int!): Order! }"}} {"submissionId":"cmsrh67rz00dby8p2wukkiybr","title":"Submission KKIYBR","payload":{"sample_query":"mutation { adjustCase38(current:40, delta:-11, min:0, max:70) { before delta after clamped } }","resolver_code":"Query: { health: () => \"ok\" }, Mutation: { adjustCase38: (_, {current,delta,min,max}) => { if(min>max) throw new Error(\"invalid bounds\"); const raw=current+delta; const after=Math.max(min,Math.min(max,raw)); return {before:current,delta,after,clamped:after!==raw}; } }","expected_response":"{\"data\":{\"adjustCase38\":{\"before\":40,\"delta\":-11,\"after\":29,\"clamped\":false}}}","schema_definition":"type Adjustment { before: Int!, delta: Int!, after: Int!, clamped: Boolean! }\ntype Mutation { adjustCase38(current: Int!, delta: Int!, min: Int!, max: Int!): Adjustment! }\ntype Query { health: String! }"}} {"submissionId":"cmsrkml92001cjmp2rsizg4g8","title":"Submission IZG4G8","payload":{"sample_query":"{ author(name: \"Le Guin\") { name books { title pages } } }","resolver_code":"Query: { author: (_, {name}) => name === 'Le Guin' ? { name: 'Le Guin' } : null },\nAuthor: { books: (author) => [{ id: '1', title: 'A Wizard of Earthsea', pages: 183 }, { id: '2', title: 'The Dispossessed', pages: 341 }].filter(() => author.name === 'Le Guin') }","expected_response":"{\"data\":{\"author\":{\"name\":\"Le Guin\",\"books\":[{\"title\":\"A Wizard of Earthsea\",\"pages\":183},{\"title\":\"The Dispossessed\",\"pages\":341}]}}}","schema_definition":"type Book { id: ID!, title: String!, pages: Int! }\ntype Author { name: String!, books: [Book!]! }\ntype Query { author(name: String!): Author }"}} {"submissionId":"cmsrkml92001djmp2ryd5gnsb","title":"Submission D5GNSB","payload":{"sample_query":"{ tasks(minPriority: MEDIUM) { label priority } }","resolver_code":"Query: { tasks: (_, {minPriority}) => { const rank = { LOW: 0, MEDIUM: 1, HIGH: 2 }; const all = [{ id: 't1', label: 'Backup DB', priority: 'HIGH' }, { id: 't2', label: 'Tidy desk', priority: 'LOW' }, { id: 't3', label: 'Review PR', priority: 'MEDIUM' }]; return all.filter(t => rank[t.priority] >= rank[minPriority]); } }","expected_response":"{\"data\":{\"tasks\":[{\"label\":\"Backup DB\",\"priority\":\"HIGH\"},{\"label\":\"Review PR\",\"priority\":\"MEDIUM\"}]}}","schema_definition":"enum Priority { LOW, MEDIUM, HIGH }\ntype Task { id: ID!, label: String!, priority: Priority! }\ntype Query { tasks(minPriority: Priority!): [Task!]! }"}} {"submissionId":"cmsrkml92001ejmp2szhphy78","title":"Submission HPHY78","payload":{"sample_query":"{ withdraw(balance: 50.0, amount: 80.0) }","resolver_code":"Query: { withdraw: (_, {balance, amount}) => { if (amount <= 0) throw new Error('amount must be positive'); if (amount > balance) throw new Error('insufficient funds'); return balance - amount; } }","expected_response":"{\"errors\":[{\"message\":\"insufficient funds\"}]}","schema_definition":"type Query { withdraw(balance: Float!, amount: Float!): Float! }"}} {"submissionId":"cmsrkml92001fjmp26slwtm6k","title":"Submission LWTM6K","payload":{"sample_query":"{ stats(values: [4, 7, 9]) { count sum avg } }","resolver_code":"Query: { stats: (_, {values}) => { if (values.length === 0) throw new Error('values must not be empty'); const sum = values.reduce((a, b) => a + b, 0); return { count: values.length, sum, avg: sum / values.length }; } }","expected_response":"{\"data\":{\"stats\":{\"count\":3,\"sum\":20,\"avg\":6.666666666666667}}}","schema_definition":"type Stats { count: Int!, sum: Int!, avg: Float! }\ntype Query { stats(values: [Int!]!): Stats! }"}} {"submissionId":"cmsrkml92001gjmp2nhuqq2so","title":"Submission UQQ2SO","payload":{"sample_query":"{ cart { items { sku lineTotal } total } }","resolver_code":"Query: { cart: () => ({ items: [{ sku: 'A-100', qty: 2, unitPrice: 4.5 }, { sku: 'B-200', qty: 1, unitPrice: 12.0 }] }) },\nCart: { total: (cart) => cart.items.reduce((s, i) => s + i.qty * i.unitPrice, 0) },\nCartItem: { lineTotal: (item) => item.qty * item.unitPrice }","expected_response":"{\"data\":{\"cart\":{\"items\":[{\"sku\":\"A-100\",\"lineTotal\":9},{\"sku\":\"B-200\",\"lineTotal\":12}],\"total\":21}}}","schema_definition":"type Cart { items: [CartItem!]!, total: Float! }\ntype CartItem { sku: String!, qty: Int!, unitPrice: Float!, lineTotal: Float! }\ntype Query { cart: Cart! }"}} {"submissionId":"cmsrkml92001hjmp2wo2nec3i","title":"Submission 2NEC3I","payload":{"sample_query":"{ colors(offset: 4, limit: 2) { items hasNext } }","resolver_code":"Query: { colors: (_, {offset, limit}) => { const all = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']; const items = all.slice(offset, offset + limit); return { items, hasNext: offset + limit < all.length }; } }","expected_response":"{\"data\":{\"colors\":{\"items\":[\"blue\",\"indigo\"],\"hasNext\":true}}}","schema_definition":"type Page { items: [String!]!, hasNext: Boolean! }\ntype Query { colors(offset: Int!, limit: Int!): Page! }"}} {"submissionId":"cmsrkml92001ijmp2a7ipn4hg","title":"Submission IPN4HG","payload":{"sample_query":"{ parseVersion(tag: \"v2.10.3\") { major minor patch } }","resolver_code":"Query: { parseVersion: (_, {tag}) => { const m = tag.match(/^v(\\d+)\\.(\\d+)\\.(\\d+)$/); if (!m) throw new Error('invalid version tag'); return { major: +m[1], minor: +m[2], patch: +m[3] }; } }","expected_response":"{\"data\":{\"parseVersion\":{\"major\":2,\"minor\":10,\"patch\":3}}}","schema_definition":"type Query { parseVersion(tag: String!): Version! }\ntype Version { major: Int!, minor: Int!, patch: Int! }"}} {"submissionId":"cmsrkml93001jjmp2onfnjzy3","title":"Submission FNJZY3","payload":{"sample_query":"{ account(id: \"missing\") { email verified } }","resolver_code":"Query: { account: (_, {id}) => { const accounts = { a1: { id: 'a1', email: 'ana@example.com', verified: true } }; return accounts[id] || null; } }","expected_response":"{\"data\":{\"account\":null}}","schema_definition":"type Account { id: ID!, email: String!, verified: Boolean! }\ntype Query { account(id: ID!): Account }"}} {"submissionId":"cmsrkml93001kjmp2abvidfgz","title":"Submission VIDFGZ","payload":{"sample_query":"{ matrix { rows transposed } }","resolver_code":"Query: { matrix: () => ({ rows: [[1, 2, 3], [4, 5, 6]] }) },\nMatrix: { transposed: (m) => m.rows[0].map((_, c) => m.rows.map(r => r[c])) }","expected_response":"{\"data\":{\"matrix\":{\"rows\":[[1,2,3],[4,5,6]],\"transposed\":[[1,4],[2,5],[3,6]]}}}","schema_definition":"type Matrix { rows: [[Int!]!]!, transposed: [[Int!]!]! }\ntype Query { matrix: Matrix! }"}} {"submissionId":"cmsrkml93001ljmp2ywli4h8e","title":"Submission LI4H8E","payload":{"sample_query":"mutation { rename(current: \"db-old\", next: \"db\") }","resolver_code":"Query: { placeholder: () => true },\nMutation: { rename: (_, {current, next}) => { if (next.trim().length < 3) throw new Error('name too short'); if (next === current) throw new Error('name unchanged'); return next.trim(); } }","expected_response":"{\"errors\":[{\"message\":\"name too short\"}]}","schema_definition":"type Mutation { rename(current: String!, next: String!): String! }\ntype Query { placeholder: Boolean! }"}} {"submissionId":"cmsrkml93001mjmp2aij6ogra","title":"Submission J6OGRA","payload":{"sample_query":"{ readings(aboveC: 10.0) { city celsius fahrenheit } }","resolver_code":"Query: { readings: (_, {aboveC}) => [{ city: 'Oslo', celsius: 4.0 }, { city: 'Cairo', celsius: 31.5 }, { city: 'Lima', celsius: 18.0 }].filter(t => t.celsius > aboveC) },\nTemp: { fahrenheit: (t) => t.celsius * 9 / 5 + 32 }","expected_response":"{\"data\":{\"readings\":[{\"city\":\"Cairo\",\"celsius\":31.5,\"fahrenheit\":88.7},{\"city\":\"Lima\",\"celsius\":18,\"fahrenheit\":64.4}]}}","schema_definition":"type Temp { city: String!, celsius: Float!, fahrenheit: Float! }\ntype Query { readings(aboveC: Float!): [Temp!]! }"}} {"submissionId":"cmsrkml93001njmp253tl9gop","title":"Submission TL9GOP","payload":{"sample_query":"{ analyze(words: [\"Level\", \"stack\"]) { text reversed isPalindrome } }","resolver_code":"Query: { analyze: (_, {words}) => words.map(w => ({ text: w })) },\nWord: { reversed: (w) => w.text.split('').reverse().join(''), isPalindrome: (w) => { const s = w.text.toLowerCase(); return s === s.split('').reverse().join(''); } }","expected_response":"{\"data\":{\"analyze\":[{\"text\":\"Level\",\"reversed\":\"leveL\",\"isPalindrome\":true},{\"text\":\"stack\",\"reversed\":\"kcats\",\"isPalindrome\":false}]}}","schema_definition":"type Word { text: String!, reversed: String!, isPalindrome: Boolean! }\ntype Query { analyze(words: [String!]!): [Word!]! }"}} {"submissionId":"cmsshx87300ayjmp2wu3q5pi5","title":"Submission 3Q5PI5","payload":{"sample_query":"{ employee(id: \"1\") { name department salary address { city zip } } }","resolver_code":"Query: {\n employee: (_, { id }) => {\n const employees = [\n { id: '1', name: 'Alice Chen', department: 'Engineering', salary: 120000, address: { street: '42 Oak Ave', city: 'Seattle', zip: '98101' } },\n { id: '2', name: 'Bob Martinez', department: 'Marketing', salary: 85000, address: { street: '7 Pine St', city: 'Portland', zip: '97201' } }\n ];\n const emp = employees.find(e => e.id === id);\n if (!emp) throw new Error('Employee not found');\n return emp;\n },\n employeesByDepartment: (_, { department }) => {\n const employees = [\n { id: '1', name: 'Alice Chen', department: 'Engineering', salary: 120000, address: { street: '42 Oak Ave', city: 'Seattle', zip: '98101' } },\n { id: '2', name: 'Bob Martinez', department: 'Marketing', salary: 85000, address: { street: '7 Pine St', city: 'Portland', zip: '97201' } }\n ];\n return employees.filter(e => e.department === department);\n }\n}","expected_response":"{\"data\": {\"employee\": {\"name\": \"Alice Chen\", \"department\": \"Engineering\", \"salary\": 120000, \"address\": {\"city\": \"Seattle\", \"zip\": \"98101\"}}}}","schema_definition":"type Address { street: String!, city: String!, zip: String! }\ntype Employee { id: ID!, name: String!, department: String!, salary: Float!, address: Address! }\ntype Query { employee(id: ID!): Employee, employeesByDepartment(department: String!): [Employee!]! }"}} {"submissionId":"cmssi7ess00dujmp2qiqahf2j","title":"Submission QAHF2J","payload":{"sample_query":"mutation { createUser(email: \"not-an-email\") { id email } }","resolver_code":"Mutation: {\n createUser: (_, {email}) => {\n if (!/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(email)) {\n throw new Error(\"invalid email format: \" + email);\n }\n return { id: \"u-\" + email.split(\"@\")[0], email };\n }\n}","expected_response":"{\"errors\":[{\"message\":\"invalid email format: not-an-email\"}]}","schema_definition":"type User { id: ID!, email: String! }\ntype Query { _empty: Boolean }\ntype Mutation { createUser(email: String!): User! }"}} {"submissionId":"cmssi7ess00dzjmp2m7eeow5b","title":"Submission EEOW5B","payload":{"sample_query":"{ secret(role: \"guest\") { value } }","resolver_code":"Query: {\n secret: (_, {role}) => {\n if (role !== \"admin\") {\n throw new Error(\"forbidden: requires admin role\");\n }\n return { value: \"top-secret-data\" };\n }\n}","expected_response":"{\"errors\":[{\"message\":\"forbidden: requires admin role\"}]}","schema_definition":"type Secret { value: String! }\ntype Query { secret(role: String!): Secret! }"}} {"submissionId":"cmssi7ess00e0jmp2vm8mdad1","title":"Submission 8MDAD1","payload":{"sample_query":"{ person { fullName } }","resolver_code":"Query: {\n person: () => ({ firstName: \"Ada\", lastName: \"Lovelace\" })\n},\nPerson: {\n fullName: (p) => (p.firstName + \" \" + p.lastName).toUpperCase()\n}","expected_response":"{\"data\":{\"person\":{\"fullName\":\"ADA LOVELACE\"}}}","schema_definition":"type Person { firstName: String!, lastName: String!, fullName: String! }\ntype Query { person: Person! }"}} {"submissionId":"cmssi7ess00e5jmp20elrh1cr","title":"Submission LRH1CR","payload":{"sample_query":"{ company { name address { street city { name } } } }","resolver_code":"Query: {\n company: () => ({ name: \"Acme\", addressData: { street: \"1 Main St\", cityName: \"Springfield\" } })\n},\nCompany: {\n address: (c) => c.addressData\n},\nAddress: {\n city: (a) => ({ name: a.cityName })\n}","expected_response":"{\"data\":{\"company\":{\"name\":\"Acme\",\"address\":{\"street\":\"1 Main St\",\"city\":{\"name\":\"Springfield\"}}}}}","schema_definition":"type City { name: String! }\ntype Address { street: String!, city: City! }\ntype Company { name: String!, address: Address! }\ntype Query { company: Company! }"}} {"submissionId":"cmssi7ess00e6jmp24gex3heg","title":"Submission EX3HEG","payload":{"sample_query":"{ invoice { formattedAmount } }","resolver_code":"Query: {\n invoice: () => ({ amountCents: 154999 })\n},\nInvoice: {\n formattedAmount: (inv) => \"$\" + (inv.amountCents / 100).toFixed(2)\n}","expected_response":"{\"data\":{\"invoice\":{\"formattedAmount\":\"$1549.99\"}}}","schema_definition":"type Invoice { amountCents: Int!, formattedAmount: String! }\ntype Query { invoice: Invoice! }"}} {"submissionId":"cmssi7ess00e9jmp246vvaksv","title":"Submission VVAKSV","payload":{"sample_query":"{ convertTemp(value: 100, to: FAHRENHEIT) }","resolver_code":"Query: {\n convertTemp: (_, {value, to}) => {\n if (to === \"FAHRENHEIT\") return parseFloat((value * 9/5 + 32).toFixed(2));\n return parseFloat(((value - 32) * 5/9).toFixed(2));\n }\n}","expected_response":"{\"data\":{\"convertTemp\":212}}","schema_definition":"enum Unit { CELSIUS, FAHRENHEIT }\ntype Query { convertTemp(value: Float!, to: Unit!): Float! }"}} {"submissionId":"cmssi7ess00ecjmp2trehgetv","title":"Submission EHGETV","payload":{"sample_query":"{ receipt { subtotal total(taxRate: 0.08) } }","resolver_code":"Query: {\n receipt: () => ({ items: [{name:\"Coffee\",price:4.5,qty:2},{name:\"Bagel\",price:3.0,qty:1}] })\n},\nReceipt: {\n subtotal: (r) => parseFloat(r.items.reduce((s,i)=>s+i.price*i.qty,0).toFixed(2)),\n total: (r, {taxRate}) => parseFloat((r.items.reduce((s,i)=>s+i.price*i.qty,0) * (1+taxRate)).toFixed(2))\n}","expected_response":"{\"data\":{\"receipt\":{\"subtotal\":12,\"total\":12.96}}}","schema_definition":"type LineItem { name: String!, price: Float!, qty: Int! }\ntype Receipt { items: [LineItem!]!, subtotal: Float!, total(taxRate: Float!): Float! }\ntype Query { receipt: Receipt! }"}} {"submissionId":"cmssictqj00fljmp2di246ukw","title":"Submission 246UKW","payload":{"sample_query":"{ user(id: \"2\") { name email } }","resolver_code":"Query: {\n user: (_, { id }) => {\n const found = db.users.find(u => u.id === id);\n if (!found) throw new Error('user not found');\n return found;\n },\n users: () => db.users\n }","expected_response":"{\"data\":{\"user\":{\"name\":\"Bo\",\"email\":\"bo@x.com\"}}}","schema_definition":"type User { id: ID!, name: String!, email: String! }\ntype Query { user(id: ID!): User, users: [User!]! }"}} {"submissionId":"cmssictqj00fmjmp2er5arick","title":"Submission 5ARICK","payload":{"sample_query":"{ divide(a: 7, b: 0) }","resolver_code":"Query: { divide: (_, { a, b }) => { if (b === 0) throw new Error('division by zero'); return a / b; } }","expected_response":"{\"errors\":[{\"message\":\"division by zero\"}]}","schema_definition":"type Query { divide(a: Int!, b: Int!): Float! }"}} {"submissionId":"cmssictqj00fnjmp2psz2mbcx","title":"Submission Z2MBCX","payload":{"sample_query":"{ products(inStockOnly: true) { name price } }","resolver_code":"Query: {\n products: (_, { inStockOnly }) => {\n let list = db.products;\n if (inStockOnly) list = list.filter(p => p.inStock);\n return list;\n }\n }","expected_response":"{\"data\":{\"products\":[{\"name\":\"Widget\",\"price\":9.99},{\"name\":\"Gizmo\",\"price\":14.5}]}}","schema_definition":"type Product { id: ID!, name: String!, price: Float!, inStock: Boolean! }\ntype Query { products(inStockOnly: Boolean): [Product!]! }"}} {"submissionId":"cmssictqj00fojmp22241vf0n","title":"Submission 41VF0N","payload":{"sample_query":"{ account(id: \"9\") { id role } }","resolver_code":"Query: { account: (_, { id }) => db.accounts.find(a => a.id === id) || null }","expected_response":"{\"data\":{\"account\":null}}","schema_definition":"enum Role { ADMIN, MEMBER, GUEST }\ntype Account { id: ID!, role: Role! }\ntype Query { account(id: ID!): Account }"}} {"submissionId":"cmssictqj00fpjmp2ng3pc4vo","title":"Submission 3PC4VO","payload":{"sample_query":"{ post(id: \"1\") { title comments { author text } } }","resolver_code":"Query: {\n post: (_, { id }) => db.posts.find(p => p.id === id)\n },\n Post: {\n comments: (post) => db.comments.filter(c => c.postId === post.id)\n }","expected_response":"{\"data\":{\"post\":{\"title\":\"Hello\",\"comments\":[{\"author\":\"Ann\",\"text\":\"Nice!\"},{\"author\":\"Bo\",\"text\":\"Cool.\"}]}}}","schema_definition":"type Comment { id: ID!, text: String!, author: String! }\ntype Post { id: ID!, title: String!, comments: [Comment!]! }\ntype Query { post(id: ID!): Post }"}} {"submissionId":"cmssictqj00fqjmp2g5j9u1sz","title":"Submission J9U1SZ","payload":{"sample_query":"mutation { createTask(input: { title: \"Ship it\" }) { id title priority } }","resolver_code":"Mutation: {\n createTask: (_, { input }) => {\n const task = { id: String(db.tasks.length + 1), title: input.title, priority: input.priority ?? 3 };\n db.tasks.push(task);\n return task;\n }\n }","expected_response":"{\"data\":{\"createTask\":{\"id\":\"1\",\"title\":\"Ship it\",\"priority\":3}}}","schema_definition":"input NewTaskInput { title: String!, priority: Int }\ntype Task { id: ID!, title: String!, priority: Int! }\ntype Mutation { createTask(input: NewTaskInput!): Task! }\ntype Query { _empty: String }"}} {"submissionId":"cmssictqj00frjmp29qe5azha","title":"Submission E5AZHA","payload":{"sample_query":"{ safeSqrt(n: 16) }","resolver_code":"Query: { safeSqrt: (_, { n }) => { if (n < 0) throw new Error('cannot take sqrt of negative number'); return Math.sqrt(n); } }","expected_response":"{\"data\":{\"safeSqrt\":4}}","schema_definition":"type Query { safeSqrt(n: Float!): Float! }"}} {"submissionId":"cmssictqj00fsjmp2eosimeid","title":"Submission SIMEID","payload":{"sample_query":"{ teams { name memberCount } }","resolver_code":"Query: {\n teams: () => db.teams.map(t => ({ ...t, memberCount: db.members.filter(m => m.teamId === t.id).length }))\n }","expected_response":"{\"data\":{\"teams\":[{\"name\":\"Core\",\"memberCount\":2},{\"name\":\"Ops\",\"memberCount\":1}]}}","schema_definition":"type Team { id: ID!, name: String!, memberCount: Int! }\ntype Query { teams: [Team!]! }"}} {"submissionId":"cmssictqj00ftjmp2l4piafbt","title":"Submission PIAFBT","payload":{"sample_query":"{ paginate(offset: 2, limit: 3) }","resolver_code":"Query: {\n paginate: (_, { offset, limit }) => {\n if (offset < 0 || limit < 0) throw new Error('offset and limit must be non-negative');\n return db.numbers.slice(offset, offset + limit);\n }\n }","expected_response":"{\"data\":{\"paginate\":[30,40,50]}}","schema_definition":"type Query { paginate(offset: Int!, limit: Int!): [Int!]! }"}} {"submissionId":"cmssictqj00fujmp2tq9l9udx","title":"Submission 9L9UDX","payload":{"sample_query":"{ ordersAbove(minTotal: 50) { id total } }","resolver_code":"Query: {\n ordersAbove: (_, { minTotal }) => db.orders.filter(o => o.total > minTotal).sort((a, b) => b.total - a.total)\n }","expected_response":"{\"data\":{\"ordersAbove\":[{\"id\":\"o3\",\"total\":120},{\"id\":\"o2\",\"total\":75},{\"id\":\"o4\",\"total\":60}]}}","schema_definition":"type Order { id: ID!, total: Float!, status: String! }\ntype Query { ordersAbove(minTotal: Float!): [Order!]! }"}} {"submissionId":"cmssictqj00fvjmp2wfo9or1c","title":"Submission O9OR1C","payload":{"sample_query":"{ requireAuth(token: \"wrong\") }","resolver_code":"Query: {\n requireAuth: (_, { token }) => {\n if (token !== db.validToken) throw new Error('invalid token');\n return 'welcome';\n }\n }","expected_response":"{\"errors\":[{\"message\":\"invalid token\"}]}","schema_definition":"type Query { requireAuth(token: String!): String! }"}} {"submissionId":"cmssictqj00fwjmp21b2molz8","title":"Submission 2MOLZ8","payload":{"sample_query":"{ booksByAuthor(name: \"george orwell\") { title } }","resolver_code":"Query: {\n booksByAuthor: (_, { name }) => db.books.filter(b => b.authorName.toLowerCase() === name.toLowerCase())\n }","expected_response":"{\"data\":{\"booksByAuthor\":[{\"title\":\"1984\"},{\"title\":\"Animal Farm\"}]}}","schema_definition":"type Book { id: ID!, title: String!, authorName: String! }\ntype Query { booksByAuthor(name: String!): [Book!]! }"}} {"submissionId":"cmssictqj00fxjmp2b7oq8ug4","title":"Submission OQ8UG4","payload":{"sample_query":"{ fibonacci(n: 10) }","resolver_code":"Query: {\n fibonacci: (_, { n }) => {\n if (n < 0) throw new Error('n must be non-negative');\n let a = 0, b = 1;\n for (let i = 0; i < n; i++) { [a, b] = [b, a + b]; }\n return a;\n }\n }","expected_response":"{\"data\":{\"fibonacci\":55}}","schema_definition":"type Query { fibonacci(n: Int!): Int! }"}} {"submissionId":"cmssictqj00fyjmp25nvsd22g","title":"Submission VSD22G","payload":{"sample_query":"{ directReports(managerId: \"1\") { name } }","resolver_code":"Query: {\n directReports: (_, { managerId }) => db.employees.filter(e => e.managerId === managerId)\n }","expected_response":"{\"data\":{\"directReports\":[{\"name\":\"Alice\"},{\"name\":\"Ben\"}]}}","schema_definition":"type Employee { id: ID!, name: String!, managerId: ID }\ntype Query { directReports(managerId: ID!): [Employee!]! }"}} {"submissionId":"cmssictqj00fzjmp26wjzg44t","title":"Submission JZG44T","payload":{"sample_query":"{ wordCount(text: \" the quick brown fox \") }","resolver_code":"Query: {\n wordCount: (_, { text }) => text.trim().length === 0 ? 0 : text.trim().split(/\\s+/).length\n }","expected_response":"{\"data\":{\"wordCount\":4}}","schema_definition":"type Query { wordCount(text: String!): Int! }"}} {"submissionId":"cmssictqj00g0jmp2lhk4oj47","title":"Submission K4OJ47","payload":{"sample_query":"{ session(id: \"s1\") { expired } }","resolver_code":"Query: {\n session: (_, { id }) => {\n const s = db.sessions.find(x => x.id === id);\n if (!s) throw new Error('session not found');\n return { id: s.id, expired: Date_now_fixed > s.expiresAt };\n }\n }","expected_response":"{\"data\":{\"session\":{\"expired\":true}}}","schema_definition":"type Session { id: ID!, expired: Boolean! }\ntype Query { session(id: ID!): Session! }"}} {"submissionId":"cmssictqj00g1jmp2n913ufw7","title":"Submission 13UFW7","payload":{"sample_query":"{ clampedSum(values: [10, 20, 30], max: 45) }","resolver_code":"Query: {\n clampedSum: (_, { values, max }) => Math.min(values.reduce((a, b) => a + b, 0), max)\n }","expected_response":"{\"data\":{\"clampedSum\":45}}","schema_definition":"type Query { clampedSum(values: [Int!]!, max: Int!): Int! }"}} {"submissionId":"cmssictqj00g2jmp2a7f6dqut","title":"Submission F6DQUT","payload":{"sample_query":"{ tally(votes: [\"red\", \"blue\", \"red\", \"green\", \"blue\", \"red\"]) { option count } }","resolver_code":"Query: {\n tally: (_, { votes }) => {\n const counts = {};\n for (const v of votes) counts[v] = (counts[v] || 0) + 1;\n return Object.entries(counts).map(([option, count]) => ({ option, count })).sort((a, b) => b.count - a.count || a.option.localeCompare(b.option));\n }\n }","expected_response":"{\"data\":{\"tally\":[{\"option\":\"red\",\"count\":3},{\"option\":\"blue\",\"count\":2},{\"option\":\"green\",\"count\":1}]}}","schema_definition":"type Vote { option: String!, count: Int! }\ntype Query { tally(votes: [String!]!): [Vote!]! }"}} {"submissionId":"cmssictqj00g3jmp2fff8pnq1","title":"Submission F8PNQ1","payload":{"sample_query":"{ validateEmail(email: \"not-an-email\") }","resolver_code":"Query: {\n validateEmail: (_, { email }) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)\n }","expected_response":"{\"data\":{\"validateEmail\":false}}","schema_definition":"type Query { validateEmail(email: String!): Boolean! }"}} {"submissionId":"cmssictqj00g4jmp2zkvnenbw","title":"Submission VNENBW","payload":{"sample_query":"mutation { reserve(sku: \"A1\", amount: 3) { sku quantity } }","resolver_code":"Mutation: {\n reserve: (_, { sku, amount }) => {\n const item = db.inventory.find(i => i.sku === sku);\n if (!item) throw new Error('sku not found');\n if (item.quantity < amount) throw new Error('insufficient stock');\n item.quantity -= amount;\n return item;\n }\n }","expected_response":"{\"data\":{\"reserve\":{\"sku\":\"A1\",\"quantity\":7}}}","schema_definition":"type Inventory { sku: String!, quantity: Int! }\ntype Mutation { reserve(sku: String!, amount: Int!): Inventory! }\ntype Query { _empty: String }"}} {"submissionId":"cmssikg6v00ifjmp2w84s90sy","title":"Submission 4S90SY","payload":{"sample_query":"{ books(filter: { minYear: 1980 }) { title year } }","resolver_code":"\nQuery: {\n books: (_, { filter }) => {\n const all = [\n { title: 'Dune', year: 1965, author: 'Herbert' },\n { title: 'Neuromancer', year: 1984, author: 'Gibson' },\n { title: 'Snow Crash', year: 1992, author: 'Stephenson' },\n ];\n return all.filter(b => {\n if (!filter) return true;\n if (filter.minYear != null && b.year < filter.minYear) return false;\n if (filter.author != null && b.author !== filter.author) return false;\n return true;\n });\n }\n}\n","expected_response":"{\"data\":{\"books\":[{\"title\":\"Neuromancer\",\"year\":1984},{\"title\":\"Snow Crash\",\"year\":1992}]}}","schema_definition":"\ninput BookFilter { minYear: Int, author: String }\ntype Book { title: String!, year: Int!, author: String! }\ntype Query { books(filter: BookFilter): [Book!]! }\n"}} {"submissionId":"cmssikg6v00igjmp2hstb3u9u","title":"Submission TB3U9U","payload":{"sample_query":"{ greet }","resolver_code":"\nQuery: {\n greet: (_, { name, excited }) => excited ? `Hello, ${name}!!!` : `Hello, ${name}.`\n}\n","expected_response":"{\"data\":{\"greet\":\"Hello, World.\"}}","schema_definition":"\ntype Query { greet(name: String = \"World\", excited: Boolean = false): String! }\n"}} {"submissionId":"cmssikg6v00ihjmp2m0r14lh1","title":"Submission R14LH1","payload":{"sample_query":"{ survey { question tags } }","resolver_code":"\nQuery: { survey: () => ({ question: 'Favorite color?', tags: ['ui', 'color', 'design'] }) }\n","expected_response":"{\"data\":{\"survey\":{\"question\":\"Favorite color?\",\"tags\":[\"ui\",\"color\",\"design\"]}}}","schema_definition":"\ntype Survey { question: String!, tags: [String!]! }\ntype Query { survey: Survey! }\n"}} {"submissionId":"cmssikg6v00iijmp2o9yyw91c","title":"Submission YYW91C","payload":{"sample_query":"{ nicknames requiredTags }","resolver_code":"\nQuery: {\n nicknames: () => ['Ace', null, 'Bo'],\n requiredTags: () => ['alpha', 'beta']\n}\n","expected_response":"{\"data\":{\"nicknames\":[\"Ace\",null,\"Bo\"],\"requiredTags\":[\"alpha\",\"beta\"]}}","schema_definition":"\ntype Query { nicknames: [String]!, requiredTags: [String!]! }\n"}} {"submissionId":"cmssikg6v00ijjmp2aiakm83q","title":"Submission AKM83Q","payload":{"sample_query":"{ mainHero: hero { heroName: name strength: power } }","resolver_code":"\nQuery: { hero: () => ({ id: '1', name: 'Zorak', power: 88 }) }\n","expected_response":"{\"data\":{\"mainHero\":{\"heroName\":\"Zorak\",\"strength\":88}}}","schema_definition":"\ntype Character { id: ID!, name: String!, power: Int! }\ntype Query { hero: Character! }\n"}} {"submissionId":"cmssikg6v00ikjmp2uohsvzyo","title":"Submission HSVZYO","payload":{"sample_query":"{ item(id: 42) { id label } }","resolver_code":"\nQuery: {\n item: (_, { id }) => {\n const items = { '42': { id: 42, label: 'The Answer' } };\n return items[id] || null;\n }\n}\n","expected_response":"{\"data\":{\"item\":{\"id\":\"42\",\"label\":\"The Answer\"}}}","schema_definition":"\ntype Item { id: ID!, label: String! }\ntype Query { item(id: ID!): Item }\n"}} {"submissionId":"cmssikg6v00iljmp2jx11xbcu","title":"Submission 11XBCU","payload":{"sample_query":"mutation { updateProfile(userId: \"7\", input: { bio: \"Engineer\", address: { city: \"Austin\", zip: \"78701\" } }) { success user { name profile { bio address { city zip } } } } }","resolver_code":"\nMutation: {\n updateProfile: (_, { userId, input }) => ({\n success: true,\n user: {\n id: userId,\n name: 'Nina',\n profile: { bio: input.bio, address: { city: input.address.city, zip: input.address.zip } }\n }\n })\n},\nQuery: { ping: () => 'pong' }\n","expected_response":"{\"data\":{\"updateProfile\":{\"success\":true,\"user\":{\"name\":\"Nina\",\"profile\":{\"bio\":\"Engineer\",\"address\":{\"city\":\"Austin\",\"zip\":\"78701\"}}}}}}","schema_definition":"\ntype Address { city: String!, zip: String! }\ntype Profile { bio: String!, address: Address! }\ntype User { id: ID!, name: String!, profile: Profile! }\ntype UpdateProfilePayload { success: Boolean!, user: User! }\ninput AddressInput { city: String!, zip: String! }\ninput ProfileInput { bio: String!, address: AddressInput! }\ntype Mutation { updateProfile(userId: ID!, input: ProfileInput!): UpdateProfilePayload! }\ntype Query { ping: String! }\n"}} {"submissionId":"cmssikg6v00injmp2iiceqf8f","title":"Submission CEQF8F","payload":{"sample_query":"{ fibonacci(n: 50) }","resolver_code":"\nQuery: {\n fibonacci: (_, { n }) => {\n if (n < 0 || n > 30) throw new Error('n must be between 0 and 30');\n let a = 0, b = 1;\n for (let i = 0; i < n; i++) { [a, b] = [b, a + b]; }\n return a;\n }\n}\n","expected_response":"{\"errors\":[{\"message\":\"n must be between 0 and 30\",\"locations\":[{\"line\":1,\"column\":3}],\"path\":[\"fibonacci\"]}],\"data\":null}","schema_definition":"\ntype Query { fibonacci(n: Int!): Int! }\n"}} {"submissionId":"cmssikg6v00iojmp2w6uluppo","title":"Submission ULUPPO","payload":{"sample_query":"{ comment(id: \"1\") { text replies { text replies { text } } } }","resolver_code":"\nQuery: {\n comment: (_, { id }) => {\n const db = {\n '1': { id: '1', text: 'Top level', replyIds: ['2', '3'] },\n '2': { id: '2', text: 'Reply A', replyIds: ['4'] },\n '3': { id: '3', text: 'Reply B', replyIds: [] },\n '4': { id: '4', text: 'Nested reply', replyIds: [] },\n };\n function resolve(node) {\n return { id: node.id, text: node.text, replies: node.replyIds.map(rid => resolve(db[rid])) };\n }\n return db[id] ? resolve(db[id]) : null;\n }\n}\n","expected_response":"{\"data\":{\"comment\":{\"text\":\"Top level\",\"replies\":[{\"text\":\"Reply A\",\"replies\":[{\"text\":\"Nested reply\"}]},{\"text\":\"Reply B\",\"replies\":[]}]}}}","schema_definition":"\ntype Comment { id: ID!, text: String!, replies: [Comment!]! }\ntype Query { comment(id: ID!): Comment }\n"}} {"submissionId":"cmssikg6v00ipjmp2vpwyxk4q","title":"Submission WYXK4Q","payload":{"sample_query":"{ product { name oldPrice price } }","resolver_code":"\nQuery: { product: () => ({ id: '9', name: 'Legacy Widget', oldPrice: 5.0, price: 7.5 }) }\n","expected_response":"{\"data\":{\"product\":{\"name\":\"Legacy Widget\",\"oldPrice\":5,\"price\":7.5}}}","schema_definition":"\ntype Product { id: ID!, name: String!, oldPrice: Float! @deprecated(reason: \"Use price instead\"), price: Float! }\ntype Query { product: Product! }\n"}} {"submissionId":"cmssikg6v00iqjmp2wk3tuh8e","title":"Submission 3TUH8E","payload":{"sample_query":"{ serverTime version uptime }","resolver_code":"\nQuery: {\n serverTime: () => '2026-08-14T00:00:00Z',\n version: () => '3.2.1',\n uptime: () => 123456\n}\n","expected_response":"{\"data\":{\"serverTime\":\"2026-08-14T00:00:00Z\",\"version\":\"3.2.1\",\"uptime\":123456}}","schema_definition":"\ntype Query { serverTime: String!, version: String!, uptime: Int! }\n"}} {"submissionId":"cmssikg6v00irjmp2ns622nfj","title":"Submission 622NFJ","payload":{"sample_query":"{ opposite(dir: EAST) }","resolver_code":"\nQuery: {\n opposite: (_, { dir }) => {\n const map = { NORTH: 'SOUTH', SOUTH: 'NORTH', EAST: 'WEST', WEST: 'EAST' };\n return map[dir];\n }\n}\n","expected_response":"{\"data\":{\"opposite\":\"WEST\"}}","schema_definition":"\nenum Direction { NORTH SOUTH EAST WEST }\ntype Query { opposite(dir: Direction!): Direction! }\n"}} {"submissionId":"cmssikg6v00isjmp2dli7wit3","title":"Submission I7WIT3","payload":{"sample_query":"{ formatNumber(value: 1234.5, asCurrency: true) }","resolver_code":"\nQuery: {\n formatNumber: (_, { value, asCurrency }) => asCurrency ? `$${value.toFixed(2)}` : value.toFixed(2)\n}\n","expected_response":"{\"data\":{\"formatNumber\":\"$1234.50\"}}","schema_definition":"\ntype Query { formatNumber(value: Float!, asCurrency: Boolean!): String! }\n"}} {"submissionId":"cmssikg6v00itjmp204yan7bb","title":"Submission YAN7BB","payload":{"sample_query":"mutation { revokeSession(id: \"unknown\") { id active } }","resolver_code":"\nQuery: { ping: () => 'pong' },\nMutation: {\n revokeSession: (_, { id }) => {\n const sessions = { 's1': { id: 's1', active: true } };\n const s = sessions[id];\n if (!s) return null;\n s.active = false;\n return null;\n }\n}\n","expected_response":"{\"data\":{\"revokeSession\":null}}","schema_definition":"\ntype Session { id: ID!, active: Boolean! }\ntype Query { ping: String! }\ntype Mutation { revokeSession(id: ID!): Session }\n"}} {"submissionId":"cmssikg6v00iujmp2dtzrnvf2","title":"Submission ZRNVF2","payload":{"sample_query":"{ recentLogs }","resolver_code":"\nQuery: {\n recentLogs: (_, { limit }) => {\n const logs = ['log-a', 'log-b', 'log-c', 'log-d', 'log-e'];\n return logs.slice(0, limit);\n }\n}\n","expected_response":"{\"data\":{\"recentLogs\":[\"log-a\",\"log-b\",\"log-c\"]}}","schema_definition":"\ntype Query { recentLogs(limit: Int = 3): [String!]!\n}\n"}} {"submissionId":"cmssikg6v00ivjmp2gdp5ryio","title":"Submission P5RYIO","payload":{"sample_query":"{ currencySymbol(code: \"JPY\") }","resolver_code":"\nQuery: {\n currencySymbol: (_, { code }) => {\n const symbols = { USD: '$', EUR: '€', GBP: '£' };\n return symbols[code] || '?';\n }\n}\n","expected_response":"{\"data\":{\"currencySymbol\":\"?\"}}","schema_definition":"\ntype Query { currencySymbol(code: String!): String!\n}\n"}} {"submissionId":"cmssikg6v00iwjmp2acshdrwy","title":"Submission SHDRWY","payload":{"sample_query":"{ leaderboard(sortBy: NAME) { name score } }","resolver_code":"\nQuery: {\n leaderboard: (_, { sortBy }) => {\n const players = [\n { name: 'Charlie', score: 42 },\n { name: 'Alice', score: 91 },\n { name: 'Bob', score: 67 },\n ];\n const copy = [...players];\n if (sortBy === 'NAME') copy.sort((a, b) => a.name.localeCompare(b.name));\n else copy.sort((a, b) => b.score - a.score);\n return copy;\n }\n}\n","expected_response":"{\"data\":{\"leaderboard\":[{\"name\":\"Alice\",\"score\":91},{\"name\":\"Bob\",\"score\":67},{\"name\":\"Charlie\",\"score\":42}]}}","schema_definition":"\nenum SortField { NAME SCORE }\ntype Player { name: String!, score: Int! }\ntype Query { leaderboard(sortBy: SortField = SCORE): [Player!]! }\n"}} {"submissionId":"cmssikg6v00ixjmp2dsddwd48","title":"Submission DDWD48","payload":{"sample_query":"\nquery {\n author(id: \"1\") { ...AuthorFields }\n}\nfragment AuthorFields on Author { name country }\n","resolver_code":"\nQuery: {\n author: (_, { id }) => ({ id, name: 'Leila Aboulela', country: 'Sudan' })\n}\n","expected_response":"{\"data\":{\"author\":{\"name\":\"Leila Aboulela\",\"country\":\"Sudan\"}}}","schema_definition":"\ntype Author { id: ID!, name: String!, country: String! }\ntype Query { author(id: ID!): Author }\n"}} {"submissionId":"cmssikg6v00iyjmp2ffh5od7a","title":"Submission H5OD7A","payload":{"sample_query":"{ team(id: \"t1\") { name members(activeOnly: true) { name active } } }","resolver_code":"\nQuery: {\n team: (_, { id }) => ({ id, name: 'Rocketry Club', memberList: [\n { name: 'Sam', active: true },\n { name: 'Priya', active: false },\n { name: 'Jo', active: true },\n ] })\n},\nTeam: {\n members: (parent, { activeOnly }) => activeOnly ? parent.memberList.filter(m => m.active) : parent.memberList\n}\n","expected_response":"{\"data\":{\"team\":{\"name\":\"Rocketry Club\",\"members\":[{\"name\":\"Sam\",\"active\":true},{\"name\":\"Jo\",\"active\":true}]}}}","schema_definition":"\ntype Team { id: ID!, name: String!, members(activeOnly: Boolean = false): [Member!]! }\ntype Member { name: String!, active: Boolean! }\ntype Query { team(id: ID!): Team }\n"}} {"submissionId":"cmssil22i00jojmp23ekxe0qw","title":"Submission KXE0QW","payload":{"sample_query":"{ posts(first: 2, after: \"1\") { edges { cursor node { id title } } pageInfo { hasNextPage endCursor } } }","resolver_code":"Query: {\n posts: (_, { first, after }) => {\n const allPosts = [\n { id: '1', title: 'Alpha' },\n { id: '2', title: 'Beta' },\n { id: '3', title: 'Gamma' },\n { id: '4', title: 'Delta' }\n ];\n let startIndex = 0;\n if (after) {\n const idx = allPosts.findIndex(p => p.id === after);\n startIndex = idx + 1;\n }\n const slice = allPosts.slice(startIndex, startIndex + first);\n const edges = slice.map(p => ({ cursor: p.id, node: p }));\n const hasNextPage = startIndex + first < allPosts.length;\n const endCursor = edges.length ? edges[edges.length - 1].cursor : null;\n return { edges, pageInfo: { hasNextPage, endCursor } };\n }\n}","expected_response":"{\"data\": {\"posts\": {\"edges\": [{\"cursor\": \"2\", \"node\": {\"id\": \"2\", \"title\": \"Beta\"}}, {\"cursor\": \"3\", \"node\": {\"id\": \"3\", \"title\": \"Gamma\"}}], \"pageInfo\": {\"hasNextPage\": true, \"endCursor\": \"3\"}}}}","schema_definition":"type Post { id: ID!, title: String! }\ntype PostEdge { cursor: String!, node: Post! }\ntype PageInfo { hasNextPage: Boolean!, endCursor: String }\ntype PostConnection { edges: [PostEdge!]!, pageInfo: PageInfo! }\ntype Query { posts(first: Int!, after: String): PostConnection! }"}} {"submissionId":"cmssil22i00jpjmp21b6k7bwj","title":"Submission 6K7BWJ","payload":{"sample_query":"mutation { createUser(input: { email: \"not-an-email\", age: 25 }) { id email } }","resolver_code":"Mutation: {\n createUser: (_, { input }) => {\n if (!input.email.includes('@')) {\n throw new Error('Invalid email address');\n }\n if (input.age < 18) {\n throw new Error('User must be at least 18 years old');\n }\n return { id: 'u1', email: input.email };\n }\n}","expected_response":"{\"errors\": [{\"message\": \"Invalid email address\"}]}","schema_definition":"type User { id: ID!, email: String! }\ninput CreateUserInput { email: String!, age: Int! }\ntype Mutation { createUser(input: CreateUserInput!): User! }\ntype Query { _empty: String }"}} {"submissionId":"cmssil22i00jrjmp2tb2bjf05","title":"Submission 2BJF05","payload":{"sample_query":"{ user(id: \"u1\") { name profile { bio } } }","resolver_code":"Query: {\n user: (_, { id }) => {\n if (id === 'u1') return { id: 'u1', name: 'Nora Kade' };\n return null;\n }\n},\nUser: {\n profile: (user) => {\n return { id: 'p1', bio: null };\n }\n}","expected_response":"{\"data\": {\"user\": {\"name\": \"Nora Kade\", \"profile\": null}}, \"errors\": [{\"message\": \"Cannot return null for non-nullable field Profile.bio.\"}]}","schema_definition":"type Profile { id: ID!, bio: String! }\ntype User { id: ID!, name: String!, profile: Profile }\ntype Query { user(id: ID!): User }"}} {"submissionId":"cmssil22i00jsjmp2jtr1x1wj","title":"Submission R1X1WJ","payload":{"sample_query":"{ products(minPrice: 5, sort: DESC) { name price } }","resolver_code":"Query: {\n products: (_, { minPrice, sort }) => {\n const all = [\n { id: 'p1', name: 'Widget', price: 9.99 },\n { id: 'p2', name: 'Gadget', price: 19.99 },\n { id: 'p3', name: 'Gizmo', price: 4.99 }\n ];\n let filtered = minPrice != null ? all.filter(p => p.price >= minPrice) : all;\n if (sort === 'ASC') filtered = [...filtered].sort((a,b) => a.price - b.price);\n if (sort === 'DESC') filtered = [...filtered].sort((a,b) => b.price - a.price);\n return filtered;\n }\n}","expected_response":"{\"data\": {\"products\": [{\"name\": \"Gadget\", \"price\": 19.99}, {\"name\": \"Widget\", \"price\": 9.99}]}}","schema_definition":"enum SortOrder { ASC DESC }\ntype Product { id: ID!, name: String!, price: Float! }\ntype Query { products(minPrice: Float, sort: SortOrder): [Product!]! }"}} {"submissionId":"cmssis9yf00o0jmp286xn2a7g","title":"Submission XN2A7G","payload":{"sample_query":"{ rect(width: 3, height: 4) { width height area } }","resolver_code":"Query: { rect: (_, {width, height}) => ({width, height, area: width * height}) }","expected_response":"{\"data\": {\"rect\": {\"width\": 3, \"height\": 4, \"area\": 12}}}","schema_definition":"type Rectangle { width: Float!, height: Float!, area: Float! }\ntype Query { rect(width: Float!, height: Float!): Rectangle! }"}} {"submissionId":"cmssis9yf00o1jmp2isrn24a4","title":"Submission RN24A4","payload":{"sample_query":"{ greet }","resolver_code":"Query: { greet: (_, {name}) => `Hello, ${name || 'World'}!` }","expected_response":"{\"data\": {\"greet\": \"Hello, World!\"}}","schema_definition":"type Query { greet(name: String): String! }"}} {"submissionId":"cmssis9yf00o2jmp2hdowdevf","title":"Submission OWDEVF","payload":{"sample_query":"{ evens(limit: 5) }","resolver_code":"Query: { evens: (_, {limit}) => Array.from({length: limit}, (_, i) => (i + 1) * 2) }","expected_response":"{\"data\": {\"evens\": [2, 4, 6, 8, 10]}}","schema_definition":"type Query { evens(limit: Int!): [Int!]! }"}} {"submissionId":"cmssis9yf00o3jmp292aerpft","title":"Submission AERPFT","payload":{"sample_query":"{ sqrt(n: -4) }","resolver_code":"Query: { sqrt: (_, {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 Query { sqrt(n: Float!): Float! }"}} {"submissionId":"cmssis9yf00o4jmp2nx9f81qm","title":"Submission 9F81QM","payload":{"sample_query":"{ fibonacci(n: 7) }","resolver_code":"Query: { fibonacci: (_, {n}) => { const seq = [0, 1]; for (let i = 2; i < n; i++) seq.push(seq[i-1] + seq[i-2]); return seq.slice(0, n); } }","expected_response":"{\"data\": {\"fibonacci\": [0, 1, 1, 2, 3, 5, 8]}}","schema_definition":"type Query { fibonacci(n: Int!): [Int!]! }"}} {"submissionId":"cmssjizcq00s0jmp29s8shlmy","title":"Submission 8SHLMY","payload":{"sample_query":"{ tasks(onlyDone: true) { title } }","resolver_code":"Query: {\n tasks: (_, {onlyDone}) => {\n const db = [\n { id: \"1\", title: \"Write report\", done: true },\n { id: \"2\", title: \"Review PR\", done: false },\n { id: \"3\", title: \"Deploy\", done: true },\n ];\n return onlyDone ? db.filter(t => t.done) : db;\n },\n}","expected_response":"{\"data\": {\"tasks\": [{\"title\": \"Write report\"}, {\"title\": \"Deploy\"}]}}","schema_definition":"type Task { id: ID!, title: String!, done: Boolean! }\ntype Query { tasks(onlyDone: Boolean): [Task!]! }"}} {"submissionId":"cmssjizcq00s1jmp218k6y135","title":"Submission K6Y135","payload":{"sample_query":"{ squareRoot(n: -9) }","resolver_code":"Query: {\n squareRoot: (_, {n}) => {\n if (n < 0) throw new Error('cannot take square root of a negative number');\n return Math.sqrt(n);\n },\n}","expected_response":"{\"errors\": [{\"message\": \"cannot take square root of a negative number\"}]}","schema_definition":"type Query { squareRoot(n: Int!): Float! }"}} {"submissionId":"cmssjizcr00s2jmp2u6b6ugmq","title":"Submission B6UGMQ","payload":{"sample_query":"{ order(id: \"o1\") { quantity unitPrice total } }","resolver_code":"Query: {\n order: (_, {id}) => {\n const db = [{ id: \"o1\", quantity: 3, unitPrice: 12.5 }];\n return db.find(o => o.id === id);\n },\n},\nOrder: {\n total: (order) => order.quantity * order.unitPrice,\n}","expected_response":"{\"data\": {\"order\": {\"quantity\": 3, \"unitPrice\": 12.5, \"total\": 37.5}}}","schema_definition":"type Order { id: ID!, quantity: Int!, unitPrice: Float!, total: Float! }\ntype Query { order(id: ID!): Order }"}} {"submissionId":"cmssjizcr00s3jmp2hkh5ecwi","title":"Submission H5ECWI","payload":{"sample_query":"{ leaderboard(dir: DESC) { name score } }","resolver_code":"Query: {\n leaderboard: (_, {dir}) => {\n const players = [\n { name: \"Ann\", score: 42 },\n { name: \"Bo\", score: 91 },\n { name: \"Cy\", score: 17 },\n ];\n const sorted = [...players].sort((a, b) => a.score - b.score);\n return dir === \"DESC\" ? sorted.reverse() : sorted;\n },\n}","expected_response":"{\"data\": {\"leaderboard\": [{\"name\": \"Bo\", \"score\": 91}, {\"name\": \"Ann\", \"score\": 42}, {\"name\": \"Cy\", \"score\": 17}]}}","schema_definition":"enum SortDir { ASC DESC }\ntype Player { name: String!, score: Int! }\ntype Query { leaderboard(dir: SortDir!): [Player!]! }"}} {"submissionId":"cmssjizcr00s4jmp2b96wtlot","title":"Submission 6WTLOT","payload":{"sample_query":"{ book(id: \"b1\") { title author } }","resolver_code":"Query: {\n book: (_, {id}) => {\n const db = [{ id: \"b1\", title: \"Dune\", author: null }];\n return db.find(b => b.id === id);\n },\n}","expected_response":"{\"data\": {\"book\": {\"title\": \"Dune\", \"author\": null}}}","schema_definition":"type Book { title: String!, author: String }\ntype Query { book(id: ID!): Book }"}} {"submissionId":"cmssjp9xj00w1jmp24d11jgaw","title":"Submission 11JGAW","payload":{"sample_query":"{ user(id: \"1\") { name posts { title comments { body author } } } }","resolver_code":"Query: {\n user: (_parent, args) => ({ id: args.id, name: args.id === \"1\" ? \"Ada\" : \"Grace\" }),\n},\nUser: {\n posts: (user) => user.id === \"1\"\n ? [{ id: \"p1\", title: \"On Engines\" }, { id: \"p2\", title: \"On Loops\" }]\n : [{ id: \"p9\", title: \"On Compilers\" }],\n},\nPost: {\n comments: (post) => post.id === \"p1\"\n ? [{ id: \"c1\", body: \"great\", author: \"bob\" }, { id: \"c2\", body: \"thanks\", author: \"ada\" }]\n : [],\n},","expected_response":"{\"data\": {\"user\": {\"name\": \"Ada\", \"posts\": [{\"title\": \"On Engines\", \"comments\": [{\"body\": \"great\", \"author\": \"bob\"}, {\"body\": \"thanks\", \"author\": \"ada\"}]}, {\"title\": \"On Loops\", \"comments\": []}]}}}","schema_definition":"type Comment { id: ID!, body: String!, author: String! }\ntype Post { id: ID!, title: String!, comments: [Comment!]! }\ntype User { id: ID!, name: String!, posts: [Post!]! }\ntype Query { user(id: ID!): User }"}} {"submissionId":"cmssjp9xk00w2jmp2v4w6uwxi","title":"Submission W6UWXI","payload":{"sample_query":"{ products(maxPrice: 500, sort: DESC, onlyInStock: true) { sku price } }","resolver_code":"Query: {\n products: (_parent, args) => {\n const all = [\n { sku: \"A-1\", price: 500, inStock: true },\n { sku: \"B-2\", price: 150, inStock: false },\n { sku: \"C-3\", price: 300, inStock: true },\n { sku: \"D-4\", price: 900, inStock: true },\n ];\n let out = all;\n if (args.maxPrice != null) out = out.filter((p) => p.price <= args.maxPrice);\n if (args.onlyInStock) out = out.filter((p) => p.inStock);\n out = [...out].sort((a, b) => args.sort === \"DESC\" ? b.price - a.price : a.price - b.price);\n return out;\n },\n},","expected_response":"{\"data\": {\"products\": [{\"sku\": \"A-1\", \"price\": 500}, {\"sku\": \"C-3\", \"price\": 300}]}}","schema_definition":"enum SortDir { ASC DESC }\ntype Product { sku: String!, price: Int!, inStock: Boolean! }\ntype Query { products(maxPrice: Int, sort: SortDir = ASC, onlyInStock: Boolean = false): [Product!]! }"}} {"submissionId":"cmssjp9xk00w3jmp2cjg7soau","title":"Submission G7SOAU","payload":{"sample_query":"{ nodes { __typename id ... on Book { title pages } ... on Film { title runtime } } }","resolver_code":"Query: {\n nodes: () => [\n { __typename: \"Book\", id: \"b1\", title: \"Dune\", pages: 412 },\n { __typename: \"Film\", id: \"f1\", title: \"Alien\", runtime: 117 },\n { __typename: \"Book\", id: \"b2\", title: \"Ubik\", pages: 224 },\n ],\n},","expected_response":"{\"data\": {\"nodes\": [{\"__typename\": \"Book\", \"id\": \"b1\", \"title\": \"Dune\", \"pages\": 412}, {\"__typename\": \"Film\", \"id\": \"f1\", \"title\": \"Alien\", \"runtime\": 117}, {\"__typename\": \"Book\", \"id\": \"b2\", \"title\": \"Ubik\", \"pages\": 224}]}}","schema_definition":"interface Node { id: ID! }\ntype Book implements Node { id: ID!, title: String!, pages: Int! }\ntype Film implements Node { id: ID!, title: String!, runtime: Int! }\ntype Query { nodes: [Node!]! }"}} {"submissionId":"cmssjp9xk00w4jmp2fu0uloxe","title":"Submission 0ULOXE","payload":{"sample_query":"{ search(term: \"a\") { __typename ... on Person { name email } ... on Company { legalName employees } } }","resolver_code":"Query: {\n search: (_parent, args) => {\n const rows = [\n { __typename: \"Person\", name: \"Ada Lovelace\", email: \"ada@example.com\" },\n { __typename: \"Company\", legalName: \"Analytical Engines Ltd\", employees: 12 },\n { __typename: \"Person\", name: \"Grace Hopper\", email: \"grace@example.com\" },\n ];\n const needle = args.term.toLowerCase();\n return rows.filter((r) =>\n Object.entries(r)\n .filter(([k]) => k !== \"__typename\")\n .map(([, v]) => String(v))\n .join(\" \")\n .toLowerCase()\n .includes(needle));\n },\n},","expected_response":"{\"data\": {\"search\": [{\"__typename\": \"Person\", \"name\": \"Ada Lovelace\", \"email\": \"ada@example.com\"}, {\"__typename\": \"Company\", \"legalName\": \"Analytical Engines Ltd\", \"employees\": 12}, {\"__typename\": \"Person\", \"name\": \"Grace Hopper\", \"email\": \"grace@example.com\"}]}}","schema_definition":"type Person { name: String!, email: String! }\ntype Company { legalName: String!, employees: Int! }\nunion SearchResult = Person | Company\ntype Query { search(term: String!): [SearchResult!]! }"}} {"submissionId":"cmssjp9xk00w5jmp2kev9cp46","title":"Submission V9CP46","payload":{"sample_query":"{ articles(status: PUBLISHED) { slug status } }","resolver_code":"Query: {\n articles: (_parent, args) => {\n const all = [\n { slug: \"intro\", status: \"PUBLISHED\" },\n { slug: \"wip\", status: \"DRAFT\" },\n { slug: \"checking\", status: \"REVIEW\" },\n { slug: \"launch\", status: \"PUBLISHED\" },\n ];\n return args.status ? all.filter((a) => a.status === args.status) : all;\n },\n},","expected_response":"{\"data\": {\"articles\": [{\"slug\": \"intro\", \"status\": \"PUBLISHED\"}, {\"slug\": \"launch\", \"status\": \"PUBLISHED\"}]}}","schema_definition":"enum Status { DRAFT REVIEW PUBLISHED }\ntype Article { slug: String!, status: Status! }\ntype Query { articles(status: Status): [Article!]! }"}} {"submissionId":"cmssjp9xk00w6jmp2c6t7ym3z","title":"Submission T7YM3Z","payload":{"sample_query":"{ events(filter: { range: { from: \"2024-02-01\", to: \"2024-02-28\" }, tags: [\"public\"], limit: 5 }) { name day tags } }","resolver_code":"Query: {\n events: (_parent, args) => {\n const all = [\n { name: \"kickoff\", day: \"2024-01-05\", tags: [\"internal\"] },\n { name: \"launch\", day: \"2024-02-14\", tags: [\"public\", \"press\"] },\n { name: \"retro\", day: \"2024-03-01\", tags: [\"internal\"] },\n { name: \"summit\", day: \"2024-02-20\", tags: [\"public\"] },\n ];\n const { range, tags, limit } = args.filter;\n return all\n .filter((e) => e.day >= range.from && e.day <= range.to)\n .filter((e) => !tags || e.tags.some((t) => tags.includes(t)))\n .slice(0, limit);\n },\n},","expected_response":"{\"data\": {\"events\": [{\"name\": \"launch\", \"day\": \"2024-02-14\", \"tags\": [\"public\", \"press\"]}, {\"name\": \"summit\", \"day\": \"2024-02-20\", \"tags\": [\"public\"]}]}}","schema_definition":"input DateRange { from: String!, to: String! }\ninput EventFilter { range: DateRange!, tags: [String!], limit: Int = 10 }\ntype Event { name: String!, day: String!, tags: [String!]! }\ntype Query { events(filter: EventFilter!): [Event!]! }"}} {"submissionId":"cmssjp9xk00w7jmp2kkgg22dz","title":"Submission GG22DZ","payload":{"sample_query":"{\n last5: metric(window: 5) { label value }\n last60: metric(window: 60) { label value }\n last1440: metric(window: 1440) { label value }\n}","resolver_code":"Query: {\n metric: (_parent, args) => ({\n label: \"requests_last_\" + args.window + \"m\",\n value: args.window * 37,\n }),\n},","expected_response":"{\"data\": {\"last5\": {\"label\": \"requests_last_5m\", \"value\": 185}, \"last60\": {\"label\": \"requests_last_60m\", \"value\": 2220}, \"last1440\": {\"label\": \"requests_last_1440m\", \"value\": 53280}}}","schema_definition":"type Metric { label: String!, value: Int! }\ntype Query { metric(window: Int!): Metric! }"}} {"submissionId":"cmssjp9xk00w8jmp2tk4ia3wd","title":"Submission 4IA3WD","payload":{"sample_query":"{\n invoice(number: \"INV-9\") {\n number\n total { ...cash }\n items { description subtotal { ...cash } }\n }\n}\nfragment cash on Money { amount currency }","resolver_code":"Query: {\n invoice: (_parent, args) => ({ number: args.number }),\n},\nInvoice: {\n total: () => ({ amount: 4550, currency: \"GBP\" }),\n items: () => [\n { description: \"design\", subtotal: { amount: 3000, currency: \"GBP\" } },\n { description: \"hosting\", subtotal: { amount: 1550, currency: \"GBP\" } },\n ],\n},","expected_response":"{\"data\": {\"invoice\": {\"number\": \"INV-9\", \"total\": {\"amount\": 4550, \"currency\": \"GBP\"}, \"items\": [{\"description\": \"design\", \"subtotal\": {\"amount\": 3000, \"currency\": \"GBP\"}}, {\"description\": \"hosting\", \"subtotal\": {\"amount\": 1550, \"currency\": \"GBP\"}}]}}}","schema_definition":"type Money { amount: Int!, currency: String! }\ntype LineItem { description: String!, subtotal: Money! }\ntype Invoice { number: String!, total: Money!, items: [LineItem!]! }\ntype Query { invoice(number: String!): Invoice }"}} {"submissionId":"cmssjp9xk00w9jmp2i9io7ne2","title":"Submission IO7NE2","payload":{"sample_query":"{ cohort { name average grade } }","resolver_code":"Query: {\n cohort: () => [\n { name: \"ada\", scores: [90, 95, 100] },\n { name: \"bob\", scores: [60, 70, 65] },\n { name: \"cai\", scores: [80, 85, 75] },\n ],\n},\nStudent: {\n average: (s) => s.scores.reduce((a, b) => a + b, 0) / s.scores.length,\n grade: (s) => {\n const avg = s.scores.reduce((a, b) => a + b, 0) / s.scores.length;\n return avg >= 90 ? \"A\" : avg >= 75 ? \"B\" : \"C\";\n },\n},","expected_response":"{\"data\": {\"cohort\": [{\"name\": \"ada\", \"average\": 95, \"grade\": \"A\"}, {\"name\": \"bob\", \"average\": 65, \"grade\": \"C\"}, {\"name\": \"cai\", \"average\": 80, \"grade\": \"B\"}]}}","schema_definition":"type Student { name: String!, scores: [Int!]!, average: Float!, grade: String! }\ntype Query { cohort: [Student!]! }"}} {"submissionId":"cmssjp9xk00wajmp2fe00vz11","title":"Submission 00VZ11","payload":{"sample_query":"{ readings { sensor samples } }","resolver_code":"Query: {\n readings: () => [\n { sensor: \"temp\", samples: [21.5, null, 22.0] },\n { sensor: \"humidity\", samples: [] },\n { sensor: \"pressure\", samples: [null, null] },\n ],\n},","expected_response":"{\"data\": {\"readings\": [{\"sensor\": \"temp\", \"samples\": [21.5, null, 22]}, {\"sensor\": \"humidity\", \"samples\": []}, {\"sensor\": \"pressure\", \"samples\": [null, null]}]}}","schema_definition":"type Reading { sensor: String!, samples: [Float]! }\ntype Query { readings: [Reading!]! }"}} {"submissionId":"cmssjp9xk00wbjmp2gp5aqe5p","title":"Submission 5AQE5P","payload":{"sample_query":"{ repo { name stars slug isPopular } }","resolver_code":"Query: {\n repo: () => ({ name: \"Widget Kit\", stars: 1420, owner: \"acme\" }),\n},\nRepo: {\n slug: (r) => r.owner + \"/\" + r.name.toLowerCase().replace(/ /g, \"-\"),\n isPopular: (r) => r.stars >= 1000,\n},","expected_response":"{\"data\": {\"repo\": {\"name\": \"Widget Kit\", \"stars\": 1420, \"slug\": \"acme/widget-kit\", \"isPopular\": true}}}","schema_definition":"type Repo { name: String!, stars: Int!, slug: String!, isPopular: Boolean! }\ntype Query { repo: Repo! }"}} {"submissionId":"cmssjp9xk00wcjmp2cesm51r8","title":"Submission SM51R8","payload":{"sample_query":"{ continent(name: \"Europe\") { name countries { code regions { name cities { name population } } } } }","resolver_code":"Query: {\n continent: (_parent, args) => ({ name: args.name }),\n},\nContinent: {\n countries: (c) => c.name === \"Europe\" ? [{ code: \"PT\" }, { code: \"IE\" }] : [],\n},\nCountry: {\n regions: (c) => c.code === \"PT\"\n ? [{ name: \"Norte\", key: \"norte\" }, { name: \"Algarve\", key: \"algarve\" }]\n : [{ name: \"Leinster\", key: \"leinster\" }],\n},\nRegion: {\n cities: (r) => ({\n norte: [{ name: \"Porto\", population: 231962 }],\n algarve: [{ name: \"Faro\", population: 67650 }],\n leinster: [{ name: \"Dublin\", population: 592713 }],\n }[r.key] || []),\n},","expected_response":"{\"data\": {\"continent\": {\"name\": \"Europe\", \"countries\": [{\"code\": \"PT\", \"regions\": [{\"name\": \"Norte\", \"cities\": [{\"name\": \"Porto\", \"population\": 231962}]}, {\"name\": \"Algarve\", \"cities\": [{\"name\": \"Faro\", \"population\": 67650}]}]}, {\"code\": \"IE\", \"regions\": [{\"name\": \"Leinster\", \"cities\": [{\"name\": \"Dublin\", \"population\": 592713}]}]}]}}}","schema_definition":"type City { name: String!, population: Int! }\ntype Region { name: String!, cities: [City!]! }\ntype Country { code: String!, regions: [Region!]! }\ntype Continent { name: String!, countries: [Country!]! }\ntype Query { continent(name: String!): Continent }"}} {"submissionId":"cmssjp9xk00wdjmp25y03nbkx","title":"Submission 03NBKX","payload":{"sample_query":"{ __typename note { __typename id tags { __typename label } } }","resolver_code":"Query: {\n note: () => ({ id: \"n1\" }),\n},\nNote: {\n tags: () => [{ label: \"urgent\" }, { label: \"review\" }],\n},","expected_response":"{\"data\": {\"__typename\": \"Query\", \"note\": {\"__typename\": \"Note\", \"id\": \"n1\", \"tags\": [{\"__typename\": \"Tag\", \"label\": \"urgent\"}, {\"__typename\": \"Tag\", \"label\": \"review\"}]}}}","schema_definition":"type Tag { label: String! }\ntype Note { id: ID!, tags: [Tag!]! }\ntype Query { note: Note! }"}} {"submissionId":"cmssjp9xk00wejmp2sivx3q55","title":"Submission VX3Q55","payload":{"sample_query":"{ tasks(doneFirst: true) { id title done } }","resolver_code":"Query: {\n tasks: (_parent, args) => {\n const all = [\n { id: 3, title: \"ship\", done: false },\n { id: 1, title: \"plan\", done: true },\n { id: 2, title: \"build\", done: true },\n ];\n return [...all].sort((a, b) => {\n if (a.done !== b.done) return args.doneFirst ? (a.done ? -1 : 1) : (a.done ? 1 : -1);\n return a.id - b.id;\n });\n },\n},","expected_response":"{\"data\": {\"tasks\": [{\"id\": 1, \"title\": \"plan\", \"done\": true}, {\"id\": 2, \"title\": \"build\", \"done\": true}, {\"id\": 3, \"title\": \"ship\", \"done\": false}]}}","schema_definition":"type Task { id: Int!, title: String!, done: Boolean! }\ntype Query { tasks(doneFirst: Boolean!): [Task!]! }"}} {"submissionId":"cmssjp9xk00wfjmp2sj4uryhz","title":"Submission 4URYHZ","payload":{"sample_query":"{ users(first: 2, after: \"1\") { totalCount edges { cursor node { id handle } } pageInfo { hasNextPage endCursor } } }","resolver_code":"Query: {\n users: (_parent, args) => {\n const all = [\n { id: \"1\", handle: \"ada\" },\n { id: \"2\", handle: \"grace\" },\n { id: \"3\", handle: \"linus\" },\n { id: \"4\", handle: \"margaret\" },\n ];\n const start = args.after ? all.findIndex((u) => u.id === args.after) + 1 : 0;\n const slice = all.slice(start, start + args.first);\n return {\n totalCount: all.length,\n edges: slice.map((u) => ({ cursor: u.id, node: u })),\n pageInfo: {\n hasNextPage: start + args.first < all.length,\n endCursor: slice.length ? slice[slice.length - 1].id : null,\n },\n };\n },\n},","expected_response":"{\"data\": {\"users\": {\"totalCount\": 4, \"edges\": [{\"cursor\": \"2\", \"node\": {\"id\": \"2\", \"handle\": \"grace\"}}, {\"cursor\": \"3\", \"node\": {\"id\": \"3\", \"handle\": \"linus\"}}], \"pageInfo\": {\"hasNextPage\": true, \"endCursor\": \"3\"}}}}","schema_definition":"type PageInfo { hasNextPage: Boolean!, endCursor: String }\ntype UserEdge { cursor: String!, node: User! }\ntype UserConnection { totalCount: Int!, edges: [UserEdge!]!, pageInfo: PageInfo! }\ntype User { id: ID!, handle: String! }\ntype Query { users(first: Int!, after: String): UserConnection!\n}"}} {"submissionId":"cmssjp9xk00wgjmp2zwk0z1bi","title":"Submission K0Z1BI","payload":{"sample_query":"{ accounts { email profile { bio avatarUrl } } }","resolver_code":"Query: {\n accounts: () => [\n { email: \"a@example.com\", profile: { bio: \"engineer\", avatarUrl: null } },\n { email: \"b@example.com\", profile: null },\n ],\n},","expected_response":"{\"data\": {\"accounts\": [{\"email\": \"a@example.com\", \"profile\": {\"bio\": \"engineer\", \"avatarUrl\": null}}, {\"email\": \"b@example.com\", \"profile\": null}]}}","schema_definition":"type Profile { bio: String, avatarUrl: String }\ntype Account { email: String!, profile: Profile }\ntype Query { accounts: [Account!]! }"}} {"submissionId":"cmssjp9xk00whjmp29wrtwuwd","title":"Submission RTWUWD","payload":{"sample_query":"{ settings { key value legacyValue } }","resolver_code":"Query: {\n settings: () => [\n { key: \"theme\", value: \"dark\", legacyValue: \"DARK\" },\n { key: \"locale\", value: \"en-GB\", legacyValue: null },\n ],\n},","expected_response":"{\"data\": {\"settings\": [{\"key\": \"theme\", \"value\": \"dark\", \"legacyValue\": \"DARK\"}, {\"key\": \"locale\", \"value\": \"en-GB\", \"legacyValue\": null}]}}","schema_definition":"type Setting { key: String!, value: String!, legacyValue: String @deprecated(reason: \"use value\") }\ntype Query { settings: [Setting!]! }"}} {"submissionId":"cmssjp9xk00wijmp2jgw3s3r0","title":"Submission W3S3R0","payload":{"sample_query":"{ widget { id name colour } }","resolver_code":"Query: {\n widget: () => ({ id: \"w1\", name: \"sprocket\" }),\n},","expected_response":"{\"errors\": [{\"message\": \"Cannot query field \\\"colour\\\" on type \\\"Widget\\\".\"}]}","schema_definition":"type Widget { id: ID!, name: String! }\ntype Query { widget: Widget! }"}} {"submissionId":"cmssjp9xk00wjjmp2trf3zkhg","title":"Submission F3ZKHG","payload":{"sample_query":"{ order { ref total } }","resolver_code":"Query: {\n order: (_parent, args) => ({ ref: args.ref, total: 100 }),\n},","expected_response":"{\"errors\": [{\"message\": \"Field \\\"order\\\" argument \\\"ref\\\" of type \\\"String!\\\" is required, but it was not provided.\"}]}","schema_definition":"type Order { ref: String!, total: Int! }\ntype Query { order(ref: String!): Order }"}} {"submissionId":"cmssjp9xk00wkjmp2j0qfuz18","title":"Submission QFUZ18","payload":{"sample_query":"{ animals { name ... on Rock { hardness } } }","resolver_code":"Query: {\n animals: () => [{ __typename: \"Dog\", name: \"rex\", breed: \"husky\" }],\n},","expected_response":"{\"errors\": [{\"message\": \"Fragment cannot be spread here as objects of type \\\"Animal\\\" can never be of type \\\"Rock\\\".\"}]}","schema_definition":"interface Animal { name: String! }\ntype Dog implements Animal { name: String!, breed: String! }\ntype Cat implements Animal { name: String!, indoor: Boolean! }\ntype Rock { hardness: Int! }\ntype Query { animals: [Animal!]! }"}} {"submissionId":"cmssjuu6k00yjjmp2cl6iqtp7","title":"Submission 6IQTP7","payload":{"sample_query":"{ invoiceTotal(subtotal: 120, discountPct: 25, taxPct: 8) { net tax total } }","resolver_code":"Query: { invoiceTotal: (_, a) => { const net=a.subtotal*(1-a.discountPct/100); const tax=net*a.taxPct/100; return {net,tax,total:net+tax}; } }","expected_response":"{\"data\":{\"invoiceTotal\":{\"net\":90,\"tax\":7.2,\"total\":97.2}}}","schema_definition":"type InvoiceTotalResult { net: Float! tax: Float! total: Float! }\ntype Query { invoiceTotal(subtotal: Float!, discountPct: Float!, taxPct: Float!): InvoiceTotalResult! }"}} {"submissionId":"cmssjuu6k00ykjmp2qey5loa5","title":"Submission Y5LOA5","payload":{"sample_query":"{ shippingQuote(weight: 7.5, express: true, remote: true) { base surcharges total } }","resolver_code":"Query: { shippingQuote: (_, a) => { const base=5+Math.max(0,a.weight-1)*1.2; const surcharges=(a.express?8:0)+(a.remote?4:0); return {base,surcharges,total:base+surcharges}; } }","expected_response":"{\"data\":{\"shippingQuote\":{\"base\":12.8,\"surcharges\":12,\"total\":24.8}}}","schema_definition":"type ShippingQuoteResult { base: Float! surcharges: Float! total: Float! }\ntype Query { shippingQuote(weight: Float!, express: Boolean!, remote: Boolean!): ShippingQuoteResult! }"}} {"submissionId":"cmssjuu6k00yljmp2kqoflsae","title":"Submission OFLSAE","payload":{"sample_query":"{ retryPlan(attempts: 5, baseMs: 100, capMs: 600) { delays capped sum } }","resolver_code":"Query: { retryPlan: (_, a) => { const delays=Array.from({length:a.attempts},(_,i)=>Math.min(a.baseMs*2**i,a.capMs)); return {delays,capped:delays.includes(a.capMs),sum:delays.reduce((x,y)=>x+y,0)}; } }","expected_response":"{\"data\":{\"retryPlan\":{\"delays\":[100,200,400,600,600],\"capped\":true,\"sum\":1900}}}","schema_definition":"type RetryPlanResult { delays: [Int!]! capped: Boolean! sum: Int! }\ntype Query { retryPlan(attempts: Int!, baseMs: Int!, capMs: Int!): RetryPlanResult! }"}} {"submissionId":"cmssjuu6k00ymjmp2aa6g9iye","title":"Submission 6G9IYE","payload":{"sample_query":"{ quotaAllocation(total: 103, reserved: 7, workers: 6) { perWorker remainder usable } }","resolver_code":"Query: { quotaAllocation: (_, a) => { const usable=Math.max(0,a.total-a.reserved); return {perWorker:Math.floor(usable/a.workers),remainder:usable%a.workers,usable}; } }","expected_response":"{\"data\":{\"quotaAllocation\":{\"perWorker\":16,\"remainder\":0,\"usable\":96}}}","schema_definition":"type QuotaAllocationResult { perWorker: Int! remainder: Int! usable: Int! }\ntype Query { quotaAllocation(total: Int!, reserved: Int!, workers: Int!): QuotaAllocationResult! }"}} {"submissionId":"cmssjuu6k00ynjmp2pf5q32l6","title":"Submission 5Q32L6","payload":{"sample_query":"{ passwordScore(length: 18, classes: 4, breached: false) { score capped label } }","resolver_code":"Query: { passwordScore: (_, a) => { let score=Math.min(100,a.length*3+a.classes*12-(a.breached?80:0)); return {score,capped:score===100,label:score>=80?'strong':score>=50?'medium':'weak'}; } }","expected_response":"{\"data\":{\"passwordScore\":{\"score\":100,\"capped\":true,\"label\":\"strong\"}}}","schema_definition":"type PasswordScoreResult { score: Int! capped: Boolean! label: String! }\ntype Query { passwordScore(length: Int!, classes: Int!, breached: Boolean!): PasswordScoreResult! }"}} {"submissionId":"cmssjuu6k00yojmp2as7rfjjv","title":"Submission 7RFJJV","payload":{"sample_query":"{ cacheDecision(ageSec: 75, ttlSec: 60, staleSec: 30) { fresh serve revalidate } }","resolver_code":"Query: { cacheDecision: (_, a) => { const fresh=a.ageSec<=a.ttlSec; const serve=a.ageSec<=a.ttlSec+a.staleSec; return {fresh,serve,revalidate:serve&&!fresh}; } }","expected_response":"{\"data\":{\"cacheDecision\":{\"fresh\":false,\"serve\":true,\"revalidate\":true}}}","schema_definition":"type CacheDecisionResult { fresh: Boolean! serve: Boolean! revalidate: Boolean! }\ntype Query { cacheDecision(ageSec: Int!, ttlSec: Int!, staleSec: Int!): CacheDecisionResult! }"}} {"submissionId":"cmssjuu6k00ypjmp2cngn4y1p","title":"Submission GN4Y1P","payload":{"sample_query":"{ gradeBand(earned: 71, possible: 80, curve: 3) { percent letter passed } }","resolver_code":"Query: { gradeBand: (_, a) => { const percent=Math.min(100,a.earned/a.possible*100+a.curve); const letter=percent>=90?'A':percent>=80?'B':percent>=70?'C':percent>=60?'D':'F'; return {percent,letter,passed:percent>=60}; } }","expected_response":"{\"data\":{\"gradeBand\":{\"percent\":91.75,\"letter\":\"A\",\"passed\":true}}}","schema_definition":"type GradeBandResult { percent: Float! letter: String! passed: Boolean! }\ntype Query { gradeBand(earned: Float!, possible: Float!, curve: Float!): GradeBandResult! }"}} {"submissionId":"cmssjuu6k00yqjmp2umlvhmr8","title":"Submission LVHMR8","payload":{"sample_query":"{ rateWindow(requests: 43, seconds: 10, burst: 40) { perSecond allowed excess } }","resolver_code":"Query: { rateWindow: (_, a) => { const perSecond=a.requests/a.seconds; return {perSecond,allowed:a.requests<=a.burst,excess:Math.max(0,a.requests-a.burst)}; } }","expected_response":"{\"data\":{\"rateWindow\":{\"perSecond\":4.3,\"allowed\":false,\"excess\":3}}}","schema_definition":"type RateWindowResult { perSecond: Float! allowed: Boolean! excess: Int! }\ntype Query { rateWindow(requests: Int!, seconds: Int!, burst: Int!): RateWindowResult! }"}} {"submissionId":"cmssjuu6k00yrjmp2cwo2fnyh","title":"Submission O2FNYH","payload":{"sample_query":"{ memoryLayout(items: 7, bytesEach: 13, alignment: 8) { raw paddedEach total } }","resolver_code":"Query: { memoryLayout: (_, a) => { const paddedEach=Math.ceil(a.bytesEach/a.alignment)*a.alignment; return {raw:a.items*a.bytesEach,paddedEach,total:a.items*paddedEach}; } }","expected_response":"{\"data\":{\"memoryLayout\":{\"raw\":91,\"paddedEach\":16,\"total\":112}}}","schema_definition":"type MemoryLayoutResult { raw: Int! paddedEach: Int! total: Int! }\ntype Query { memoryLayout(items: Int!, bytesEach: Int!, alignment: Int!): MemoryLayoutResult! }"}} {"submissionId":"cmssjuu6l00ysjmp2pe9019t5","title":"Submission 9019T5","payload":{"sample_query":"{ pagination(total: 53, page: 3, size: 10) { offset count hasNext pages } }","resolver_code":"Query: { pagination: (_, a) => { const pages=Math.ceil(a.total/a.size),offset=(a.page-1)*a.size,count=Math.max(0,Math.min(a.size,a.total-offset)); return {offset,count,hasNext:a.page { const state=a.celsiusa.high?'high':'normal'; const distance=state==='low'?a.low-a.celsius:state==='high'?a.celsius-a.high:0; return {fahrenheit:a.celsius*9/5+32,state,distance}; } }","expected_response":"{\"data\":{\"temperatureBand\":{\"fahrenheit\":87.8,\"state\":\"high\",\"distance\":4}}}","schema_definition":"type TemperatureBandResult { fahrenheit: Float! state: String! distance: Float! }\ntype Query { temperatureBand(celsius: Float!, low: Float!, high: Float!): TemperatureBandResult! }"}} {"submissionId":"cmssjuu6l00yvjmp22qhvqlhl","title":"Submission HVQLHL","payload":{"sample_query":"{ loanPayment(principal: 1200, annualPct: 0, months: 12) { monthly total interest } }","resolver_code":"Query: { loanPayment: (_, a) => { const r=a.annualPct/1200; const monthly=r===0?a.principal/a.months:a.principal*r/(1-(1+r)**(-a.months)); return {monthly,total:monthly*a.months,interest:monthly*a.months-a.principal}; } }","expected_response":"{\"data\":{\"loanPayment\":{\"monthly\":100,\"total\":1200,\"interest\":0}}}","schema_definition":"type LoanPaymentResult { monthly: Float! total: Float! interest: Float! }\ntype Query { loanPayment(principal: Float!, annualPct: Float!, months: Int!): LoanPaymentResult! }"}} {"submissionId":"cmssjuu6l00ywjmp2rrwf3z8k","title":"Submission WF3Z8K","payload":{"sample_query":"{ inventoryStatus(stock: 12, reserved: 15, reorderAt: 5) { available reorder shortage } }","resolver_code":"Query: { inventoryStatus: (_, a) => { const available=Math.max(0,a.stock-a.reserved); return {available,reorder:available<=a.reorderAt,shortage:Math.max(0,a.reserved-a.stock)}; } }","expected_response":"{\"data\":{\"inventoryStatus\":{\"available\":0,\"reorder\":true,\"shortage\":3}}}","schema_definition":"type InventoryStatusResult { available: Int! reorder: Boolean! shortage: Int! }\ntype Query { inventoryStatus(stock: Int!, reserved: Int!, reorderAt: Int!): InventoryStatusResult! }"}} {"submissionId":"cmssjuu6l00yxjmp2uub63wxr","title":"Submission B63WXR","payload":{"sample_query":"{ checksumStats(a: 17, b: 29, modulus: 11) { sum product checksum } }","resolver_code":"Query: { checksumStats: (_, a) => { const sum=a.a+a.b,product=a.a*a.b; return {sum,product,checksum:(sum+product)%a.modulus}; } }","expected_response":"{\"data\":{\"checksumStats\":{\"sum\":46,\"product\":493,\"checksum\":0}}}","schema_definition":"type ChecksumStatsResult { sum: Int! product: Int! checksum: Int! }\ntype Query { checksumStats(a: Int!, b: Int!, modulus: Int!): ChecksumStatsResult! }"}} {"submissionId":"cmssjuu6l00yyjmp2lx00l6q5","title":"Submission 00L6Q5","payload":{"sample_query":"{ vectorDistance(x1: -2, y1: 3, x2: 4, y2: -5) { dx dy euclidean manhattan } }","resolver_code":"Query: { vectorDistance: (_, a) => { const dx=a.x2-a.x1,dy=a.y2-a.y1; return {dx,dy,euclidean:Math.hypot(dx,dy),manhattan:Math.abs(dx)+Math.abs(dy)}; } }","expected_response":"{\"data\":{\"vectorDistance\":{\"dx\":6,\"dy\":-8,\"euclidean\":10,\"manhattan\":14}}}","schema_definition":"type VectorDistanceResult { dx: Float! dy: Float! euclidean: Float! manhattan: Float! }\ntype Query { vectorDistance(x1: Float!, y1: Float!, x2: Float!, y2: Float!): VectorDistanceResult! }"}} {"submissionId":"cmssjuu6l00yzjmp24mwdfu07","title":"Submission WDFU07","payload":{"sample_query":"{ blendColor(r1: 20, g1: 40, b1: 60, r2: 220, g2: 140, b2: 80, ratio: 0.25) { r g b hex } }","resolver_code":"Query: { blendColor: (_, a) => { const v=['r','g','b'].map((_,i)=>Math.round([a.r1,a.g1,a.b1][i]*(1-a.ratio)+[a.r2,a.g2,a.b2][i]*a.ratio)); return {r:v[0],g:v[1],b:v[2],hex:'#'+v.map(x=>x.toString(16).padStart(2,'0')).join('')}; } }","expected_response":"{\"data\":{\"blendColor\":{\"r\":70,\"g\":65,\"b\":65,\"hex\":\"#464141\"}}}","schema_definition":"type BlendColorResult { r: Int! g: Int! b: Int! hex: String! }\ntype Query { blendColor(r1: Int!, g1: Int!, b1: Int!, r2: Int!, g2: Int!, b2: Int!, ratio: Float!): BlendColorResult! }"}} {"submissionId":"cmssjuu6l00z0jmp2ou7rgpp8","title":"Submission 7RGPP8","payload":{"sample_query":"{ compression(original: 1000, compressed: 620, overhead: 30) { saved ratio beneficial } }","resolver_code":"Query: { compression: (_, a) => { const effective=a.compressed+a.overhead,saved=a.original-effective; return {saved,ratio:effective/a.original,beneficial:saved>0}; } }","expected_response":"{\"data\":{\"compression\":{\"saved\":350,\"ratio\":0.65,\"beneficial\":true}}}","schema_definition":"type CompressionResult { saved: Int! ratio: Float! beneficial: Boolean! }\ntype Query { compression(original: Int!, compressed: Int!, overhead: Int!): CompressionResult! }"}} {"submissionId":"cmssjuu6l00z1jmp2va5u4iqu","title":"Submission 5U4IQU","payload":{"sample_query":"{ latencyPercent(total: 250, fast: 210, timeout: 8) { success fastPct timeoutPct } }","resolver_code":"Query: { latencyPercent: (_, a) => { const success=a.total-a.timeout; return {success,fastPct:a.fast/a.total*100,timeoutPct:a.timeout/a.total*100}; } }","expected_response":"{\"data\":{\"latencyPercent\":{\"success\":242,\"fastPct\":84,\"timeoutPct\":3.2}}}","schema_definition":"type LatencyPercentResult { success: Int! fastPct: Float! timeoutPct: Float! }\ntype Query { latencyPercent(total: Int!, fast: Int!, timeout: Int!): LatencyPercentResult! }"}} {"submissionId":"cmssjuu6l00z2jmp2tjglp8rj","title":"Submission GLP8RJ","payload":{"sample_query":"{ triangleClass(a: 5, b: 5, c: 8) { valid kind perimeter } }","resolver_code":"Query: { triangleClass: (_, a) => { const valid=a.a+a.b>a.c&&a.a+a.c>a.b&&a.b+a.c>a.a; const kind=!valid?'invalid':a.a===a.b&&a.b===a.c?'equilateral':a.a===a.b||a.b===a.c||a.a===a.c?'isosceles':'scalene'; return {valid,kind,perimeter:a.a+a.b+a.c}; } }","expected_response":"{\"data\":{\"triangleClass\":{\"valid\":true,\"kind\":\"isosceles\",\"perimeter\":18}}}","schema_definition":"type TriangleClassResult { valid: Boolean! kind: String! perimeter: Float! }\ntype Query { triangleClass(a: Float!, b: Float!, c: Float!): TriangleClassResult! }"}} {"submissionId":"cmssjuu6l00z3jmp2c8o1uggq","title":"Submission O1UGGQ","payload":{"sample_query":"{ workSplit(minutes: 130, focus: 25, breakMin: 5) { cycles focusMinutes breakMinutes } }","resolver_code":"Query: { workSplit: (_, a) => { const cycles=Math.floor(a.minutes/(a.focus+a.breakMin)); return {cycles,focusMinutes:cycles*a.focus,breakMinutes:cycles*a.breakMin}; } }","expected_response":"{\"data\":{\"workSplit\":{\"cycles\":4,\"focusMinutes\":100,\"breakMinutes\":20}}}","schema_definition":"type WorkSplitResult { cycles: Int! focusMinutes: Int! breakMinutes: Int! }\ntype Query { workSplit(minutes: Int!, focus: Int!, breakMin: Int!): WorkSplitResult! }"}} {"submissionId":"cmssjuu6l00z4jmp2hfoy4oky","title":"Submission OY4OKY","payload":{"sample_query":"{ bandwidthCost(gb: 137.5, included: 100, unitCost: 0.08) { billable charge overage } }","resolver_code":"Query: { bandwidthCost: (_, a) => { const billable=Math.max(0,a.gb-a.included); return {billable,charge:billable*a.unitCost,overage:billable>0}; } }","expected_response":"{\"data\":{\"bandwidthCost\":{\"billable\":37.5,\"charge\":3,\"overage\":true}}}","schema_definition":"type BandwidthCostResult { billable: Float! charge: Float! overage: Boolean! }\ntype Query { bandwidthCost(gb: Float!, included: Float!, unitCost: Float!): BandwidthCostResult! }"}} {"submissionId":"cmssjuu6l00z5jmp2dpeh9iwg","title":"Submission EH9IWG","payload":{"sample_query":"{ weightedVote(yes: 37, no: 11, abstain: 12, threshold: 0.66) { participation yesPct passed } }","resolver_code":"Query: { weightedVote: (_, a) => { const participation=a.yes+a.no,yesPct=a.yes/participation; return {participation,yesPct,passed:yesPct>=a.threshold}; } }","expected_response":"{\"data\":{\"weightedVote\":{\"participation\":48,\"yesPct\":0.7708333333333334,\"passed\":true}}}","schema_definition":"type WeightedVoteResult { participation: Int! yesPct: Float! passed: Boolean! }\ntype Query { weightedVote(yes: Int!, no: Int!, abstain: Int!, threshold: Float!): WeightedVoteResult! }"}} {"submissionId":"cmssjuu6l00z6jmp2lb6mdwz1","title":"Submission 6MDWZ1","payload":{"sample_query":"{ diskWatermark(used: 870, capacity: 1000, high: 80, critical: 90) { pct state free } }","resolver_code":"Query: { diskWatermark: (_, a) => { const pct=a.used/a.capacity*100,state=pct>=a.critical?'critical':pct>=a.high?'high':'normal'; return {pct,state,free:a.capacity-a.used}; } }","expected_response":"{\"data\":{\"diskWatermark\":{\"pct\":87,\"state\":\"high\",\"free\":130}}}","schema_definition":"type DiskWatermarkResult { pct: Float! state: String! free: Float! }\ntype Query { diskWatermark(used: Float!, capacity: Float!, high: Float!, critical: Float!): DiskWatermarkResult! }"}} {"submissionId":"cmssjuu6l00z7jmp2mvgcoufg","title":"Submission GCOUFG","payload":{"sample_query":"{ batchSizing(records: 103, bytesPer: 24, maxBytes: 500) { perBatch batches finalBatch } }","resolver_code":"Query: { batchSizing: (_, a) => { const perBatch=Math.floor(a.maxBytes/a.bytesPer),batches=Math.ceil(a.records/perBatch); return {perBatch,batches,finalBatch:a.records-(batches-1)*perBatch}; } }","expected_response":"{\"data\":{\"batchSizing\":{\"perBatch\":20,\"batches\":6,\"finalBatch\":3}}}","schema_definition":"type BatchSizingResult { perBatch: Int! batches: Int! finalBatch: Int! }\ntype Query { batchSizing(records: Int!, bytesPer: Int!, maxBytes: Int!): BatchSizingResult! }"}} {"submissionId":"cmssjuu6l00z8jmp22fe6ez1z","title":"Submission E6EZ1Z","payload":{"sample_query":"{ retention(createdDay: 100, currentDay: 131, keepDays: 30) { age expiresDay expired } }","resolver_code":"Query: { retention: (_, a) => { const age=a.currentDay-a.createdDay,expiresDay=a.createdDay+a.keepDays; return {age,expiresDay,expired:a.currentDay>expiresDay}; } }","expected_response":"{\"data\":{\"retention\":{\"age\":31,\"expiresDay\":130,\"expired\":true}}}","schema_definition":"type RetentionResult { age: Int! expiresDay: Int! expired: Boolean! }\ntype Query { retention(createdDay: Int!, currentDay: Int!, keepDays: Int!): RetentionResult! }"}} {"submissionId":"cmssjuu6l00z9jmp2lcb0klyh","title":"Submission B0KLYH","payload":{"sample_query":"{ tokenBudget(limit: 4096, prompt: 1800, reserve: 300, requested: 2500) { available granted truncated } }","resolver_code":"Query: { tokenBudget: (_, a) => { const available=Math.max(0,a.limit-a.prompt-a.reserve),granted=Math.min(a.requested,available); return {available,granted,truncated:granted { return {visitToTrial:a.trials/a.visits,trialToPaid:a.paid/a.trials,overall:a.paid/a.visits}; } }","expected_response":"{\"data\":{\"funnel\":{\"visitToTrial\":0.15,\"trialToPaid\":0.25,\"overall\":0.0375}}}","schema_definition":"type FunnelResult { visitToTrial: Float! trialToPaid: Float! overall: Float! }\ntype Query { funnel(visits: Int!, trials: Int!, paid: Int!): FunnelResult! }"}} {"submissionId":"cmssjuu6l00zbjmp288h23z75","title":"Submission H23Z75","payload":{"sample_query":"{ queueDrain(queued: 95, workers: 4, perMinute: 7, incoming: 3) { netRate minutes stable } }","resolver_code":"Query: { queueDrain: (_, a) => { const netRate=a.workers*a.perMinute-a.incoming,stable=netRate>0; return {netRate,minutes:stable?Math.ceil(a.queued/netRate):0,stable}; } }","expected_response":"{\"data\":{\"queueDrain\":{\"netRate\":25,\"minutes\":4,\"stable\":true}}}","schema_definition":"type QueueDrainResult { netRate: Int! minutes: Int! stable: Boolean! }\ntype Query { queueDrain(queued: Int!, workers: Int!, perMinute: Int!, incoming: Int!): QueueDrainResult! }"}} {"submissionId":"cmssjuu6l00zcjmp2938dp8e3","title":"Submission 8DP8E3","payload":{"sample_query":"{ mapScale(value: 75, inMin: 0, inMax: 100, outMin: -1, outMax: 1) { ratio mapped clamped } }","resolver_code":"Query: { mapScale: (_, a) => { const ratio=(a.value-a.inMin)/(a.inMax-a.inMin),mapped=a.outMin+ratio*(a.outMax-a.outMin); return {ratio,mapped,clamped:Math.max(a.outMin,Math.min(a.outMax,mapped))}; } }","expected_response":"{\"data\":{\"mapScale\":{\"ratio\":0.75,\"mapped\":0.5,\"clamped\":0.5}}}","schema_definition":"type MapScaleResult { ratio: Float! mapped: Float! clamped: Float! }\ntype Query { mapScale(value: Float!, inMin: Float!, inMax: Float!, outMin: Float!, outMax: Float!): MapScaleResult! }"}} {"submissionId":"cmssjuu6l00zdjmp2597cf164","title":"Submission 7CF164","payload":{"sample_query":"{ replicaHealth(desired: 8, ready: 6, unavailable: 2) { readyPct degraded missing } }","resolver_code":"Query: { replicaHealth: (_, a) => { return {readyPct:a.ready/a.desired*100,degraded:a.ready0,missing:Math.max(0,a.desired-a.ready)}; } }","expected_response":"{\"data\":{\"replicaHealth\":{\"readyPct\":75,\"degraded\":true,\"missing\":2}}}","schema_definition":"type ReplicaHealthResult { readyPct: Float! degraded: Boolean! missing: Int! }\ntype Query { replicaHealth(desired: Int!, ready: Int!, unavailable: Int!): ReplicaHealthResult! }"}} {"submissionId":"cmssjuu6l00zejmp2ifvcldct","title":"Submission VCLDCT","payload":{"sample_query":"{ taxBracket(income: 70000, allowance: 12000, rate1: 0.2, cutoff: 40000, rate2: 0.4) { taxable tax marginal } }","resolver_code":"Query: { taxBracket: (_, a) => { const taxable=Math.max(0,a.income-a.allowance),low=Math.min(taxable,a.cutoff),high=Math.max(0,taxable-a.cutoff); return {taxable,tax:low*a.rate1+high*a.rate2,marginal:high>0?a.rate2:a.rate1}; } }","expected_response":"{\"data\":{\"taxBracket\":{\"taxable\":58000,\"tax\":15200,\"marginal\":0.4}}}","schema_definition":"type TaxBracketResult { taxable: Float! tax: Float! marginal: Float! }\ntype Query { taxBracket(income: Float!, allowance: Float!, rate1: Float!, cutoff: Float!, rate2: Float!): TaxBracketResult! }"}} {"submissionId":"cmssjuu6l00zgjmp24u0up13u","title":"Submission 0UP13U","payload":{"sample_query":"{ timeOverlap(aStart: 2, aEnd: 11, bStart: 7, bEnd: 15) { overlap union intersects } }","resolver_code":"Query: { timeOverlap: (_, a) => { const overlap=Math.max(0,Math.min(a.aEnd,a.bEnd)-Math.max(a.aStart,a.bStart)); const union=Math.max(a.aEnd,a.bEnd)-Math.min(a.aStart,a.bStart); return {overlap,union,intersects:overlap>0}; } }","expected_response":"{\"data\":{\"timeOverlap\":{\"overlap\":4,\"union\":13,\"intersects\":true}}}","schema_definition":"type TimeOverlapResult { overlap: Int! union: Int! intersects: Boolean! }\ntype Query { timeOverlap(aStart: Int!, aEnd: Int!, bStart: Int!, bEnd: Int!): TimeOverlapResult! }"}} {"submissionId":"cmssjuu6l00zhjmp23bj7fmmm","title":"Submission J7FMMM","payload":{"sample_query":"{ geoTile(x: 5, y: 2, zoom: 3) { maxIndex valid flippedY } }","resolver_code":"Query: { geoTile: (_, a) => { const maxIndex=2**a.zoom-1,valid=a.x>=0&&a.y>=0&&a.x<=maxIndex&&a.y<=maxIndex; return {maxIndex,valid,flippedY:maxIndex-a.y}; } }","expected_response":"{\"data\":{\"geoTile\":{\"maxIndex\":7,\"valid\":true,\"flippedY\":5}}}","schema_definition":"type GeoTileResult { maxIndex: Int! valid: Boolean! flippedY: Int! }\ntype Query { geoTile(x: Int!, y: Int!, zoom: Int!): GeoTileResult! }"}} {"submissionId":"cmssjuu6l00zijmp2s657fxtp","title":"Submission 57FXTP","payload":{"sample_query":"{ dedupeEstimate(total: 1000, unique: 760, falsePositivePct: 2) { duplicates adjustedUnique reductionPct } }","resolver_code":"Query: { dedupeEstimate: (_, a) => { const duplicates=a.total-a.unique,adjustedUnique=a.unique+a.total*a.falsePositivePct/100; return {duplicates,adjustedUnique,reductionPct:duplicates/a.total*100}; } }","expected_response":"{\"data\":{\"dedupeEstimate\":{\"duplicates\":240,\"adjustedUnique\":780,\"reductionPct\":24}}}","schema_definition":"type DedupeEstimateResult { duplicates: Int! adjustedUnique: Float! reductionPct: Float! }\ntype Query { dedupeEstimate(total: Int!, unique: Int!, falsePositivePct: Float!): DedupeEstimateResult! }"}} {"submissionId":"cmssjuu6l00zjjmp2i4egjlzy","title":"Submission EGJLZY","payload":{"sample_query":"{ rotation(index: 8, shift: 7, length: 10) { normalizedShift newIndex wrapped } }","resolver_code":"Query: { rotation: (_, a) => { const normalizedShift=((a.shift%a.length)+a.length)%a.length,newIndex=(a.index+normalizedShift)%a.length; return {normalizedShift,newIndex,wrapped:a.index+normalizedShift>=a.length}; } }","expected_response":"{\"data\":{\"rotation\":{\"normalizedShift\":7,\"newIndex\":5,\"wrapped\":true}}}","schema_definition":"type RotationResult { normalizedShift: Int! newIndex: Int! wrapped: Boolean! }\ntype Query { rotation(index: Int!, shift: Int!, length: Int!): RotationResult! }"}} {"submissionId":"cmssjuu6l00zkjmp2mhi96lyu","title":"Submission I96LYU","payload":{"sample_query":"{ hashPartition(hash: 17, partitions: 5, replicas: 3) { primary replicas distinct } }","resolver_code":"Query: { hashPartition: (_, a) => { const primary=((a.hash%a.partitions)+a.partitions)%a.partitions,replicas=Array.from({length:Math.min(a.replicas,a.partitions)},(_,i)=>(primary+i)%a.partitions); return {primary,replicas,distinct:new Set(replicas).size}; } }","expected_response":"{\"data\":{\"hashPartition\":{\"primary\":2,\"replicas\":[2,3,4],\"distinct\":3}}}","schema_definition":"type HashPartitionResult { primary: Int! replicas: [Int!]! distinct: Int! }\ntype Query { hashPartition(hash: Int!, partitions: Int!, replicas: Int!): HashPartitionResult! }"}} {"submissionId":"cmssjuu6l00zljmp236o41j34","title":"Submission O41J34","payload":{"sample_query":"{ speedup(serial: 120, parallel: 35, cores: 4) { speedup efficiency saved } }","resolver_code":"Query: { speedup: (_, a) => { const speedup=a.serial/a.parallel; return {speedup,efficiency:speedup/a.cores,saved:a.serial-a.parallel}; } }","expected_response":"{\"data\":{\"speedup\":{\"speedup\":3.4285714285714284,\"efficiency\":0.8571428571428571,\"saved\":85}}}","schema_definition":"type SpeedupResult { speedup: Float! efficiency: Float! saved: Float! }\ntype Query { speedup(serial: Float!, parallel: Float!, cores: Int!): SpeedupResult! }"}} {"submissionId":"cmssjuu6l00zmjmp2c79vh9q3","title":"Submission 9VH9Q3","payload":{"sample_query":"{ errorBudget(requests: 50000, failures: 18, targetPct: 99.95) { allowedFailures consumedPct remaining } }","resolver_code":"Query: { errorBudget: (_, a) => { const allowedFailures=a.requests*(1-a.targetPct/100); return {allowedFailures,consumedPct:a.failures/allowedFailures*100,remaining:allowedFailures-a.failures}; } }","expected_response":"{\"data\":{\"errorBudget\":{\"allowedFailures\":24.999999999997247,\"consumedPct\":72.00000000000793,\"remaining\":6.999999999997247}}}","schema_definition":"type ErrorBudgetResult { allowedFailures: Float! consumedPct: Float! remaining: Float! }\ntype Query { errorBudget(requests: Int!, failures: Int!, targetPct: Float!): ErrorBudgetResult! }"}} {"submissionId":"cmssjuu6l00znjmp2khjd3k1d","title":"Submission JD3K1D","payload":{"sample_query":"{ storageTier(daysOld: 45, accesses: 2, hotDays: 30, minAccess: 5) { tier archive score } }","resolver_code":"Query: { storageTier: (_, a) => { const archive=a.daysOld>a.hotDays&&a.accessesa.hotDays?'warm':'hot'; return {tier,archive,score:a.accesses-a.daysOld}; } }","expected_response":"{\"data\":{\"storageTier\":{\"tier\":\"cold\",\"archive\":true,\"score\":-43}}}","schema_definition":"type StorageTierResult { tier: String! archive: Boolean! score: Int! }\ntype Query { storageTier(daysOld: Int!, accesses: Int!, hotDays: Int!, minAccess: Int!): StorageTierResult! }"}} {"submissionId":"cmssjuu6l00zojmp2c9uc80p7","title":"Submission UC80P7","payload":{"sample_query":"{ bookingCapacity(capacity: 10, booked: 8, requested: 5, waitlist: true) { confirmed waitlisted remaining } }","resolver_code":"Query: { bookingCapacity: (_, a) => { const free=Math.max(0,a.capacity-a.booked),confirmed=Math.min(free,a.requested),waitlisted=a.waitlist?a.requested-confirmed:0; return {confirmed,waitlisted,remaining:free-confirmed}; } }","expected_response":"{\"data\":{\"bookingCapacity\":{\"confirmed\":2,\"waitlisted\":3,\"remaining\":0}}}","schema_definition":"type BookingCapacityResult { confirmed: Int! waitlisted: Int! remaining: Int! }\ntype Query { bookingCapacity(capacity: Int!, booked: Int!, requested: Int!, waitlist: Boolean!): BookingCapacityResult! }"}} {"submissionId":"cmssjuu6l00zpjmp2v0dihwdp","title":"Submission DIHWDP","payload":{"sample_query":"{ qualityGate(tests: 240, failed: 0, coverage: 87.5, minCoverage: 85) { passRate coverageOk release } }","resolver_code":"Query: { qualityGate: (_, a) => { const passRate=(a.tests-a.failed)/a.tests,coverageOk=a.coverage>=a.minCoverage; return {passRate,coverageOk,release:a.failed===0&&coverageOk}; } }","expected_response":"{\"data\":{\"qualityGate\":{\"passRate\":1,\"coverageOk\":true,\"release\":true}}}","schema_definition":"type QualityGateResult { passRate: Float! coverageOk: Boolean! release: Boolean! }\ntype Query { qualityGate(tests: Int!, failed: Int!, coverage: Float!, minCoverage: Float!): QualityGateResult! }"}} {"submissionId":"cmssjuu6l00zqjmp2065kuj35","title":"Submission 5KUJ35","payload":{"sample_query":"{ currencySpread(bid: 1.23, ask: 1.25, quantity: 400) { mid spread cost } }","resolver_code":"Query: { currencySpread: (_, a) => { const mid=(a.bid+a.ask)/2,spread=a.ask-a.bid; return {mid,spread,cost:a.ask*a.quantity}; } }","expected_response":"{\"data\":{\"currencySpread\":{\"mid\":1.24,\"spread\":0.020000000000000018,\"cost\":500}}}","schema_definition":"type CurrencySpreadResult { mid: Float! spread: Float! cost: Float! }\ntype Query { currencySpread(bid: Float!, ask: Float!, quantity: Float!): CurrencySpreadResult! }"}} {"submissionId":"cmssjuu6l00zrjmp24w0i17s4","title":"Submission 0I17S4","payload":{"sample_query":"{ signalWindow(samples: 20, positives: 15, minSamples: 12, threshold: 0.7) { rate enough triggered } }","resolver_code":"Query: { signalWindow: (_, a) => { const rate=a.positives/a.samples,enough=a.samples>=a.minSamples; return {rate,enough,triggered:enough&&rate>=a.threshold}; } }","expected_response":"{\"data\":{\"signalWindow\":{\"rate\":0.75,\"enough\":true,\"triggered\":true}}}","schema_definition":"type SignalWindowResult { rate: Float! enough: Boolean! triggered: Boolean! }\ntype Query { signalWindow(samples: Int!, positives: Int!, minSamples: Int!, threshold: Float!): SignalWindowResult! }"}} {"submissionId":"cmssjuu6l00zsjmp20usoxk7z","title":"Submission SOXK7Z","payload":{"sample_query":"{ migrationPlan(rows: 12500, rate: 300, downtimeMin: 40) { copyMinutes withinDowntime overflow } }","resolver_code":"Query: { migrationPlan: (_, a) => { const copyMinutes=Math.ceil(a.rows/a.rate),overflow=Math.max(0,copyMinutes-a.downtimeMin); return {copyMinutes,withinDowntime:overflow===0,overflow}; } }","expected_response":"{\"data\":{\"migrationPlan\":{\"copyMinutes\":42,\"withinDowntime\":false,\"overflow\":2}}}","schema_definition":"type MigrationPlanResult { copyMinutes: Int! withinDowntime: Boolean! overflow: Int! }\ntype Query { migrationPlan(rows: Int!, rate: Int!, downtimeMin: Int!): MigrationPlanResult! }"}} {"submissionId":"cmssjuu6l00ztjmp269whdcvh","title":"Submission WHDCVH","payload":{"sample_query":"{ seatPricing(seats: 14, included: 5, base: 60, extraRate: 8) { extraSeats subtotal average } }","resolver_code":"Query: { seatPricing: (_, a) => { const extraSeats=Math.max(0,a.seats-a.included),subtotal=a.base+extraSeats*a.extraRate; return {extraSeats,subtotal,average:subtotal/a.seats}; } }","expected_response":"{\"data\":{\"seatPricing\":{\"extraSeats\":9,\"subtotal\":132,\"average\":9.428571428571429}}}","schema_definition":"type SeatPricingResult { extraSeats: Int! subtotal: Float! average: Float! }\ntype Query { seatPricing(seats: Int!, included: Int!, base: Float!, extraRate: Float!): SeatPricingResult! }"}} {"submissionId":"cmssjuu6l00zujmp2hc62ihz7","title":"Submission 62IHZ7","payload":{"sample_query":"{ networkUsable(prefix: 24, reserved: 5) { addresses usable percentage } }","resolver_code":"Query: { networkUsable: (_, a) => { const addresses=2**(32-a.prefix),usable=Math.max(0,addresses-2-a.reserved); return {addresses,usable,percentage:usable/addresses*100}; } }","expected_response":"{\"data\":{\"networkUsable\":{\"addresses\":256,\"usable\":249,\"percentage\":97.265625}}}","schema_definition":"type NetworkUsableResult { addresses: Float! usable: Float! percentage: Float! }\ntype Query { networkUsable(prefix: Int!, reserved: Int!): NetworkUsableResult! }"}} {"submissionId":"cmssjuu6l00zvjmp2vu2l1kjq","title":"Submission 2L1KJQ","payload":{"sample_query":"{ alertState(value: 72, warn: 70, critical: 90, previousCritical: true) { state escalated recovered } }","resolver_code":"Query: { alertState: (_, a) => { const state=a.value>=a.critical?'critical':a.value>=a.warn?'warning':'ok'; return {state,escalated:state==='critical'&&!a.previousCritical,recovered:a.previousCritical&&state!=='critical'}; } }","expected_response":"{\"data\":{\"alertState\":{\"state\":\"warning\",\"escalated\":false,\"recovered\":true}}}","schema_definition":"type AlertStateResult { state: String! escalated: Boolean! recovered: Boolean! }\ntype Query { alertState(value: Float!, warn: Float!, critical: Float!, previousCritical: Boolean!): AlertStateResult! }"}} {"submissionId":"cmssjuu6l00zwjmp2u702e3zr","title":"Submission 02E3ZR","payload":{"sample_query":"{ buildMatrix(platforms: 3, versions: 4, excluded: 2, parallel: 5) { jobs waves utilization } }","resolver_code":"Query: { buildMatrix: (_, a) => { const jobs=Math.max(0,a.platforms*a.versions-a.excluded),waves=Math.ceil(jobs/a.parallel); return {jobs,waves,utilization:jobs/(waves*a.parallel)}; } }","expected_response":"{\"data\":{\"buildMatrix\":{\"jobs\":10,\"waves\":2,\"utilization\":1}}}","schema_definition":"type BuildMatrixResult { jobs: Int! waves: Int! utilization: Float! }\ntype Query { buildMatrix(platforms: Int!, versions: Int!, excluded: Int!, parallel: Int!): BuildMatrixResult! }"}} {"submissionId":"cmssk2kku010hjmp2qmlq3z7a","title":"Submission LQ3Z7A","payload":{"sample_query":"mutation { reserve(productId: \"p1\", quantity: 8) { quantity product { name stock } } }","resolver_code":"Query: {\n product: (_, { id }) => {\n const products = [{ id: \"p1\", name: \"Widget\", stock: 5 }];\n return products.find(p => p.id === id);\n }\n},\nMutation: {\n reserve: (_, { productId, quantity }) => {\n const products = [{ id: \"p1\", name: \"Widget\", stock: 5 }];\n const p = products.find(x => x.id === productId);\n if (!p) throw new Error(`Unknown product: ${productId}`);\n if (quantity > p.stock) throw new Error(`Insufficient stock for ${p.name}: requested ${quantity}, have ${p.stock}`);\n p.stock -= quantity;\n return { product: p, quantity };\n }\n},\nReservation: {\n product: (r) => r.product,\n quantity: (r) => r.quantity\n}","expected_response":"{\"errors\":[{\"message\":\"Insufficient stock for Widget: requested 8, have 5\"}]}","schema_definition":"type Product { id: ID! name: String! stock: Int! }\ntype Reservation { product: Product! quantity: Int! }\ntype Query { product(id: ID!): Product }\ntype Mutation { reserve(productId: ID!, quantity: Int!): Reservation! }"}} {"submissionId":"cmssk2kku010ijmp2knt4e47p","title":"Submission T4E47P","payload":{"sample_query":"{ book(id: \"b1\") { title author { name } } }","resolver_code":"Query: {\n book: (_, { id }) => {\n const books = [{ id: \"b1\", title: \"Earthsea\", authorId: \"missing-author\" }];\n return books.find(b => b.id === id);\n }\n},\nBook: {\n author: (book) => {\n const authors = { a1: { id: \"a1\", name: \"Le Guin\" } };\n return authors[book.authorId] || null;\n }\n}","expected_response":"{\"data\":{\"book\":null},\"errors\":[{\"message\":\"Cannot return null for non-nullable field Book.author.\"}]}","schema_definition":"type Author { id: ID! name: String! }\ntype Book { id: ID! title: String! author: Author! }\ntype Query { book(id: ID!): Book }"}} {"submissionId":"cmssk2kku010jjmp2ans1syjr","title":"Submission S1SYJR","payload":{"sample_query":"{ orders(status: \"shipped\", limit: 2, offset: 1) { id customer total } }","resolver_code":"Query: {\n orders: (_, { status, limit = 10, offset = 0 }) => {\n const allOrders = [\n { id: \"o1\", customer: \"Ann\", total: 42.5, status: \"shipped\" },\n { id: \"o2\", customer: \"Ben\", total: 15.0, status: \"pending\" },\n { id: \"o3\", customer: \"Cid\", total: 99.9, status: \"shipped\" },\n { id: \"o4\", customer: \"Dee\", total: 5.25, status: \"cancelled\" },\n { id: \"o5\", customer: \"Eve\", total: 60.0, status: \"shipped\" }\n ];\n let result = allOrders;\n if (status) result = result.filter(o => o.status === status);\n return result.slice(offset, offset + limit);\n }\n}","expected_response":"{\"data\":{\"orders\":[{\"id\":\"o3\",\"customer\":\"Cid\",\"total\":99.9},{\"id\":\"o5\",\"customer\":\"Eve\",\"total\":60}]}}","schema_definition":"type Order { id: ID! customer: String! total: Float! status: String! }\ntype Query { orders(status: String, limit: Int = 10, offset: Int = 0): [Order!]! }"}} {"submissionId":"cmssknsup0129jmp2jecnzp4g","title":"Submission CNZP4G","payload":{"sample_query":"{ order(id: \"1\") { id total item { sku quantity } } }","resolver_code":"Query: {\n order: (_, { id }) => {\n if (id !== \"1\") throw new Error(\"order not found\");\n return { id, total: null, item: { sku: \"SKU-9\", quantity: 3 } };\n }\n}","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Order.total.\"}]}","schema_definition":"type OrderItem { sku: String!, quantity: Int! }\ntype Order { id: ID!, total: Float!, item: OrderItem! }\ntype Query { order(id: ID!): Order! }"}} {"submissionId":"cmssknsuq012cjmp2oop4blw5","title":"Submission P4BLW5","payload":{"sample_query":"{ ticketsByPriority { id priority } }","resolver_code":"Query: {\n ticketsByPriority: (_, { min }) => {\n const rank = { LOW: 0, MEDIUM: 1, HIGH: 2 };\n const all = [\n { id: \"1\", priority: \"LOW\" },\n { id: \"2\", priority: \"MEDIUM\" },\n { id: \"3\", priority: \"HIGH\" }\n ];\n return all.filter(t => rank[t.priority] >= rank[min]);\n }\n}","expected_response":"{\"data\":{\"ticketsByPriority\":[{\"id\":\"2\",\"priority\":\"MEDIUM\"},{\"id\":\"3\",\"priority\":\"HIGH\"}]}}","schema_definition":"enum Priority { LOW MEDIUM HIGH }\ntype Ticket { id: ID!, priority: Priority! }\ntype Query { ticketsByPriority(min: Priority = MEDIUM): [Ticket!]! }"}} {"submissionId":"cmssknsuq012djmp2phj8ecl1","title":"Submission J8ECL1","payload":{"sample_query":"{ items { sku price } storeName }","resolver_code":"Query: {\n items: () => ([\n { sku: \"A1\", price: 5.5 },\n { sku: \"A2\", price: null },\n { sku: \"A3\", price: 7.25 }\n ]),\n storeName: () => \"Riverside Market\"\n}","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Item.price.\"}],\"data\":{\"items\":null,\"storeName\":\"Riverside Market\"}}","schema_definition":"type Item { sku: String!, price: Float! }\ntype Query { items: [Item!], storeName: String! }"}} {"submissionId":"cmssknsuq012ejmp2psbj1yc2","title":"Submission BJ1YC2","payload":{"sample_query":"mutation { createUser(input: { name: \"Rae\", age: 16, address: { street: \"1 Main St\", zip: \"10001\" } }) { name age zip } }","resolver_code":"Mutation: {\n createUser: (_, { input }) => {\n if (input.age < 18) throw new Error(\"age must be at least 18\");\n return { name: input.name, age: input.age, zip: input.address.zip };\n }\n},\nQuery: {\n ping: () => \"pong\"\n}","expected_response":"{\"errors\":[{\"message\":\"age must be at least 18\"}],\"data\":{\"createUser\":null}}","schema_definition":"input AddressInput { street: String!, zip: String! }\ninput CreateUserInput { name: String!, age: Int!, address: AddressInput! }\ntype User { name: String!, age: Int!, zip: String! }\ntype Mutation { createUser(input: CreateUserInput!): User }\ntype Query { ping: String! }"}} {"submissionId":"cmssknsuq012fjmp2ph30zwlm","title":"Submission 30ZWLM","payload":{"sample_query":"{ comments(first: 2, after: 2) { id text } }","resolver_code":"Query: {\n comments: (_, { first, after }) => {\n const all = [\n { id: \"c1\", text: \"First!\" },\n { id: \"c2\", text: \"Nice post\" },\n { id: \"c3\", text: \"Agreed\" },\n { id: \"c4\", text: \"Thanks\" },\n { id: \"c5\", text: \"Interesting\" }\n ];\n return all.slice(after, after + first);\n }\n}","expected_response":"{\"data\":{\"comments\":[{\"id\":\"c3\",\"text\":\"Agreed\"},{\"id\":\"c4\",\"text\":\"Thanks\"}]}}","schema_definition":"type Comment { id: ID!, text: String! }\ntype Query { comments(first: Int!, after: Int = 0): [Comment!]! }"}} {"submissionId":"cmssknsuq012gjmp2dbxmg7qh","title":"Submission XMG7QH","payload":{"sample_query":"{ a: square(n: 4) b: square(n: 9) c: square(n: 0) }","resolver_code":"Query: {\n square: (_, { n }) => n * n\n}","expected_response":"{\"data\":{\"a\":16,\"b\":81,\"c\":0}}","schema_definition":"type Query { square(n: Int!): Int! }"}} {"submissionId":"cmssknsuq012hjmp2ym96a1ga","title":"Submission 96A1GA","payload":{"sample_query":"{ employee(id: \"3\") { name manager { name manager { name manager { name } } } } }","resolver_code":"Query: {\n employee: (_, { id }) => {\n const db = {\n \"3\": { id: \"3\", name: \"Priya\", managerId: \"2\" },\n \"2\": { id: \"2\", name: \"Owen\", managerId: \"1\" },\n \"1\": { id: \"1\", name: \"Ada\", managerId: null }\n };\n return db[id] || null;\n }\n},\nEmployee: {\n manager: (parent) => {\n const db = {\n \"3\": { id: \"3\", name: \"Priya\", managerId: \"2\" },\n \"2\": { id: \"2\", name: \"Owen\", managerId: \"1\" },\n \"1\": { id: \"1\", name: \"Ada\", managerId: null }\n };\n return parent.managerId ? db[parent.managerId] : null;\n }\n}","expected_response":"{\"data\":{\"employee\":{\"name\":\"Priya\",\"manager\":{\"name\":\"Owen\",\"manager\":{\"name\":\"Ada\",\"manager\":null}}}}}","schema_definition":"type Employee { id: ID!, name: String!, manager: Employee }\ntype Query { employee(id: ID!): Employee }"}} {"submissionId":"cmssknsuq012ijmp2vsq57x8h","title":"Submission Q57X8H","payload":{"sample_query":"{ book { title pages author } }","resolver_code":"Query: {\n book: () => ({ title: \"The Pragmatic Programmer\", pages: 352, author: \"Hunt & Thomas\" })\n}","expected_response":"{\"data\":{\"book\":{\"title\":\"The Pragmatic Programmer\",\"pages\":352,\"author\":\"Hunt & Thomas\"}}}","schema_definition":"type Book { title: String!, pages: Int!, author: String! }\ntype Query { book: Book! }"}} {"submissionId":"cmssknsuq012jjmp2jv8j6yny","title":"Submission 8J6YNY","payload":{"sample_query":"{ weather(city: \"Paris\") time(zone: \"UTC\") }","resolver_code":"Query: {\n weather: (_, { city }) => {\n const known = { \"Hyderabad\": \"Hot and humid\", \"Tokyo\": \"Mild and clear\" };\n if (!known[city]) throw new Error(\"no data for city: \" + city);\n return known[city];\n },\n time: (_, { zone }) => zone === \"UTC\" ? \"12:00\" : \"unknown\"\n}","expected_response":"{\"errors\":[{\"message\":\"no data for city: Paris\"}],\"data\":{\"weather\":null,\"time\":\"12:00\"}}","schema_definition":"type Query { weather(city: String!): String, time(zone: String!): String! }"}} {"submissionId":"cmsskpkyl012tjmp2ll81erf0","title":"Submission 81ERF0","payload":{"sample_query":"{\n booksByGenre(genre: MYSTERY) {\n title\n rating\n author {\n name\n bookCount\n }\n }\n}","resolver_code":"Query: {\n booksByGenre: (_, { genre }) => {\n const books = [\n { id: \"b1\", title: \"Shadows of Kalte\", genre: \"MYSTERY\", rating: 4.5, authorId: \"a1\" },\n { id: \"b2\", title: \"The Silent Orchard\", genre: \"MYSTERY\", rating: 4.2, authorId: \"a2\" },\n { id: \"b3\", title: \"Sunlit Harbor\", genre: \"FICTION\", rating: 3.8, authorId: \"a1\" }\n ];\n return books.filter(b => b.genre === genre);\n }\n},\nBook: {\n author: (book) => {\n const authors = [\n { id: \"a1\", name: \"Isabel Cruz\" },\n { id: \"a2\", name: \"Marcus Lee\" }\n ];\n return authors.find(a => a.id === book.authorId);\n }\n},\nAuthor: {\n bookCount: (author) => {\n const books = [\n { id: \"b1\", authorId: \"a1\" },\n { id: \"b2\", authorId: \"a2\" },\n { id: \"b3\", authorId: \"a1\" }\n ];\n return books.filter(b => b.authorId === author.id).length;\n },\n books: (author) => {\n const books = [\n { id: \"b1\", title: \"Shadows of Kalte\", genre: \"MYSTERY\", rating: 4.5, authorId: \"a1\" },\n { id: \"b2\", title: \"The Silent Orchard\", genre: \"MYSTERY\", rating: 4.2, authorId: \"a2\" },\n { id: \"b3\", title: \"Sunlit Harbor\", genre: \"FICTION\", rating: 3.8, authorId: \"a1\" }\n ];\n return books.filter(b => b.authorId === author.id);\n }\n}","expected_response":"{\"data\":{\"booksByGenre\":[{\"title\":\"Shadows of Kalte\",\"rating\":4.5,\"author\":{\"name\":\"Isabel Cruz\",\"bookCount\":2}},{\"title\":\"The Silent Orchard\",\"rating\":4.2,\"author\":{\"name\":\"Marcus Lee\",\"bookCount\":1}}]}}","schema_definition":"type Author {\n id: ID!\n name: String!\n bookCount: Int!\n books: [Book!]!\n}\n\ntype Book {\n id: ID!\n title: String!\n genre: Genre!\n rating: Float\n author: Author!\n}\n\nenum Genre {\n FICTION\n NONFICTION\n MYSTERY\n}\n\ntype Query {\n booksByGenre(genre: Genre!): [Book!]!\n}"}} {"submissionId":"cmsskpkym012ujmp29t46tqq9","title":"Submission 46TQQ9","payload":{"sample_query":"mutation {\n createUser(username: \"al\", age: 25) {\n id\n username\n age\n }\n}","resolver_code":"Query: {\n ping: () => \"pong\"\n},\nMutation: {\n createUser: (_, { username, age }) => {\n if (age < 18) {\n throw new Error(\"age must be at least 18\");\n }\n if (username.length < 3) {\n throw new Error(\"username must be at least 3 characters\");\n }\n return { id: \"u1\", username, age };\n }\n}","expected_response":"{\"errors\":[{\"message\":\"username must be at least 3 characters\"}]}","schema_definition":"type Query {\n ping: String!\n}\n\ntype Mutation {\n createUser(username: String!, age: Int!): User!\n}\n\ntype User {\n id: ID!\n username: String!\n age: Int!\n}"}} {"submissionId":"cmsskpkym012wjmp2xf7gbmx9","title":"Submission 7GBMX9","payload":{"sample_query":"{\n itemsAfter(cursor: \"9\") {\n id\n name\n }\n}","resolver_code":"Query: {\n itemsAfter: (_, { cursor }) => {\n const items = [\n { id: \"1\", name: \"Alpha\" },\n { id: \"2\", name: \"Beta\" },\n { id: \"3\", name: \"Gamma\" }\n ];\n const index = items.findIndex(i => i.id === cursor);\n if (index === -1) {\n throw new Error(`cursor ${cursor} not found`);\n }\n return items.slice(index + 1);\n }\n}","expected_response":"{\"errors\":[{\"message\":\"cursor 9 not found\"}]}","schema_definition":"type Item {\n id: ID!\n name: String!\n}\n\ntype Query {\n itemsAfter(cursor: ID!): [Item!]!\n}"}} {"submissionId":"cmsskpkym012xjmp2eb3i66on","title":"Submission 3I66ON","payload":{"sample_query":"{\n employees(department: \"Engineering\", limit: 2) {\n name\n salary\n }\n}","resolver_code":"Query: {\n employees: (_, { department, sort, limit }) => {\n const employees = [\n { id: \"e1\", name: \"Priya Nair\", department: \"Engineering\", salary: 95000 },\n { id: \"e2\", name: \"Tom Reyes\", department: \"Engineering\", salary: 87000 },\n { id: \"e3\", name: \"Lucia Wren\", department: \"Engineering\", salary: 102000 },\n { id: \"e4\", name: \"Sam Okoye\", department: \"Sales\", salary: 72000 }\n ];\n let filtered = employees.filter(e => e.department === department);\n filtered.sort((a, b) => sort === \"ASC\" ? a.salary - b.salary : b.salary - a.salary);\n return filtered.slice(0, limit);\n }\n}","expected_response":"{\"data\":{\"employees\":[{\"name\":\"Tom Reyes\",\"salary\":87000},{\"name\":\"Priya Nair\",\"salary\":95000}]}}","schema_definition":"enum SortOrder {\n ASC\n DESC\n}\n\ntype Employee {\n id: ID!\n name: String!\n salary: Int!\n}\n\ntype Query {\n employees(department: String!, sort: SortOrder = ASC, limit: Int = 10): [Employee!]!\n}"}} {"submissionId":"cmssl5c0x0157jmp2yv6yc98u","title":"Submission 6YC98U","payload":{"sample_query":"{ booksByAuthor(author: \"Frank Herbert\") { title year } }","resolver_code":"Query: {\n book: (_, {id}) => {\n const books = [\n {id: \"1\", title: \"Dune\", author: \"Frank Herbert\", year: 1965},\n {id: \"2\", title: \"Foundation\", author: \"Isaac Asimov\", year: 1951},\n {id: \"3\", title: \"Children of Dune\", author: \"Frank Herbert\", year: 1976},\n ];\n return books.find(b => b.id === id);\n },\n booksByAuthor: (_, {author}) => {\n const books = [\n {id: \"1\", title: \"Dune\", author: \"Frank Herbert\", year: 1965},\n {id: \"2\", title: \"Foundation\", author: \"Isaac Asimov\", year: 1951},\n {id: \"3\", title: \"Children of Dune\", author: \"Frank Herbert\", year: 1976},\n ];\n return books.filter(b => b.author === author);\n },\n }","expected_response":"{\"data\": {\"booksByAuthor\": [{\"title\": \"Dune\", \"year\": 1965}, {\"title\": \"Children of Dune\", \"year\": 1976}]}}","schema_definition":"type Book { id: ID!, title: String!, author: String!, year: Int! }\ntype Query { book(id: ID!): Book, booksByAuthor(author: String!): [Book!]! }"}} {"submissionId":"cmssl5c0x0158jmp2mmo0yd1y","title":"Submission O0YD1Y","payload":{"sample_query":"{ safeDivide(a: 10, b: 0) }","resolver_code":"Query: {\n safeDivide: (_, {a, b}) => {\n if (b === 0) throw new Error('cannot divide by zero');\n return a / b;\n }\n }","expected_response":"{\"errors\": [{\"message\": \"cannot divide by zero\"}]}","schema_definition":"type Query { safeDivide(a: Float!, b: Float!): Float! }"}} {"submissionId":"cmssl5c0x0159jmp2zdk2x5m3","title":"Submission K2X5M3","payload":{"sample_query":"{ employeesByDepartment(department: \"Engineering\") { name salary } totalPayroll }","resolver_code":"Query: {\n employeesByDepartment: (_, {department}) => {\n const employees = [\n {id: \"1\", name: \"Alice\", department: \"Engineering\", salary: 95000},\n {id: \"2\", name: \"Bob\", department: \"Sales\", salary: 70000},\n {id: \"3\", name: \"Carol\", department: \"Engineering\", salary: 105000},\n ];\n return employees.filter(e => e.department === department);\n },\n totalPayroll: () => {\n const employees = [\n {id: \"1\", name: \"Alice\", department: \"Engineering\", salary: 95000},\n {id: \"2\", name: \"Bob\", department: \"Sales\", salary: 70000},\n {id: \"3\", name: \"Carol\", department: \"Engineering\", salary: 105000},\n ];\n return employees.reduce((sum, e) => sum + e.salary, 0);\n },\n }","expected_response":"{\"data\": {\"employeesByDepartment\": [{\"name\": \"Alice\", \"salary\": 95000}, {\"name\": \"Carol\", \"salary\": 105000}], \"totalPayroll\": 270000}}","schema_definition":"type Employee { id: ID!, name: String!, department: String!, salary: Float! }\ntype Query { employeesByDepartment(department: String!): [Employee!]!, totalPayroll: Float! }"}} {"submissionId":"cmssl5c0x015ajmp2opkhmb26","title":"Submission KHMB26","payload":{"sample_query":"{ customer(id: \"c1\") { name orders { status total } } }","resolver_code":"Query: {\n customer: (_, {id}) => {\n const customers = [{id: \"c1\", name: \"Dana\"}];\n return customers.find(c => c.id === id);\n },\n },\n Customer: {\n orders: (customer) => {\n const orders = [\n {id: \"o1\", customerId: \"c1\", status: \"SHIPPED\", total: 49.99},\n {id: \"o2\", customerId: \"c1\", status: \"PENDING\", total: 12.50},\n ];\n return orders.filter(o => o.customerId === customer.id);\n },\n }","expected_response":"{\"data\": {\"customer\": {\"name\": \"Dana\", \"orders\": [{\"status\": \"SHIPPED\", \"total\": 49.99}, {\"status\": \"PENDING\", \"total\": 12.5}]}}}","schema_definition":"type Order { id: ID!, status: String!, total: Float! }\ntype Customer { id: ID!, name: String!, orders: [Order!]! }\ntype Query { customer(id: ID!): Customer }"}} {"submissionId":"cmssllqc0016yjmp2tic5mx5h","title":"Submission C5MX5H","payload":{"sample_query":"{ team(slug: \"core\") { name lead { handle email } } }","resolver_code":"Query: { team: (_, { slug }) => ({ name: slug === 'core' ? 'Core Platform' : 'Unknown', slug }) },\nTeam: { lead: (team) => team.slug === 'core' ? { handle: 'nils' } : null },\nMember: { email: (m) => { if (!m.contactOk) throw new Error('email withheld'); return m.handle + '@example.com'; } }","expected_response":"{\"errors\": [{\"message\": \"email withheld\"}]}","schema_definition":"type Query { team(slug: String!): Team! }\ntype Team { name: String!, lead: Member! }\ntype Member { handle: String!, email: String! }"}} {"submissionId":"cmssllqc1016zjmp2zyxgu8ur","title":"Submission XGU8UR","payload":{"sample_query":"{ items(sort: PRICE_DESC, max: 30.5) { sku price } }","resolver_code":"Query: { items: (_, { sort, max }) => { const all = [{ sku: 'B-2', price: 30.5 }, { sku: 'A-1', price: 12.0 }, { sku: 'C-3', price: 30.5 }, { sku: 'D-4', price: 99.0 }]; const kept = max == null ? all : all.filter(i => i.price <= max); const dir = sort === 'PRICE_DESC' ? -1 : 1; return kept.slice().sort((x, y) => (x.price - y.price) * dir || x.sku.localeCompare(y.sku)); } }","expected_response":"{\"data\": {\"items\": [{\"sku\": \"B-2\", \"price\": 30.5}, {\"sku\": \"C-3\", \"price\": 30.5}, {\"sku\": \"A-1\", \"price\": 12}]}}","schema_definition":"enum Sort { PRICE_ASC PRICE_DESC }\ntype Item { sku: String!, price: Float! }\ntype Query { items(sort: Sort! = PRICE_ASC, max: Float): [Item!]! }"}} {"submissionId":"cmssllqc10170jmp2bt2202iw","title":"Submission 2202IW","payload":{"sample_query":"{ report { title rows { label value } } }","resolver_code":"Query: { report: () => ({ title: 'Q3', rows: [{ label: 'ok', value: 1 }, { label: 'bad' }] }) },\nRow: { value: (row) => { if (row.value === undefined) throw new Error('missing value for ' + row.label); return row.value; } }","expected_response":"{\"errors\": [{\"message\": \"missing value for bad\"}]}","schema_definition":"type Query { report: Report! }\ntype Report { title: String!, rows: [Row!]! }\ntype Row { label: String!, value: Int! }"}} {"submissionId":"cmssllqc10171jmp213sm58vo","title":"Submission SM58VO","payload":{"sample_query":"{ people(filter: { city: \"Pune\", minAge: 30 }) { name age } }","resolver_code":"Query: { people: (_, { filter }) => { const rows = [{ name: 'Ines', age: 41, city: 'Lisbon' }, { name: 'Raj', age: 29, city: 'Pune' }, { name: 'Mei', age: 35, city: 'Pune' }]; const f = filter || {}; return rows.filter(p => (f.minAge == null || p.age >= f.minAge) && (f.city == null || p.city === f.city)); } }","expected_response":"{\"data\": {\"people\": [{\"name\": \"Mei\", \"age\": 35}]}}","schema_definition":"input Filter { minAge: Int, city: String }\ntype Person { name: String!, age: Int!, city: String! }\ntype Query { people(filter: Filter): [Person!]! }"}} {"submissionId":"cmsslww490190jmp2xdz5hmys","title":"Submission Z5HMYS","payload":{"sample_query":"{\n post(id: \"p1\") {\n title\n author { name }\n comments {\n text\n author { name }\n }\n }\n}","resolver_code":"Query: {\n post: (_, { id }) => {\n const posts = [\n { id: \"p1\", title: \"GraphQL Basics\", body: \"An intro to GraphQL.\", authorId: \"a1\" },\n { id: \"p2\", title: \"Advanced Resolvers\", body: \"Deep dive into resolvers.\", authorId: \"a2\" }\n ];\n return posts.find(p => p.id === id) || null;\n }\n},\nPost: {\n author: (post) => {\n const authors = [ { id: \"a1\", name: \"Alice\" }, { id: \"a2\", name: \"Bob\" } ];\n return authors.find(a => a.id === post.authorId);\n },\n comments: (post) => {\n const comments = [\n { id: \"c1\", postId: \"p1\", text: \"Great post!\", authorId: \"a2\" },\n { id: \"c2\", postId: \"p1\", text: \"Thanks for sharing\", authorId: \"a1\" },\n { id: \"c3\", postId: \"p2\", text: \"Very helpful\", authorId: \"a1\" }\n ];\n return comments.filter(c => c.postId === post.id);\n }\n},\nComment: {\n author: (comment) => {\n const authors = [ { id: \"a1\", name: \"Alice\" }, { id: \"a2\", name: \"Bob\" } ];\n return authors.find(a => a.id === comment.authorId);\n }\n}","expected_response":"{\"data\": {\"post\": {\"title\": \"GraphQL Basics\", \"author\": {\"name\": \"Alice\"}, \"comments\": [{\"text\": \"Great post!\", \"author\": {\"name\": \"Bob\"}}, {\"text\": \"Thanks for sharing\", \"author\": {\"name\": \"Alice\"}}]}}}","schema_definition":"type Author {\n id: ID!\n name: String!\n}\n\ntype Comment {\n id: ID!\n text: String!\n author: Author!\n}\n\ntype Post {\n id: ID!\n title: String!\n body: String!\n author: Author!\n comments: [Comment!]!\n}\n\ntype Query {\n post(id: ID!): Post\n}"}} {"submissionId":"cmsslww490191jmp22wckxowr","title":"Submission CKXOWR","payload":{"sample_query":"{ posts(status: PUBLISHED) { title status } }","resolver_code":"Query: {\n posts: (_, { status }) => {\n const posts = [\n { id: \"1\", title: \"Draft One\", status: \"DRAFT\" },\n { id: \"2\", title: \"Live Post\", status: \"PUBLISHED\" },\n { id: \"3\", title: \"Another Live\", status: \"PUBLISHED\" },\n { id: \"4\", title: \"Old Post\", status: \"ARCHIVED\" }\n ];\n if (status) {\n return posts.filter(p => p.status === status);\n }\n return posts;\n }\n}","expected_response":"{\"data\": {\"posts\": [{\"title\": \"Live Post\", \"status\": \"PUBLISHED\"}, {\"title\": \"Another Live\", \"status\": \"PUBLISHED\"}]}}","schema_definition":"enum PostStatus {\n DRAFT\n PUBLISHED\n ARCHIVED\n}\n\ntype Post {\n id: ID!\n title: String!\n status: PostStatus!\n}\n\ntype Query {\n posts(status: PostStatus): [Post!]!\n}"}} {"submissionId":"cmsslww490192jmp2n703jjjy","title":"Submission 03JJJY","payload":{"sample_query":"{ products(category: \"Home\", inStock: true) { name price } }","resolver_code":"Query: {\n products: (_, { category, inStock }) => {\n const products = [\n { id: \"1\", name: \"Widget\", category: \"Tools\", price: 9.99, inStock: true },\n { id: \"2\", name: \"Gadget\", category: \"Tools\", price: 19.99, inStock: false },\n { id: \"3\", name: \"Lamp\", category: \"Home\", price: 29.99, inStock: true },\n { id: \"4\", name: \"Mug\", category: \"Home\", price: 4.99, inStock: true }\n ];\n return products.filter(p =>\n (category === undefined || p.category === category) &&\n (inStock === undefined || p.inStock === inStock)\n );\n }\n}","expected_response":"{\"data\": {\"products\": [{\"name\": \"Lamp\", \"price\": 29.99}, {\"name\": \"Mug\", \"price\": 4.99}]}}","schema_definition":"type Product {\n id: ID!\n name: String!\n category: String!\n price: Float!\n inStock: Boolean!\n}\n\ntype Query {\n products(category: String, inStock: Boolean): [Product!]!\n}"}} {"submissionId":"cmsslww490193jmp29adf1dej","title":"Submission DF1DEJ","payload":{"sample_query":"mutation {\n placeOrder(productId: \"prod1\", quantity: 2) {\n order {\n id\n total\n lines {\n quantity\n product { name price }\n }\n }\n }\n}","resolver_code":"Mutation: {\n placeOrder: (_, { productId, quantity }) => {\n const products = [\n { id: \"prod1\", name: \"Keyboard\", price: 49.5, stock: 3 },\n { id: \"prod2\", name: \"Mouse\", price: 20.0, stock: 0 }\n ];\n const product = products.find(p => p.id === productId);\n if (!product) {\n throw new Error(\"Product not found\");\n }\n if (product.stock < quantity) {\n throw new Error(\"Insufficient stock\");\n }\n const total = product.price * quantity;\n return { order: { id: \"order-1\", total, lines: [{ product, quantity }] } };\n }\n},\nQuery: {\n _empty: () => null\n}","expected_response":"{\"data\": {\"placeOrder\": {\"order\": {\"id\": \"order-1\", \"total\": 99, \"lines\": [{\"quantity\": 2, \"product\": {\"name\": \"Keyboard\", \"price\": 49.5}}]}}}}","schema_definition":"type Product {\n id: ID!\n name: String!\n price: Float!\n stock: Int!\n}\n\ntype OrderLine {\n product: Product!\n quantity: Int!\n}\n\ntype Order {\n id: ID!\n lines: [OrderLine!]!\n total: Float!\n}\n\ntype OrderPayload {\n order: Order!\n}\n\ntype Mutation {\n placeOrder(productId: ID!, quantity: Int!): OrderPayload!\n}\n\ntype Query {\n _empty: String\n}"}} {"submissionId":"cmsslww490194jmp2dhbprsox","title":"Submission BPRSOX","payload":{"sample_query":"mutation {\n buyItem(itemId: \"sku2\", qty: 5) {\n purchase { id grandTotal }\n }\n}","resolver_code":"Mutation: {\n buyItem: (_, { itemId, qty }) => {\n const items = [\n { id: \"sku1\", title: \"Notebook\", unitPrice: 3.5, quantityAvailable: 5 },\n { id: \"sku2\", title: \"Pen\", unitPrice: 1.25, quantityAvailable: 2 }\n ];\n const item = items.find(i => i.id === itemId);\n if (!item) {\n throw new Error(\"Item not found\");\n }\n if (qty > item.quantityAvailable) {\n throw new Error(\"Requested quantity exceeds available stock\");\n }\n return { purchase: { id: \"purchase-1\", grandTotal: item.unitPrice * qty, lines: [{ item, qty }] } };\n }\n},\nQuery: {\n ping: () => \"pong\"\n}","expected_response":"{\"errors\": [{\"message\": \"Requested quantity exceeds available stock\"}]}","schema_definition":"type Item {\n id: ID!\n title: String!\n unitPrice: Float!\n quantityAvailable: Int!\n}\n\ntype PurchaseLine {\n item: Item!\n qty: Int!\n}\n\ntype Purchase {\n id: ID!\n lines: [PurchaseLine!]!\n grandTotal: Float!\n}\n\ntype PurchaseResult {\n purchase: Purchase!\n}\n\ntype Mutation {\n buyItem(itemId: ID!, qty: Int!): PurchaseResult!\n}\n\ntype Query {\n ping: String\n}"}} {"submissionId":"cmsslww490195jmp2tt3vdxp1","title":"Submission 3VDXP1","payload":{"sample_query":"{ products(offset: 1, limit: 2) { name price } }","resolver_code":"Query: {\n products: (_, { offset, limit }) => {\n const products = [\n { id: \"1\", name: \"Alpha\", price: 5.0 },\n { id: \"2\", name: \"Beta\", price: 8.5 },\n { id: \"3\", name: \"Gamma\", price: 12.0 },\n { id: \"4\", name: \"Delta\", price: 3.25 },\n { id: \"5\", name: \"Epsilon\", price: 20.0 }\n ];\n return products.slice(offset, offset + limit);\n }\n}","expected_response":"{\"data\": {\"products\": [{\"name\": \"Beta\", \"price\": 8.5}, {\"name\": \"Gamma\", \"price\": 12}]}}","schema_definition":"type Product {\n id: ID!\n name: String!\n price: Float!\n}\n\ntype Query {\n products(offset: Int = 0, limit: Int = 10): [Product!]!\n}"}} {"submissionId":"cmsslww4a0198jmp258g9r3mx","title":"Submission G9R3MX","payload":{"sample_query":"{\n comments(postId: \"post1\", first: 2, after: \"c1\") {\n edges { cursor node { text } }\n pageInfo { hasNextPage endCursor }\n }\n}","resolver_code":"Query: {\n comments: (_, { postId, first, after }) => {\n const allComments = [\n { id: \"c1\", postId: \"post1\", text: \"First!\" },\n { id: \"c2\", postId: \"post1\", text: \"Nice article\" },\n { id: \"c3\", postId: \"post1\", text: \"Learned a lot\" },\n { id: \"c4\", postId: \"post1\", text: \"Thanks for this\" }\n ];\n const filtered = allComments.filter(c => c.postId === postId);\n const startIndex = after ? filtered.findIndex(c => c.id === after) + 1 : 0;\n const page = filtered.slice(startIndex, startIndex + first);\n const edges = page.map(c => ({ cursor: c.id, node: c }));\n const hasNextPage = startIndex + first < filtered.length;\n const endCursor = edges.length > 0 ? edges[edges.length - 1].cursor : null;\n return { edges, pageInfo: { hasNextPage, endCursor } };\n }\n}","expected_response":"{\"data\": {\"comments\": {\"edges\": [{\"cursor\": \"c2\", \"node\": {\"text\": \"Nice article\"}}, {\"cursor\": \"c3\", \"node\": {\"text\": \"Learned a lot\"}}], \"pageInfo\": {\"hasNextPage\": true, \"endCursor\": \"c3\"}}}}","schema_definition":"type Comment {\n id: ID!\n text: String!\n}\n\ntype CommentEdge {\n cursor: String!\n node: Comment!\n}\n\ntype PageInfo {\n hasNextPage: Boolean!\n endCursor: String\n}\n\ntype CommentConnection {\n edges: [CommentEdge!]!\n pageInfo: PageInfo!\n}\n\ntype Query {\n comments(postId: ID!, first: Int!, after: String): CommentConnection!\n}"}} {"submissionId":"cmsslww4a0199jmp2zh5g4dw8","title":"Submission 5G4DW8","payload":{"sample_query":"mutation {\n updateTaskStatus(taskId: \"t2\", newStatus: IN_PROGRESS) {\n id\n status\n }\n}","resolver_code":"Mutation: {\n updateTaskStatus: (_, { taskId, newStatus }) => {\n const tasks = [\n { id: \"t1\", title: \"Write docs\", status: \"TODO\" },\n { id: \"t2\", title: \"Fix bug\", status: \"DONE\" }\n ];\n const task = tasks.find(t => t.id === taskId);\n if (!task) {\n throw new Error(\"Task not found\");\n }\n const allowedTransitions = { TODO: [\"IN_PROGRESS\"], IN_PROGRESS: [\"DONE\", \"TODO\"], DONE: [] };\n if (!allowedTransitions[task.status].includes(newStatus)) {\n throw new Error(`Cannot transition task from ${task.status} to ${newStatus}`);\n }\n task.status = newStatus;\n return task;\n }\n},\nQuery: {\n task: (_, { id }) => {\n const tasks = [\n { id: \"t1\", title: \"Write docs\", status: \"TODO\" },\n { id: \"t2\", title: \"Fix bug\", status: \"DONE\" }\n ];\n return tasks.find(t => t.id === id) || null;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"Cannot transition task from DONE to IN_PROGRESS\"}]}","schema_definition":"enum TaskStatus {\n TODO\n IN_PROGRESS\n DONE\n}\n\ntype Task {\n id: ID!\n title: String!\n status: TaskStatus!\n}\n\ntype Mutation {\n updateTaskStatus(taskId: ID!, newStatus: TaskStatus!): Task!\n}\n\ntype Query {\n task(id: ID!): Task\n}"}} {"submissionId":"cmsslww4a019ajmp2a0slq1eb","title":"Submission SLQ1EB","payload":{"sample_query":"{\n project(id: \"proj1\") {\n name\n tasks(assigneeId: \"u1\") {\n title\n assignee { name }\n }\n }\n}","resolver_code":"Query: {\n project: (_, { id }) => {\n const projects = [ { id: \"proj1\", name: \"Website Revamp\" } ];\n return projects.find(p => p.id === id) || null;\n }\n},\nProject: {\n tasks: (project, { assigneeId }) => {\n const tasks = [\n { id: \"t1\", projectId: \"proj1\", title: \"Design mockups\", assigneeId: \"u1\" },\n { id: \"t2\", projectId: \"proj1\", title: \"Build backend\", assigneeId: \"u2\" },\n { id: \"t3\", projectId: \"proj1\", title: \"Write copy\", assigneeId: \"u1\" },\n { id: \"t4\", projectId: \"proj1\", title: \"QA testing\", assigneeId: null }\n ];\n let result = tasks.filter(t => t.projectId === project.id);\n if (assigneeId) {\n result = result.filter(t => t.assigneeId === assigneeId);\n }\n return result;\n }\n},\nTask: {\n assignee: (task) => {\n if (!task.assigneeId) return null;\n const users = [ { id: \"u1\", name: \"Priya\" }, { id: \"u2\", name: \"Mateo\" } ];\n return users.find(u => u.id === task.assigneeId) || null;\n }\n}","expected_response":"{\"data\": {\"project\": {\"name\": \"Website Revamp\", \"tasks\": [{\"title\": \"Design mockups\", \"assignee\": {\"name\": \"Priya\"}}, {\"title\": \"Write copy\", \"assignee\": {\"name\": \"Priya\"}}]}}}","schema_definition":"type User {\n id: ID!\n name: String!\n}\n\ntype Task {\n id: ID!\n title: String!\n assignee: User\n}\n\ntype Project {\n id: ID!\n name: String!\n tasks(assigneeId: ID): [Task!]!\n}\n\ntype Query {\n project(id: ID!): Project\n}"}} {"submissionId":"cmsslww4a019bjmp24wi1mve5","title":"Submission I1MVE5","payload":{"sample_query":"{\n author(id: \"a1\") {\n name\n bookCount\n books {\n title\n authors { name }\n }\n }\n}","resolver_code":"Query: {\n author: (_, { id }) => {\n const authors = [ { id: \"a1\", name: \"J. Rowe\" }, { id: \"a2\", name: \"K. Stone\" } ];\n return authors.find(a => a.id === id) || null;\n }\n},\nAuthor: {\n books: (author) => {\n const bookAuthors = [ { bookId: \"b1\", authorId: \"a1\" }, { bookId: \"b2\", authorId: \"a1\" }, { bookId: \"b2\", authorId: \"a2\" }, { bookId: \"b3\", authorId: \"a2\" } ];\n const books = [ { id: \"b1\", title: \"The Long Path\" }, { id: \"b2\", title: \"Coauthored Tales\" }, { id: \"b3\", title: \"Stone Cold\" } ];\n const ids = bookAuthors.filter(ba => ba.authorId === author.id).map(ba => ba.bookId);\n return books.filter(b => ids.includes(b.id));\n },\n bookCount: (author) => {\n const bookAuthors = [ { bookId: \"b1\", authorId: \"a1\" }, { bookId: \"b2\", authorId: \"a1\" }, { bookId: \"b2\", authorId: \"a2\" }, { bookId: \"b3\", authorId: \"a2\" } ];\n return bookAuthors.filter(ba => ba.authorId === author.id).length;\n }\n},\nBook: {\n authors: (book) => {\n const bookAuthors = [ { bookId: \"b1\", authorId: \"a1\" }, { bookId: \"b2\", authorId: \"a1\" }, { bookId: \"b2\", authorId: \"a2\" }, { bookId: \"b3\", authorId: \"a2\" } ];\n const authors = [ { id: \"a1\", name: \"J. Rowe\" }, { id: \"a2\", name: \"K. Stone\" } ];\n const ids = bookAuthors.filter(ba => ba.bookId === book.id).map(ba => ba.authorId);\n return authors.filter(a => ids.includes(a.id));\n }\n}","expected_response":"{\"data\": {\"author\": {\"name\": \"J. Rowe\", \"bookCount\": 2, \"books\": [{\"title\": \"The Long Path\", \"authors\": [{\"name\": \"J. Rowe\"}]}, {\"title\": \"Coauthored Tales\", \"authors\": [{\"name\": \"J. Rowe\"}, {\"name\": \"K. Stone\"}]}]}}}","schema_definition":"type Author {\n id: ID!\n name: String!\n books: [Book!]!\n bookCount: Int!\n}\n\ntype Book {\n id: ID!\n title: String!\n authors: [Author!]!\n}\n\ntype Query {\n author(id: ID!): Author\n}"}} {"submissionId":"cmsslww4a019cjmp2faxulixx","title":"Submission XULIXX","payload":{"sample_query":"mutation {\n checkoutBook(bookId: \"b2\") {\n title\n checkedOut\n dueDate\n }\n}","resolver_code":"Mutation: {\n checkoutBook: (_, { bookId }) => {\n const books = [\n { id: \"b1\", title: \"The Long Path\", checkedOut: false, dueDate: null },\n { id: \"b2\", title: \"Coauthored Tales\", checkedOut: true, dueDate: \"2026-09-01\" }\n ];\n const book = books.find(b => b.id === bookId);\n if (!book) {\n throw new Error(\"Book not found\");\n }\n if (book.checkedOut) {\n throw new Error(\"Book is already checked out\");\n }\n book.checkedOut = true;\n book.dueDate = \"2026-09-15\";\n return book;\n }\n},\nQuery: {\n book: (_, { id }) => {\n const books = [\n { id: \"b1\", title: \"The Long Path\", checkedOut: false, dueDate: null },\n { id: \"b2\", title: \"Coauthored Tales\", checkedOut: true, dueDate: \"2026-09-01\" }\n ];\n return books.find(b => b.id === id) || null;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"Book is already checked out\"}]}","schema_definition":"type Book {\n id: ID!\n title: String!\n checkedOut: Boolean!\n dueDate: String\n}\n\ntype Mutation {\n checkoutBook(bookId: ID!): Book!\n}\n\ntype Query {\n book(id: ID!): Book\n}"}} {"submissionId":"cmsslww4a019djmp28mzlngw2","title":"Submission ZLNGW2","payload":{"sample_query":"mutation {\n sendMessage(channelId: \"ch1\", senderId: \"u2\", text: \"Good morning\") {\n message {\n text\n sender { username }\n }\n channel {\n name\n messages { text }\n }\n }\n}","resolver_code":"Query: {\n channel: (_, { id }) => {\n const channels = [ { id: \"ch1\", name: \"general\" } ];\n return channels.find(c => c.id === id) || null;\n }\n},\nChannel: {\n messages: (channel) => {\n const messages = [\n { id: \"m1\", channelId: \"ch1\", text: \"Welcome!\", senderId: \"u1\" },\n { id: \"m2\", channelId: \"ch1\", text: \"Thanks!\", senderId: \"u2\" }\n ];\n return messages.filter(m => m.channelId === channel.id);\n }\n},\nMessage: {\n sender: (message) => {\n const users = [ { id: \"u1\", username: \"kai\" }, { id: \"u2\", username: \"reese\" } ];\n return users.find(u => u.id === message.senderId);\n }\n},\nMutation: {\n sendMessage: (_, { channelId, senderId, text }) => {\n const channels = [ { id: \"ch1\", name: \"general\" } ];\n const channel = channels.find(c => c.id === channelId);\n if (!channel) {\n throw new Error(\"Channel not found\");\n }\n const users = [ { id: \"u1\", username: \"kai\" }, { id: \"u2\", username: \"reese\" } ];\n const sender = users.find(u => u.id === senderId);\n if (!sender) {\n throw new Error(\"Sender not found\");\n }\n const newMessage = { id: \"m3\", channelId, text, senderId };\n return { message: newMessage, channel };\n }\n}","expected_response":"{\"data\": {\"sendMessage\": {\"message\": {\"text\": \"Good morning\", \"sender\": {\"username\": \"reese\"}}, \"channel\": {\"name\": \"general\", \"messages\": [{\"text\": \"Welcome!\"}, {\"text\": \"Thanks!\"}]}}}}","schema_definition":"type User {\n id: ID!\n username: String!\n}\n\ntype Message {\n id: ID!\n text: String!\n sender: User!\n}\n\ntype Channel {\n id: ID!\n name: String!\n messages: [Message!]!\n}\n\ntype SendMessagePayload {\n message: Message!\n channel: Channel!\n}\n\ntype Mutation {\n sendMessage(channelId: ID!, senderId: ID!, text: String!): SendMessagePayload!\n}\n\ntype Query {\n channel(id: ID!): Channel\n}"}} {"submissionId":"cmsslww4a019ejmp2qfp4qq6m","title":"Submission P4QQ6M","payload":{"sample_query":"{ profile(userId: \"u9\") { displayName bio } }","resolver_code":"Query: {\n profile: (_, { userId }) => {\n const profiles = [\n { id: \"u1\", displayName: \"Kai Nomura\", bio: \"Loves climbing\" },\n { id: \"u2\", displayName: \"Reese Okoye\", bio: null }\n ];\n const profile = profiles.find(p => p.id === userId);\n if (!profile) {\n throw new Error(`No profile found for user ${userId}`);\n }\n return profile;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"No profile found for user u9\"}]}","schema_definition":"type Profile {\n id: ID!\n displayName: String!\n bio: String\n}\n\ntype Query {\n profile(userId: ID!): Profile!\n}"}} {"submissionId":"cmsslww4a019gjmp25x6u886i","title":"Submission 6U886I","payload":{"sample_query":"mutation { requestRide(pickupZone: \"midtown\") { id driver { name } } }","resolver_code":"Mutation: {\n requestRide: (_, { pickupZone }) => {\n const drivers = [\n { id: \"d1\", name: \"Femi\", available: true, zone: \"downtown\" },\n { id: \"d2\", name: \"Lola\", available: false, zone: \"downtown\" },\n { id: \"d3\", name: \"Ade\", available: true, zone: \"uptown\" }\n ];\n const candidates = drivers.filter(d => d.zone === pickupZone && d.available);\n if (candidates.length === 0) {\n throw new Error(`No available drivers in zone ${pickupZone}`);\n }\n return { id: \"req1\", pickupZone, driver: candidates[0] };\n }\n},\nQuery: {\n drivers: (_, { zone }) => {\n const drivers = [\n { id: \"d1\", name: \"Femi\", available: true, zone: \"downtown\" },\n { id: \"d2\", name: \"Lola\", available: false, zone: \"downtown\" },\n { id: \"d3\", name: \"Ade\", available: true, zone: \"uptown\" }\n ];\n return drivers.filter(d => d.zone === zone);\n }\n}","expected_response":"{\"errors\": [{\"message\": \"No available drivers in zone midtown\"}]}","schema_definition":"type Driver {\n id: ID!\n name: String!\n available: Boolean!\n}\n\ntype RideRequest {\n id: ID!\n pickupZone: String!\n driver: Driver!\n}\n\ntype Mutation {\n requestRide(pickupZone: String!): RideRequest!\n}\n\ntype Query {\n drivers(zone: String!): [Driver!]!\n}"}} {"submissionId":"cmsslww4a019hjmp2kcvr2cnn","title":"Submission VR2CNN","payload":{"sample_query":"mutation {\n transferFunds(fromId: \"acc2\", toId: \"acc1\", amount: 75.0) {\n from { owner balance }\n to { owner balance }\n }\n}","resolver_code":"Mutation: {\n transferFunds: (_, { fromId, toId, amount }) => {\n const accounts = [ { id: \"acc1\", owner: \"Dana\", balance: 150.0 }, { id: \"acc2\", owner: \"Marco\", balance: 40.0 } ];\n const from = accounts.find(a => a.id === fromId);\n const to = accounts.find(a => a.id === toId);\n if (!from || !to) {\n throw new Error(\"Account not found\");\n }\n if (from.balance < amount) {\n throw new Error(\"Insufficient funds\");\n }\n from.balance -= amount;\n to.balance += amount;\n return { from, to };\n }\n},\nQuery: {\n account: (_, { id }) => {\n const accounts = [ { id: \"acc1\", owner: \"Dana\", balance: 150.0 }, { id: \"acc2\", owner: \"Marco\", balance: 40.0 } ];\n return accounts.find(a => a.id === id) || null;\n }\n},\nAccount: {\n transactions: (account) => {\n const transactions = [\n { id: \"tx1\", accountId: \"acc1\", amount: -20.0, type: \"DEBIT\" },\n { id: \"tx2\", accountId: \"acc1\", amount: 100.0, type: \"CREDIT\" },\n { id: \"tx3\", accountId: \"acc2\", amount: -10.0, type: \"DEBIT\" }\n ];\n return transactions.filter(t => t.accountId === account.id);\n }\n}","expected_response":"{\"errors\": [{\"message\": \"Insufficient funds\"}]}","schema_definition":"type Transaction {\n id: ID!\n amount: Float!\n type: String!\n}\n\ntype Account {\n id: ID!\n owner: String!\n balance: Float!\n transactions: [Transaction!]!\n}\n\ntype TransferPayload {\n from: Account!\n to: Account!\n}\n\ntype Mutation {\n transferFunds(fromId: ID!, toId: ID!, amount: Float!): TransferPayload!\n}\n\ntype Query {\n account(id: ID!): Account\n}"}} {"submissionId":"cmsslww4a019ijmp2g2zyqe4w","title":"Submission ZYQE4W","payload":{"sample_query":"{\n device(id: \"dev1\") {\n name\n lastSeen\n sensors {\n type\n readings(minValue: 20) { timestamp value }\n }\n }\n}","resolver_code":"Query: {\n device: (_, { id }) => {\n const devices = [\n { id: \"dev1\", name: \"Greenhouse Node\", lastSeen: \"2026-08-14T10:00:00Z\" },\n { id: \"dev2\", name: \"Offline Node\", lastSeen: null }\n ];\n return devices.find(d => d.id === id) || null;\n }\n},\nDevice: {\n sensors: (device) => {\n const sensors = [ { id: \"s1\", deviceId: \"dev1\", type: \"TEMPERATURE\" }, { id: \"s2\", deviceId: \"dev1\", type: \"HUMIDITY\" } ];\n return sensors.filter(s => s.deviceId === device.id);\n }\n},\nSensor: {\n readings: (sensor, { minValue }) => {\n const readings = [\n { sensorId: \"s1\", timestamp: \"10:00\", value: 21.5 },\n { sensorId: \"s1\", timestamp: \"10:05\", value: 23.0 },\n { sensorId: \"s1\", timestamp: \"10:10\", value: 19.8 },\n { sensorId: \"s2\", timestamp: \"10:00\", value: 55.0 }\n ];\n let result = readings.filter(r => r.sensorId === sensor.id);\n if (minValue !== undefined && minValue !== null) {\n result = result.filter(r => r.value >= minValue);\n }\n return result;\n }\n}","expected_response":"{\"data\": {\"device\": {\"name\": \"Greenhouse Node\", \"lastSeen\": \"2026-08-14T10:00:00Z\", \"sensors\": [{\"type\": \"TEMPERATURE\", \"readings\": [{\"timestamp\": \"10:00\", \"value\": 21.5}, {\"timestamp\": \"10:05\", \"value\": 23}]}, {\"type\": \"HUMIDITY\", \"readings\": [{\"timestamp\": \"10:00\", \"value\": 55}]}]}}}","schema_definition":"type Reading {\n timestamp: String!\n value: Float!\n}\n\ntype Sensor {\n id: ID!\n type: String!\n readings(minValue: Float): [Reading!]!\n}\n\ntype Device {\n id: ID!\n name: String!\n lastSeen: String\n sensors: [Sensor!]!\n}\n\ntype Query {\n device(id: ID!): Device\n}"}} {"submissionId":"cmsslww4a019jjmp2rxgp698s","title":"Submission GP698S","payload":{"sample_query":"{\n recipes(tag: \"vegan\") {\n title\n totalCalories\n ingredients { name calories }\n }\n}","resolver_code":"Query: {\n recipes: (_, { tag }) => {\n const recipes = [\n { id: \"r1\", title: \"Veggie Stir Fry\", tags: [\"vegan\", \"quick\"] },\n { id: \"r2\", title: \"Chicken Curry\", tags: [\"gluten-free\"] },\n { id: \"r3\", title: \"Lentil Soup\", tags: [\"vegan\", \"gluten-free\"] }\n ];\n if (tag) {\n return recipes.filter(r => r.tags.includes(tag));\n }\n return recipes;\n }\n},\nRecipe: {\n ingredients: (recipe) => {\n const ingredientsByRecipe = {\n r1: [{ name: \"Broccoli\", calories: 55 }, { name: \"Tofu\", calories: 140 }],\n r2: [{ name: \"Chicken\", calories: 335 }, { name: \"Rice\", calories: 205 }],\n r3: [{ name: \"Lentils\", calories: 230 }, { name: \"Carrot\", calories: 25 }]\n };\n return ingredientsByRecipe[recipe.id] || [];\n },\n totalCalories: (recipe) => {\n const ingredientsByRecipe = {\n r1: [{ name: \"Broccoli\", calories: 55 }, { name: \"Tofu\", calories: 140 }],\n r2: [{ name: \"Chicken\", calories: 335 }, { name: \"Rice\", calories: 205 }],\n r3: [{ name: \"Lentils\", calories: 230 }, { name: \"Carrot\", calories: 25 }]\n };\n const list = ingredientsByRecipe[recipe.id] || [];\n return list.reduce((sum, i) => sum + i.calories, 0);\n }\n}","expected_response":"{\"data\": {\"recipes\": [{\"title\": \"Veggie Stir Fry\", \"totalCalories\": 195, \"ingredients\": [{\"name\": \"Broccoli\", \"calories\": 55}, {\"name\": \"Tofu\", \"calories\": 140}]}, {\"title\": \"Lentil Soup\", \"totalCalories\": 255, \"ingredients\": [{\"name\": \"Lentils\", \"calories\": 230}, {\"name\": \"Carrot\", \"calories\": 25}]}]}}","schema_definition":"type Ingredient {\n name: String!\n calories: Int!\n}\n\ntype Recipe {\n id: ID!\n title: String!\n tags: [String!]!\n ingredients: [Ingredient!]!\n totalCalories: Int!\n}\n\ntype Query {\n recipes(tag: String): [Recipe!]!\n}"}} {"submissionId":"cmssm5nqf01bxjmp2u4p8jhi2","title":"Submission P8JHI2","payload":{"sample_query":"{ books { title year } }","resolver_code":"Query: { books: (_, {minYear}) => [{id: \"1\", title: \"Neuromancer\", year: 1984}, {id: \"2\", title: \"Snow Crash\", year: 1992}, {id: \"3\", title: \"Ready Player One\", year: 2011}].filter(b => b.year >= minYear) }","expected_response":"{\"data\": {\"books\": [{\"title\": \"Ready Player One\", \"year\": 2011}]}}","schema_definition":"type Book { id: ID!, title: String!, year: Int! }\ntype Query { books(minYear: Int = 2000): [Book!]! }"}} {"submissionId":"cmssm5nqf01byjmp2ub5p1h8o","title":"Submission 5P1H8O","payload":{"sample_query":"{ squareRoot(n: -4) }","resolver_code":"Query: { squareRoot: (_, {n}) => { if (n < 0) throw new Error('cannot take square root of negative number'); return Math.sqrt(n); } }","expected_response":"{\"errors\": [{\"message\": \"cannot take square root of negative number\"}]}","schema_definition":"type Query { squareRoot(n: Float!): Float! }"}} {"submissionId":"cmssm5nqf01bzjmp252j0g8qn","title":"Submission J0G8QN","payload":{"sample_query":"{ booksByAuthor(name: \"Frank Herbert\") { title author { name } } }","resolver_code":"Query: {\n booksByAuthor: (_, {name}) => {\n const books = [\n {title: \"Dune\", authorName: \"Frank Herbert\"},\n {title: \"Dune Messiah\", authorName: \"Frank Herbert\"},\n {title: \"Foundation\", authorName: \"Isaac Asimov\"}\n ];\n return books.filter(b => b.authorName === name).map(b => ({title: b.title, author: {name: b.authorName}}));\n }\n}","expected_response":"{\"data\": {\"booksByAuthor\": [{\"title\": \"Dune\", \"author\": {\"name\": \"Frank Herbert\"}}, {\"title\": \"Dune Messiah\", \"author\": {\"name\": \"Frank Herbert\"}}]}}","schema_definition":"type Author { name: String! }\ntype Book { title: String!, author: Author! }\ntype Query { booksByAuthor(name: String!): [Book!]! }"}} {"submissionId":"cmssm5nqf01c0jmp2omrkqvk1","title":"Submission RKQVK1","payload":{"sample_query":"{ tasksByStatus(status: ACTIVE) { id status } }","resolver_code":"Query: {\n tasksByStatus: (_, {status}) => {\n const tasks = [\n {id: \"1\", status: \"ACTIVE\"},\n {id: \"2\", status: \"PENDING\"},\n {id: \"3\", status: \"ACTIVE\"}\n ];\n return tasks.filter(t => t.status === status);\n }\n}","expected_response":"{\"data\": {\"tasksByStatus\": [{\"id\": \"1\", \"status\": \"ACTIVE\"}, {\"id\": \"3\", \"status\": \"ACTIVE\"}]}}","schema_definition":"enum Status { ACTIVE, INACTIVE, PENDING }\ntype Task { id: ID!, status: Status! }\ntype Query { tasksByStatus(status: Status!): [Task!]! }"}} {"submissionId":"cmssm5nqf01c1jmp27hmtxn4n","title":"Submission MTXN4N","payload":{"sample_query":"{ user(id: \"2\") { name profile { bio } } }","resolver_code":"Query: {\n user: (_, {id}) => {\n const users = { \"1\": {id: \"1\", name: \"Grace\", profile: {bio: \"Computer scientist\"}}, \"2\": {id: \"2\", name: \"Alan\", profile: null} };\n return users[id] || null;\n }\n}","expected_response":"{\"data\": {\"user\": {\"name\": \"Alan\", \"profile\": null}}}","schema_definition":"type Profile { bio: String }\ntype User { id: ID!, name: String!, profile: Profile }\ntype Query { user(id: ID!): User }"}} {"submissionId":"cmssqhjyy004gg4p2bo5x6do4","title":"Submission 5X6DO4","payload":{"sample_query":"{ account(id: \"2\") { id label } }","resolver_code":"Query: { account: (_, {id}) => ({ id, label: id === '2' ? null : 'Main ' + id }) }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Account.label.\"}],\"data\":{\"account\":null}}","schema_definition":"type Account { id: ID!, label: String! }\ntype Query { account(id: ID!): Account }"}} {"submissionId":"cmssqhjyy004hg4p2r2icbj6u","title":"Submission ICBJ6U","payload":{"sample_query":"{ items { name weight } }","resolver_code":"Query: { items: () => [{name: 'a', weight: 1}, {name: 'b', weight: 2}] },\nItem: { weight: (item) => { if (item.name === 'b') throw new Error('weight unavailable for b'); return item.weight; } }","expected_response":"{\"errors\":[{\"message\":\"weight unavailable for b\"}],\"data\":{\"items\":[{\"name\":\"a\",\"weight\":1},{\"name\":\"b\",\"weight\":null}]}}","schema_definition":"type Item { name: String!, weight: Int }\ntype Query { items: [Item] }"}} {"submissionId":"cmssqhjyy004ig4p2n1shrydn","title":"Submission SHRYDN","payload":{"sample_query":"{ regions { code capital { name population } } }","resolver_code":"Query: { regions: () => [{code: 'nw', capital: {name: 'Alpha', population: 120}}, {code: 'se', capital: {name: 'Beta'}}] },\nCity: { population: (city) => city.population === undefined ? null : city.population }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field City.population.\"}],\"data\":null}","schema_definition":"type Region { code: String!, capital: City! }\ntype City { name: String!, population: Int! }\ntype Query { regions: [Region!]! }"}} {"submissionId":"cmssqhjyy004jg4p2xs4addno","title":"Submission 4ADDNO","payload":{"sample_query":"{ stage(step: 3) }","resolver_code":"Query: { stage: (_, {step}) => ['DRAFT','REVIEW','LIVE','ARCHIVED'][step] }","expected_response":"{\"errors\":[{\"message\":\"Enum \\\"Stage\\\" cannot represent value: \\\"ARCHIVED\\\"\"}],\"data\":null}","schema_definition":"enum Stage { DRAFT REVIEW LIVE }\ntype Query { stage(step: Int!): Stage! }"}} {"submissionId":"cmssqhjyy004kg4p2wbvudyv3","title":"Submission VUDYV3","payload":{"sample_query":"{ slice(items: [\"a\",\"b\",\"c\",\"d\"]) }","resolver_code":"Query: { slice: (_, {items, limit}) => items.slice(0, limit) }","expected_response":"{\"data\":{\"slice\":[\"a\",\"b\"]}}","schema_definition":"type Query { slice(items: [String!]!, limit: Int = 2): [String!]! }"}} {"submissionId":"cmssqhjyy004lg4p2c2ifwwe8","title":"Submission IFWWE8","payload":{"sample_query":"query { invoice { id net: subtotal { ...M } vat: tax { ...M } } } fragment M on Money { amount currency }","resolver_code":"Query: { invoice: () => ({id: 'inv-9', subtotal: {amount: 1000, currency: 'USD'}, tax: {amount: 85, currency: 'USD'}}) }","expected_response":"{\"data\":{\"invoice\":{\"id\":\"inv-9\",\"net\":{\"amount\":1000,\"currency\":\"USD\"},\"vat\":{\"amount\":85,\"currency\":\"USD\"}}}}","schema_definition":"type Money { amount: Int!, currency: String! }\ntype Invoice { id: ID!, subtotal: Money!, tax: Money! }\ntype Query { invoice: Invoice! }"}} {"submissionId":"cmssqhjyy004mg4p2o5zawn55","title":"Submission ZAWN55","payload":{"sample_query":"{ ratio(a: 7, b: 2) }","resolver_code":"Query: { ratio: (_, {a, b}) => a / b }","expected_response":"{\"errors\":[{\"message\":\"Int cannot represent non-integer value: 3.5\"}],\"data\":null}","schema_definition":"type Query { ratio(a: Int!, b: Int!): Int! }"}} {"submissionId":"cmssqhjyy004ng4p261xvgopd","title":"Submission XVGOPD","payload":{"sample_query":"mutation { addUser(input: {name: \"Ida\", age: -1}) { name age } }","resolver_code":"Query: { _empty: () => null },\nMutation: { addUser: (_, {input}) => { if (input.age < 0) throw new Error('age must be non-negative'); return input; } }","expected_response":"{\"errors\":[{\"message\":\"age must be non-negative\"}],\"data\":null}","schema_definition":"input NewUser { name: String!, age: Int! }\ntype User { name: String!, age: Int! }\ntype Mutation { addUser(input: NewUser!): User! }\ntype Query { _empty: String }"}} {"submissionId":"cmssqhjyy004og4p28c2yx4w2","title":"Submission 2YX4W2","payload":{"sample_query":"{ report { id summary @include(if: true) detail @skip(if: true) } }","resolver_code":"Query: { report: () => ({id: 'r1', summary: 'short', detail: 'long form text'}) }","expected_response":"{\"data\":{\"report\":{\"id\":\"r1\",\"summary\":\"short\"}}}","schema_definition":"type Report { id: ID!, summary: String!, detail: String! }\ntype Query { report: Report! }"}} {"submissionId":"cmssqhjyy004pg4p25by95anl","title":"Submission Y95ANL","payload":{"sample_query":"{ matches(filters: [{field: \"a\", minValue: 3}, {field: \"b\", minValue: \"x\"}]) { field score } }","resolver_code":"Query: { matches: (_, {filters}) => filters.map(f => ({field: f.field, score: f.minValue * 10})) }","expected_response":"{\"errors\":[{\"message\":\"Int cannot represent non-integer value: \\\"x\\\"\"}]}","schema_definition":"input Filter { field: String!, minValue: Int! }\ntype Match { field: String!, score: Int! }\ntype Query { matches(filters: [Filter!]!): [Match!]! }"}} {"submissionId":"cmssqhjyy004qg4p2ncpen9t4","title":"Submission PEN9T4","payload":{"sample_query":"{ category { name parent { name parent { name parent { name } } } } }","resolver_code":"Query: { category: () => ({name: 'leaf', parent: {name: 'mid', parent: {name: 'root', parent: null}}}) }","expected_response":"{\"data\":{\"category\":{\"name\":\"leaf\",\"parent\":{\"name\":\"mid\",\"parent\":{\"name\":\"root\",\"parent\":null}}}}}","schema_definition":"type Category { name: String!, parent: Category }\ntype Query { category: Category! }"}} {"submissionId":"cmssqhjyy004rg4p2i8edtym4","title":"Submission EDTYM4","payload":{"sample_query":"{ slowSum(values: [1,2,3]) }","resolver_code":"Query: { slowSum: async (_, {values}) => { const parts = await Promise.all(values.map(async v => v * 2)); return parts.reduce((a, b) => a + b, 0); } }","expected_response":"{\"data\":{\"slowSum\":12}}","schema_definition":"type Query { slowSum(values: [Int!]!): Int! }"}} {"submissionId":"cmssqhjyy004sg4p25lsj2z2c","title":"Submission SJ2Z2C","payload":{"sample_query":"{ rows { id } }","resolver_code":"Query: { rows: () => null }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Query.rows.\"}],\"data\":null}","schema_definition":"type Row { id: ID! }\ntype Query { rows: [Row!]! }"}} {"submissionId":"cmssqhjyy004tg4p2xjn4u6vq","title":"Submission N4U6VQ","payload":{"sample_query":"{ order { id total lines { sku lineTotal } } }","resolver_code":"Query: { order: () => ({id: 'o1', lines: [{sku: 'A', qty: 2, unitPrice: 300}, {sku: 'B', qty: 1, unitPrice: 450}]}) },\nLine: { lineTotal: (line) => line.qty * line.unitPrice },\nOrder: { total: (order) => order.lines.reduce((sum, l) => sum + l.qty * l.unitPrice, 0) }","expected_response":"{\"data\":{\"order\":{\"id\":\"o1\",\"total\":1050,\"lines\":[{\"sku\":\"A\",\"lineTotal\":600},{\"sku\":\"B\",\"lineTotal\":450}]}}}","schema_definition":"type Order { id: ID!, lines: [Line!]!, total: Int! }\ntype Line { sku: String!, qty: Int!, unitPrice: Int!, lineTotal: Int! }\ntype Query { order: Order! }"}} {"submissionId":"cmssqhjyy004ug4p2a3vvp80u","title":"Submission VVP80U","payload":{"sample_query":"{ profile { handle email } }","resolver_code":"Query: { profile: () => ({handle: 'bravebooby'}) }","expected_response":"{\"errors\":[{\"message\":\"Cannot query field \\\"email\\\" on type \\\"Profile\\\".\"}]}","schema_definition":"type Profile { handle: String! }\ntype Query { profile: Profile! }"}} {"submissionId":"cmssugf2x0091g4p2pgtranyg","title":"Submission TRANYG","payload":{"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 - reserved; return { available, reorder: available < threshold, status: available === 0 ? 'OUT' : available < threshold ? 'LOW' : 'OK' }; } }","expected_response":"{\"data\":{\"inventory\":{\"available\":4,\"reorder\":true,\"status\":\"LOW\"}}}","schema_definition":"type InventoryResult { available: Int!, reorder: Boolean!, status: String! }\ntype Query { inventory(stock: Int!, reserved: Int!, threshold: Int!): InventoryResult! }"}} {"submissionId":"cmssugf2x0092g4p2wt0g4jpu","title":"Submission 0G4JPU","payload":{"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 { offset, remaining, hasNext: offset+size < total }; } }","expected_response":"{\"data\":{\"page\":{\"offset\":40,\"remaining\":0,\"hasNext\":false}}}","schema_definition":"type PageInfo { offset: Int!, remaining: Int!, hasNext: Boolean! }\ntype Query { page(total: Int!, page: Int!, size: Int!): PageInfo! }"}} {"submissionId":"cmssugf2x0093g4p2zcnbps1v","title":"Submission NBPS1V","payload":{"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: Math.max(0,limit-used), blocked: used > limit }; } }","expected_response":"{\"data\":{\"rateLimit\":{\"used\":107,\"remaining\":0,\"blocked\":true}}}","schema_definition":"type RateState { used: Int!, remaining: Int!, blocked: Boolean! }\ntype Query { rateLimit(limit: Int!, previous: Int!, incoming: Int!): RateState! }"}} {"submissionId":"cmssugf2x0094g4p2qpc6ojud","title":"Submission C6OJUD","payload":{"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=capacity-occupied; const accepted=Math.min(open,requested); return { left: open-accepted, accepted, waitlisted: requested-accepted }; } }","expected_response":"{\"data\":{\"reserve\":{\"left\":0,\"accepted\":3,\"waitlisted\":3}}}","schema_definition":"type SeatResult { left: Int!, accepted: Int!, waitlisted: Int! }\ntype Query { reserve(capacity: Int!, occupied: Int!, requested: Int!): SeatResult! }"}} {"submissionId":"cmssugf2x0095g4p2xulwvrxf","title":"Submission LWVRXF","payload":{"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(failures,maxAttempts); let totalDelay=0; for (let i=0;i= maxAttempts }; } }","expected_response":"{\"data\":{\"retry\":{\"attempts\":3,\"totalDelay\":14,\"exhausted\":false}}}","schema_definition":"type RetryPlan { attempts: Int!, totalDelay: Int!, exhausted: Boolean! }\ntype Query { retry(maxAttempts: Int!, failures: Int!, baseDelay: Int!): RetryPlan! }"}} {"submissionId":"cmssugf2y0097g4p2d0vix2q3","title":"Submission VIX2Q3","payload":{"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; const grade=total>=85?'A':total>=70?'B':total>=55?'C':'D'; return { total, passed: total>=passMark && theory>=20 && practical>=20, grade }; } }","expected_response":"{\"data\":{\"score\":{\"total\":57,\"passed\":false,\"grade\":\"C\"}}}","schema_definition":"type ScoreResult { total: Int!, passed: Boolean!, grade: String! }\ntype Query { score(theory: Int!, practical: Int!, passMark: Int!): ScoreResult! }"}} {"submissionId":"cmssugf2y0098g4p2gbajvjz6","title":"Submission AJVJZ6","payload":{"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 >= freeAt ? 0 : 40; const surcharge = weight > 10 ? (weight-10)*3 : 0; const distanceFee = distance > 100 ? 25 : 0; return { subtotal, surcharge: surcharge+distanceFee, total: subtotal+surcharge+distanceFee }; } }","expected_response":"{\"data\":{\"shipping\":{\"subtotal\":40,\"surcharge\":37,\"total\":77}}}","schema_definition":"type ShippingQuote { subtotal: Int!, surcharge: Int!, total: Int! }\ntype Query { shipping(weight: Int!, distance: Int!, freeAt: Int!, cart: Int!): ShippingQuote! }"}} {"submissionId":"cmssugf2y0099g4p2tsruebn4","title":"Submission RUEBN4","payload":{"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; const percentUsed=Math.floor(occupied*100/capacity); return { free: capacity-occupied, percentUsed, alert: percentUsed>=90?'CRITICAL':percentUsed>=75?'WARN':'OK' }; } }","expected_response":"{\"data\":{\"storage\":{\"free\":170,\"percentUsed\":83,\"alert\":\"WARN\"}}}","schema_definition":"type StorageState { free: Int!, percentUsed: Int!, alert: String! }\ntype Query { storage(capacity: Int!, used: Int!, reserved: Int!): StorageState! }"}} {"submissionId":"cmssugf2y009ag4p2az2dcw63","title":"Submission 2DCW63","payload":{"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=Math.min(slots,pending); return { runnable, delayed: pending-runnable, saturated: active===workers || pending>slots }; } }","expected_response":"{\"data\":{\"queue\":{\"runnable\":2,\"delayed\":3,\"saturated\":true}}}","schema_definition":"type QueueState { runnable: Int!, delayed: Int!, saturated: Boolean! }\ntype Query { queue(workers: Int!, active: Int!, pending: Int!): QueueState! }"}} {"submissionId":"cmssugf2y009bg4p2cx54e0e1","title":"Submission 54E0E1","payload":{"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 { start, end, clipped: offset+size > length }; } }","expected_response":"{\"data\":{\"window\":{\"start\":20,\"end\":25,\"clipped\":true}}}","schema_definition":"type WindowResult { start: Int!, end: Int!, clipped: Boolean! }\ntype Query { window(length: Int!, offset: Int!, size: Int!): WindowResult! }"}} {"submissionId":"cmssugf2y009cg4p2ts0jcee7","title":"Submission 0JCEE7","payload":{"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 shipped=Math.min(sellable,order); return { shipped, backorder: order-shipped, remainingStock: stock-shipped }; } }","expected_response":"{\"data\":{\"fulfill\":{\"shipped\":22,\"backorder\":5,\"remainingStock\":8}}}","schema_definition":"type Fulfillment { shipped: Int!, backorder: Int!, remainingStock: Int! }\ntype Query { fulfill(stock: Int!, reserved: Int!, order: Int!): Fulfillment! }"}} {"submissionId":"cmssugf2y009dg4p219ebw053","title":"Submission EBW053","payload":{"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.abs(reading-baseline); return { level: delta>=criticalDelta?'CRITICAL':delta>=warnDelta?'WARN':'OK', delta, acknowledged: delta===0 }; } }","expected_response":"{\"data\":{\"sensor\":{\"level\":\"CRITICAL\",\"delta\":42,\"acknowledged\":false}}}","schema_definition":"type Alert { level: String!, delta: Int!, acknowledged: Boolean! }\ntype Query { sensor(reading: Int!, baseline: Int!, warnDelta: Int!, criticalDelta: Int!): Alert! }"}} {"submissionId":"cmssugf2y009eg4p2q5b6y9ym","title":"Submission B6Y9YM","payload":{"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 { charged: allowed?cost:0, balance: allowed?available-cost:available, allowed }; } }","expected_response":"{\"data\":{\"credits\":{\"charged\":50,\"balance\":5,\"allowed\":true}}}","schema_definition":"type CreditResult { charged: Int!, balance: Int!, allowed: Boolean! }\ntype Query { credits(balance: Int!, cost: Int!, bonus: Int!): CreditResult! }"}} {"submissionId":"cmssugf2y009fg4p23ad6edrw","title":"Submission D6EDRW","payload":{"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_response":"{\"data\":{\"tournament\":{\"points\":24,\"wins\":7,\"unbeaten\":true}}}","schema_definition":"type TournamentScore { points: Int!, wins: Int!, unbeaten: Boolean! }\ntype Query { tournament(wins: Int!, draws: Int!, losses: Int!): TournamentScore! }"}} {"submissionId":"cmssugf2y009gg4p20196vboj","title":"Submission 96VBOJ","payload":{"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((start-1)/2); return { count, sum, evenCount }; } }","expected_response":"{\"data\":{\"rangeStats\":{\"count\":7,\"sum\":49,\"evenCount\":4}}}","schema_definition":"type RangeStats { count: Int!, sum: Int!, evenCount: Int! }\ntype Query { rangeStats(start: Int!, end: Int!): RangeStats! }"}} {"submissionId":"cmssugf2y009hg4p26pyfcelj","title":"Submission YFCELJ","payload":{"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'); const effectiveLevel=Math.max(userLevel,overrideLevel); const allowed=!suspended && effectiveLevel>=required; return { allowed, reason: suspended?'SUSPENDED':allowed?'GRANTED':'INSUFFICIENT_LEVEL', effectiveLevel }; } }","expected_response":"{\"data\":{\"access\":{\"allowed\":true,\"reason\":\"GRANTED\",\"effectiveLevel\":5}}}","schema_definition":"type AccessDecision { allowed: Boolean!, reason: String!, effectiveLevel: Int! }\ntype Query { access(required: Int!, userLevel: Int!, suspended: Boolean!, overrideLevel: Int!): AccessDecision! }"}} {"submissionId":"cmssugf2y009ig4p2lk7k580h","title":"Submission 7K580H","payload":{"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 success=completed-failed; return { completed, failed, successRate: completed===0?0:Math.floor(success*100/completed) }; } }","expected_response":"{\"data\":{\"batch\":{\"completed\":77,\"failed\":7,\"successRate\":90}}}","schema_definition":"type BatchResult { completed: Int!, failed: Int!, successRate: Int! }\ntype Query { batch(total: Int!, failed: Int!, skipped: Int!): BatchResult! }"}} {"submissionId":"cmssugf2y009jg4p2g8emziby","title":"Submission EMZIBY","payload":{"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=elapsed+retries*retryPenalty; return { budget: Math.max(0,target-consumed), consumed, breached: consumed>target }; } }","expected_response":"{\"data\":{\"sla\":{\"budget\":0,\"consumed\":320,\"breached\":true}}}","schema_definition":"type SLAResult { budget: Int!, consumed: Int!, breached: Boolean! }\ntype Query { sla(target: Int!, elapsed: Int!, retries: Int!, retryPenalty: Int!): SLAResult! }"}} {"submissionId":"cmssugf2y009kg4p2lxujy1vd","title":"Submission UJY1VD","payload":{"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 left=requested-fromPrimary; const fromSecondary=Math.min(secondary,left); const picked=fromPrimary+fromSecondary; return { picked, short: requested-picked, locationsUsed: (fromPrimary>0?1:0)+(fromSecondary>0?1:0) }; } }","expected_response":"{\"data\":{\"pick\":{\"picked\":9,\"short\":0,\"locationsUsed\":2}}}","schema_definition":"type PickResult { picked: Int!, short: Int!, locationsUsed: Int! }\ntype Query { pick(primary: Int!, secondary: Int!, requested: Int!): PickResult! }"}} {"submissionId":"cmssugf2y009lg4p2im1n1o7o","title":"Submission 1N1O7O","payload":{"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-included); const overage=extra*unitPrice; return { base, overage, total: base+overage }; } }","expected_response":"{\"data\":{\"billing\":{\"base\":500,\"overage\":196,\"total\":696}}}","schema_definition":"type BillingResult { base: Int!, overage: Int!, total: Int! }\ntype Query { billing(included: Int!, used: Int!, base: Int!, unitPrice: Int!): BillingResult! }"}} {"submissionId":"cmssugf2y009mg4p2kzf1rbd1","title":"Submission F1RBD1","payload":{"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)) missing.push('LOWER'); if (!/\\d/.test(value)) missing.push('DIGIT'); if (value.length < minLength) missing.push('LENGTH'); return { valid: missing.length===0, missing, score: 4-missing.length }; } }","expected_response":"{\"data\":{\"password\":{\"valid\":false,\"missing\":[\"LENGTH\"],\"score\":3}}}","schema_definition":"type PasswordCheck { valid: Boolean!, missing: [String!]!, score: Int! }\ntype Query { password(value: String!, minLength: Int!): PasswordCheck! }"}} {"submissionId":"cmssugf2y009ng4p2wutnmq9h","title":"Submission TNMQ9H","payload":{"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'); const total=committed+added; return { committed: total, completed, carryOver: total-completed, completionPct: total===0?100:Math.floor(completed*100/total) }; } }","expected_response":"{\"data\":{\"velocity\":{\"committed\":48,\"completed\":36,\"carryOver\":12,\"completionPct\":75}}}","schema_definition":"type VelocityResult { committed: Int!, completed: Int!, carryOver: Int!, completionPct: Int! }\ntype Query { velocity(committed: Int!, completed: Int!, added: Int!): VelocityResult! }"}} {"submissionId":"cmssugf2y009og4p21wjdfu30","title":"Submission JDFU30","payload":{"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; return { hits: effectiveHits, misses, hitRate: reads===0?0:Math.floor(effectiveHits*100/reads) }; } }","expected_response":"{\"data\":{\"cache\":{\"hits\":150,\"misses\":30,\"hitRate\":75}}}","schema_definition":"type CacheResult { hits: Int!, misses: Int!, hitRate: Int! }\ntype Query { cache(reads: Int!, hits: Int!, stale: Int!): CacheResult! }"}} {"submissionId":"cmssugf2y009pg4p245bq0gbw","title":"Submission BQ0GBW","payload":{"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, duration, wraps: raw>=1440 }; } }","expected_response":"{\"data\":{\"slot\":{\"start\":1380,\"end\":60,\"duration\":120,\"wraps\":true}}}","schema_definition":"type TimeSlot { start: Int!, end: Int!, duration: Int!, wraps: Boolean! }\ntype Query { slot(start: Int!, duration: Int!): TimeSlot! }"}} {"submissionId":"cmssugf2y009qg4p290icsv8n","title":"Submission ICSV8N","payload":{"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=valuehigh?'HIGH':'NORMAL'; const distance=band==='LOW'?low-value:band==='HIGH'?value-high:0; return { value, band, distance }; } }","expected_response":"{\"data\":{\"threshold\":{\"value\":97,\"band\":\"HIGH\",\"distance\":7}}}","schema_definition":"type ThresholdResult { value: Int!, band: String!, distance: Int! }\ntype Query { threshold(value: Int!, low: Int!, high: Int!): ThresholdResult! }"}} {"submissionId":"cmssugf2y009rg4p2yw2nqyrf","title":"Submission 2NQYRF","payload":{"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=Math.min(demand,primaryCapacity); const backup=Math.min(demand-primary,backupCapacity); return { primary, backup, unfilled: demand-primary-backup }; } }","expected_response":"{\"data\":{\"allocate\":{\"primary\":10,\"backup\":4,\"unfilled\":3}}}","schema_definition":"type Allocation { primary: Int!, backup: Int!, unfilled: Int! }\ntype Query { allocate(demand: Int!, primaryCapacity: Int!, backupCapacity: Int!): Allocation! }"}} {"submissionId":"cmssugf2y009sg4p2fa57nxlp","title":"Submission 57NXLP","payload":{"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); const tax=Math.floor(taxable*ratePct/100); return { taxable, tax, total: subtotal+tax }; } }","expected_response":"{\"data\":{\"tax\":{\"taxable\":1000,\"tax\":180,\"total\":1430}}}","schema_definition":"type TaxResult { taxable: Int!, tax: Int!, total: Int! }\ntype Query { tax(subtotal: Int!, exemption: Int!, ratePct: Int!): TaxResult! }"}} {"submissionId":"cmssugf2y009tg4p28cmj73a6","title":"Submission MJ73A6","payload":{"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; const state=failed>0?'UNHEALTHY':degraded>0?'DEGRADED':'HEALTHY'; return { healthy, unhealthy: failed+degraded, state }; } }","expected_response":"{\"data\":{\"health\":{\"healthy\":10,\"unhealthy\":2,\"state\":\"DEGRADED\"}}}","schema_definition":"type HealthResult { healthy: Int!, unhealthy: Int!, state: String! }\ntype Query { health(total: Int!, failed: Int!, degraded: Int!): HealthResult! }"}} {"submissionId":"cmssugf2y009ug4p27bxpaqb0","title":"Submission XPAQB0","payload":{"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'); const usable=limit-existing-reserve; const spent=Math.min(usable,requested); return { remaining: usable-spent, spent, blocked: requested>usable }; } }","expected_response":"{\"data\":{\"budget\":{\"remaining\":0,\"spent\":250,\"blocked\":true}}}","schema_definition":"type BudgetResult { remaining: Int!, spent: Int!, blocked: Boolean! }\ntype Query { budget(limit: Int!, existing: Int!, requested: Int!, reserve: Int!): BudgetResult! }"}} {"submissionId":"cmst2kis300bug4p2mvsgu056","title":"Submission SGU056","payload":{"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: Float!): Float! }"}} {"submissionId":"cmst2kis300bvg4p2hf1jvmzr","title":"Submission 1JVMZR","payload":{"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\":\"weight missing for b\"}]}","schema_definition":"type Item { name: String!, weight: Int! }\ntype Query { items: [Item!]! }"}} {"submissionId":"cmst2kis300bwg4p2ji5an6yk","title":"Submission 5AN6YK","payload":{"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!): String! }"}} {"submissionId":"cmst2kis300bxg4p2f4f3kaiu","title":"Submission F3KAIU","payload":{"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 { pick(n: Int!): Color! }"}} {"submissionId":"cmst2kis300byg4p2qq09x04i","title":"Submission 09X04I","payload":{"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: Int!, h: Int!): Rect! }"}} {"submissionId":"cmst2kis300bzg4p2nnasknxa","title":"Submission ASKNXA","payload":{"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_definition":"type Query { evens(upto: Int!): [Int!]! }"}} {"submissionId":"cmst2kis300c0g4p2brp3wqnf","title":"Submission P3WQNF","payload":{"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! }"}} {"submissionId":"cmst2kis300c1g4p2o5icwfh0","title":"Submission ICWFH0","payload":{"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! }"}} {"submissionId":"cmst2kis300c2g4p26i1crv53","title":"Submission 1CRV53","payload":{"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! }"}} {"submissionId":"cmst2kis300c3g4p25fpt7amk","title":"Submission PT7AMK","payload":{"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!]! }"}} {"submissionId":"cmst2kis400c4g4p2tgr46tgl","title":"Submission R46TGL","payload":{"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\"}]}","schema_definition":"type Query { withdraw(balance: Int!, amount: Int!): Int! }"}} {"submissionId":"cmst2kis400c5g4p2c9olhc5x","title":"Submission OLHC5X","payload":{"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! }"}} {"submissionId":"cmst2kis400c6g4p2wjv09ig0","title":"Submission V09IG0","payload":{"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 Query { a: A! }"}} {"submissionId":"cmst2kis400c7g4p2hyio0jid","title":"Submission IO0JID","payload":{"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! }"}} {"submissionId":"cmst2kis400c8g4p2cztsfrkw","title":"Submission TSFRKW","payload":{"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!]! }"}} {"submissionId":"cmst2kis400c9g4p2yhb8qxsr","title":"Submission B8QXSR","payload":{"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! }"}} {"submissionId":"cmst2kis400cag4p295gooexm","title":"Submission GOOEXM","payload":{"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! }"}} {"submissionId":"cmst2kis400cbg4p2rddh9q66","title":"Submission DH9Q66","payload":{"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! }"}} {"submissionId":"cmst2kis400ccg4p22uox2uyl","title":"Submission OX2UYL","payload":{"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}]}}","schema_definition":"type Sq { n: Int!, square: Int! }\ntype Query { squares(upto: Int!): [Sq!]! }"}} {"submissionId":"cmst2kis400cdg4p2ts93433y","title":"Submission 93433Y","payload":{"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!): Int! }"}} {"submissionId":"cmst6cllz00emg4p20h1tq0ot","title":"Submission 1TQ0OT","payload":{"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', terminalNames: ['North', 'South'] }, CDG: { code: 'CDG', city: 'Paris', terminalNames: ['Est'] } })[code] || null },\nAirport: { terminals: (airport) => airport.terminalNames.map((name) => ({ name, airportCode: airport.code })) },\nTerminal: { gates: (terminal, { state }) => { const table = { 'LHR/North': [['N1', 'OPEN'], ['N2', 'BOARDING'], ['N3', 'CLOSED']], 'LHR/South': [['S1', 'BOARDING'], ['S2', 'BOARDING'], ['S3', 'OPEN']], 'CDG/Est': [['E1', 'CLOSED']] }; const rows = table[terminal.airportCode + '/' + terminal.name] || []; return rows.filter((row) => !state || row[1] === state).map((row) => ({ code: row[0], state: row[1], terminalName: terminal.name })); } },\nGate: { terminal: (gate) => gate.terminalName }","expected_response":"{\"data\": {\"airport\": {\"code\": \"LHR\", \"city\": \"London\", \"terminals\": [{\"name\": \"North\", \"boarding\": [{\"code\": \"N2\", \"state\": \"BOARDING\", \"terminal\": \"North\"}], \"everything\": [{\"code\": \"N1\", \"state\": \"OPEN\"}, {\"code\": \"N2\", \"state\": \"BOARDING\"}, {\"code\": \"N3\", \"state\": \"CLOSED\"}]}, {\"name\": \"South\", \"boarding\": [{\"code\": \"S1\", \"state\": \"BOARDING\", \"terminal\": \"South\"}, {\"code\": \"S2\", \"state\": \"BOARDING\", \"terminal\": \"South\"}], \"everything\": [{\"code\": \"S1\", \"state\": \"BOARDING\"}, {\"code\": \"S2\", \"state\": \"BOARDING\"}, {\"code\": \"S3\", \"state\": \"OPEN\"}]}]}}}","schema_definition":"enum GateState { OPEN, BOARDING, CLOSED }\ntype Gate { code: String!, state: GateState!, terminal: String! }\ntype Terminal { name: String!, gates(state: GateState): [Gate!]! }\ntype Airport { code: String!, city: String!, terminals: [Terminal!]! }\ntype Query { airport(code: ID!): Airport }"}} {"submissionId":"cmst6cllz00eng4p2x4wgmw5u","title":"Submission WGMW5U","payload":{"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 } }\n}","resolver_code":"Query: {\n inventory: () => [\n { __typename: 'StringInstrument', id: 'i1', name: 'Cello', strings: 4, bowed: true },\n { __typename: 'Percussion', id: 'i2', name: 'Timpani', pitched: true },\n { __typename: 'Wind', id: 'i3', name: 'Oboe', reed: 'DOUBLE' },\n { __typename: 'StringInstrument', id: 'i4', name: 'Mandolin', strings: 8, bowed: false }\n ],\n instrument: (_, { id }) => { const all = { i3: { __typename: 'Wind', id: 'i3', name: 'Oboe', reed: 'DOUBLE' }, i9: null }; return all[id] || null; }\n},\nStringInstrument: { family: (obj) => obj.bowed ? 'bowed strings' : 'plucked strings' },\nPercussion: { family: () => 'percussion' },\nWind: { family: (obj) => obj.reed === 'NONE' ? 'flutes' : 'reeds' }","expected_response":"{\"data\": {\"inventory\": [{\"__typename\": \"StringInstrument\", \"id\": \"i1\", \"label\": \"Cello\", \"family\": \"bowed strings\", \"strings\": 4, \"bowed\": true}, {\"__typename\": \"Percussion\", \"id\": \"i2\", \"label\": \"Timpani\", \"family\": \"percussion\", \"pitched\": true}, {\"__typename\": \"Wind\", \"id\": \"i3\", \"label\": \"Oboe\", \"family\": \"reeds\", \"reed\": \"DOUBLE\"}, {\"__typename\": \"StringInstrument\", \"id\": \"i4\", \"label\": \"Mandolin\", \"family\": \"plucked strings\", \"strings\": 8, \"bowed\": false}], \"missing\": null, \"oboe\": {\"__typename\": \"Wind\", \"family\": \"reeds\", \"reed\": \"DOUBLE\"}}}","schema_definition":"enum ReedKind { NONE, SINGLE, DOUBLE }\ninterface Instrument { id: ID!, name: String!, family: String! }\ntype StringInstrument implements Instrument { id: ID!, name: String!, family: String!, strings: Int!, bowed: Boolean! }\ntype Percussion implements Instrument { id: ID!, name: String!, family: String!, pitched: Boolean! }\ntype Wind implements Instrument { id: ID!, name: String!, family: String!, reed: ReedKind! }\ntype Query { inventory: [Instrument!]!, instrument(id: ID!): Instrument }"}} {"submissionId":"cmst6cllz00eog4p2o1jsdf3e","title":"Submission JSDF3E","payload":{"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":"Query: { feed: () => [\n { __typename: 'Poll', question: 'Best build tool?', opts: [['esbuild', 12], ['rollup', 7], ['webpack', 3]] },\n { __typename: 'Photo', caption: null, width: 1600, height: 900 },\n { __typename: 'Repost', note: 'still relevant', inner: { __typename: 'Poll', question: 'Tabs or spaces?', opts: [['tabs', 40], ['spaces', 61]] } },\n { __typename: 'Repost', note: 'from the archive', inner: { __typename: 'Photo', caption: 'server room, 2011', width: 640, height: 480 } }\n] },\nPoll: { options: (poll) => poll.opts.map((o) => ({ label: o[0], votes: o[1] })), totalVotes: (poll) => poll.opts.reduce((sum, o) => sum + o[1], 0) },\nRepost: { original: (repost) => repost.inner }","expected_response":"{\"data\": {\"feed\": [{\"__typename\": \"Poll\", \"question\": \"Best build tool?\", \"totalVotes\": 22, \"options\": [{\"label\": \"esbuild\", \"votes\": 12}, {\"label\": \"rollup\", \"votes\": 7}, {\"label\": \"webpack\", \"votes\": 3}]}, {\"__typename\": \"Photo\", \"caption\": null, \"width\": 1600, \"height\": 900}, {\"__typename\": \"Repost\", \"note\": \"still relevant\", \"original\": {\"__typename\": \"Poll\", \"question\": \"Tabs or spaces?\", \"totalVotes\": 101, \"options\": [{\"label\": \"tabs\", \"votes\": 40}, {\"label\": \"spaces\", \"votes\": 61}]}}, {\"__typename\": \"Repost\", \"note\": \"from the archive\", \"original\": {\"__typename\": \"Photo\", \"caption\": \"server room, 2011\", \"width\": 640, \"height\": 480}}]}}","schema_definition":"union FeedEntry = Poll | Photo | Repost\ntype PollOption { label: String!, votes: Int! }\ntype Poll { question: String!, options: [PollOption!]!, totalVotes: Int! }\ntype Photo { caption: String, width: Int!, height: Int! }\ntype Repost { note: String!, original: FeedEntry! }\ntype Query { feed: [FeedEntry!]! }"}} {"submissionId":"cmst6cllz00epg4p23rv8j1gq","title":"Submission V8J1GQ","payload":{"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}","resolver_code":"Query: { catalogueSize: () => 3 },\nMutation: { placeOrder: (_, { input }) => { const prices = { 'BOLT-1': 250, 'NUT-2': 90, 'WASHER-3': 45 }; const lines = input.lines.map((l) => ({ sku: l.sku, qty: l.qty, unitCents: prices[l.sku] == null ? 0 : prices[l.sku] })); return { id: 'ord-8812', customer: input.customer, lines, coupon: input.coupon || null, shipping: input.shipping }; } },\nOrder: {\n lines: (order) => order.lines.map((l) => Object.assign({}, l, { subtotalCents: l.qty * l.unitCents })),\n itemsCents: (order) => order.lines.reduce((sum, l) => sum + l.qty * l.unitCents, 0),\n discountCents: (order) => { const items = order.lines.reduce((sum, l) => sum + l.qty * l.unitCents, 0); return order.coupon === 'TENOFF' ? Math.floor(items / 10) : 0; },\n shippingCents: (order) => { const base = { STANDARD: 500, EXPRESS: 1200, OVERNIGHT: 2900 }[order.shipping.speed]; return base + (order.shipping.insured ? 350 : 0); },\n totalCents: (order) => { const items = order.lines.reduce((sum, l) => sum + l.qty * l.unitCents, 0); const disc = order.coupon === 'TENOFF' ? Math.floor(items / 10) : 0; const base = { STANDARD: 500, EXPRESS: 1200, OVERNIGHT: 2900 }[order.shipping.speed]; return items - disc + base + (order.shipping.insured ? 350 : 0); },\n status: (order) => order.lines.some((l) => l.unitCents === 0) ? 'REJECTED' : 'CONFIRMED'\n}","expected_response":"{\"data\": {\"placeOrder\": {\"id\": \"ord-8812\", \"customer\": \"acme-ltd\", \"status\": \"CONFIRMED\", \"lines\": [{\"sku\": \"BOLT-1\", \"qty\": 4, \"unitCents\": 250, \"subtotalCents\": 1000}, {\"sku\": \"NUT-2\", \"qty\": 1, \"unitCents\": 90, \"subtotalCents\": 90}], \"itemsCents\": 1090, \"discountCents\": 109, \"shippingCents\": 500, \"totalCents\": 1481}}}","schema_definition":"enum Speed { STANDARD, EXPRESS, OVERNIGHT }\nenum OrderStatus { PENDING, CONFIRMED, REJECTED }\ninput LineInput { sku: String!, qty: Int = 1 }\ninput ShippingInput { speed: Speed!, insured: Boolean = false }\ninput OrderInput { customer: String!, lines: [LineInput!]!, coupon: String, shipping: ShippingInput = { speed: STANDARD } }\ntype OrderLine { sku: String!, qty: Int!, unitCents: Int!, subtotalCents: Int! }\ntype Order { id: ID!, customer: String!, lines: [OrderLine!]!, itemsCents: Int!, discountCents: Int!, shippingCents: Int!, totalCents: Int!, status: OrderStatus! }\ntype Query { catalogueSize: Int! }\ntype Mutation { placeOrder(input: OrderInput!): Order! }"}} {"submissionId":"cmst6cllz00eqg4p2i4shc0jv","title":"Submission SHC0JV","payload":{"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 }\n}","resolver_code":"Query: { shipments: (_, { filter }) => {\n const rows = [\n { ref: 'S-100', region: 'EU', weightKg: 12.5, tags: ['fragile'] },\n { ref: 'S-101', region: 'EU', weightKg: 64, tags: [] },\n { ref: 'S-102', region: 'NA', weightKg: 44.25, tags: ['fragile', 'cold'] },\n { ref: 'S-103', region: 'NA', weightKg: 910, tags: ['bulk'] },\n { ref: 'S-104', region: 'APAC', weightKg: 3, tags: ['cold'] }\n ];\n const f = filter || {};\n const w = f.weight || {};\n const min = w.min == null ? 0 : w.min;\n const max = w.max == null ? 1000 : w.max;\n const tags = f.tags || [];\n return rows.filter((r) => r.region === f.region && r.weightKg >= min && r.weightKg <= max && tags.every((t) => r.tags.indexOf(t) !== -1));\n} }","expected_response":"{\"data\": {\"allDefaults\": [{\"ref\": \"S-100\", \"region\": \"EU\", \"weightKg\": 12.5}], \"heavyNorthAmerica\": [{\"ref\": \"S-102\", \"weightKg\": 44.25}, {\"ref\": \"S-103\", \"weightKg\": 910}], \"coldApac\": [{\"ref\": \"S-104\", \"tags\": [\"cold\"]}], \"impossible\": []}}","schema_definition":"enum Region { EU, NA, APAC }\ninput Range { min: Float = 0, max: Float = 1000 }\ninput ShipmentFilter { region: Region = EU, weight: Range = { min: 0, max: 50 }, tags: [String!] = [] }\ntype Shipment { ref: String!, region: Region!, weightKg: Float!, tags: [String!]! }\ntype Query { shipments(filter: ShipmentFilter = {}): [Shipment!]! }"}} {"submissionId":"cmst6cllz00erg4p2riylpyzo","title":"Submission YLPYZO","payload":{"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 threads: (_, { limit, sort }) => {\n const rows = [\n { title: 'Migrating to ESM', replies: 31, lastActivityDay: 12 },\n { title: 'Flaky CI on arm64', replies: 8, lastActivityDay: 19 },\n { title: 'Schema stitching pitfalls', replies: 22, lastActivityDay: 17 },\n { title: 'Why is my query N+1', replies: 47, lastActivityDay: 4 }\n ];\n const sorted = rows.slice().sort((a, b) => sort === 'REPLIES' ? b.replies - a.replies : b.lastActivityDay - a.lastActivityDay);\n return sorted.slice(0, limit);\n }\n}","expected_response":"{\"data\": {\"threadCount\": 4, \"byDefault\": [{\"title\": \"Why is my query N+1\", \"replies\": 47, \"lastActivityDay\": 4}, {\"title\": \"Migrating to ESM\", \"replies\": 31, \"lastActivityDay\": 12}], \"recentThree\": [{\"title\": \"Flaky CI on arm64\", \"lastActivityDay\": 19}, {\"title\": \"Schema stitching pitfalls\", \"lastActivityDay\": 17}, {\"title\": \"Migrating to ESM\", \"lastActivityDay\": 12}]}}","schema_definition":"enum ThreadSort { REPLIES, RECENT }\ntype Thread { title: String!, replies: Int!, lastActivityDay: Int! }\ntype Query { threads(limit: Int!, sort: ThreadSort!): [Thread!]!, threadCount: Int! }"}} {"submissionId":"cmst6cllz00esg4p2n8owkhvw","title":"Submission OWKHVW","payload":{"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) }\nfragment restricted on Profile { internalNotes }","resolver_code":"Query: { profile: () => ({ handle: 'mriley', email: 'm.riley@example.org', phone: '+44 20 7946 0102', address: { city: 'Bristol', country: 'GB' }, internalNotes: 'do not expose' }) },\nProfile: { address: (p) => p.address }","expected_response":"{\"data\": {\"profile\": {\"handle\": \"mriley\", \"email\": \"m.riley@example.org\", \"address\": {\"city\": \"Bristol\", \"country\": \"GB\"}}}}","schema_definition":"type Address { city: String!, country: String! }\ntype Profile { handle: String!, email: String!, phone: String!, address: Address!, internalNotes: String! }\ntype Query { profile: Profile! }"}} {"submissionId":"cmst6cllz00etg4p2d87r4478","title":"Submission 7R4478","payload":{"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: 7.7845, elevation: 3089 }\n ]\n},\nStation: {\n location: (s) => ({ lat: s.lat, lon: s.lon }),\n aliases: (s) => [{ format: 'dms', value: s.name.toUpperCase() }, { format: 'pair', value: [s.lat, s.lon] }]\n}","expected_response":"{\"data\": {\"boundingBox\": {\"sw\": [45.9, 5.9], \"ne\": [47.8, 10.5]}, \"stations\": [{\"name\": \"Zermatt\", \"location\": {\"lat\": 46.0207, \"lon\": 7.7491}, \"elevation\": 1605, \"aliases\": [{\"format\": \"dms\", \"value\": \"ZERMATT\"}, {\"format\": \"pair\", \"value\": [46.0207, 7.7491]}]}, {\"name\": \"Gornergrat\", \"location\": {\"lat\": 45.9836, \"lon\": 7.7845}, \"elevation\": 3089, \"aliases\": [{\"format\": \"dms\", \"value\": \"GORNERGRAT\"}, {\"format\": \"pair\", \"value\": [45.9836, 7.7845]}]}]}}","schema_definition":"scalar Geo\nscalar Meters\ntype Station { name: String!, location: Geo!, elevation: Meters!, aliases: [Geo!]! }\ntype Query { stations: [Station!]!, boundingBox: Geo! }"}} {"submissionId":"cmst6cllz00eug4p2v2fyaszu","title":"Submission FYASZU","payload":{"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 possibleTypes { name } }\n}","resolver_code":"Query: { swatches: (_, { palette }) => ({ WARM: ['#c0392b', '#e67e22'], COOL: ['#2980b9', '#16a085'], MONO: ['#111111'], MONOCHROME: ['#111111', '#eeeeee'] })[palette] }","expected_response":"{\"data\": {\"swatches\": [\"#2980b9\", \"#16a085\"], \"__schema\": {\"queryType\": {\"name\": \"Query\"}}, \"palette\": {\"kind\": \"ENUM\", \"name\": \"Palette\", \"visible\": [{\"name\": \"WARM\"}, {\"name\": \"COOL\"}, {\"name\": \"MONOCHROME\"}], \"all\": [{\"name\": \"WARM\", \"isDeprecated\": false, \"deprecationReason\": null}, {\"name\": \"COOL\", \"isDeprecated\": false, \"deprecationReason\": null}, {\"name\": \"MONO\", \"isDeprecated\": true, \"deprecationReason\": \"use MONOCHROME\"}, {\"name\": \"MONOCHROME\", \"isDeprecated\": false, \"deprecationReason\": null}]}, \"shape\": {\"kind\": \"INTERFACE\", \"possibleTypes\": [{\"name\": \"Circle\"}, {\"name\": \"Square\"}]}}}","schema_definition":"enum Palette { WARM, COOL, MONO @deprecated(reason: \"use MONOCHROME\") , MONOCHROME }\ninterface Shape { area: Float! }\ntype Circle implements Shape { area: Float!, radius: Float! }\ntype Square implements Shape { area: Float!, side: Float! }\ntype Query { swatches(palette: Palette!): [String!]! }"}} {"submissionId":"cmst6cllz00evg4p25lguxmqj","title":"Submission GUXMQJ","payload":{"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":"Query: { board: (_, { key }) => key === 'eng' ? { key: 'eng', columnNames: ['Doing', 'Done'] } : null },\nBoard: { columns: (board) => board.columnNames.map((name) => ({ name, boardKey: board.key })) },\nColumn: { cards: (column, { last, before }) => {\n const store = {\n 'eng/Doing': [['c1', 'Split resolver bundle', 3], ['c2', 'Cache warm path', 5]],\n 'eng/Done': [['c3', 'Drop legacy loader', 2], ['c4', 'Add tracing spans', 8], ['c5', 'Pin graphql version', 1], ['c6', 'Backfill cursors', 13]]\n };\n const rows = (store[column.boardKey + '/' + column.name] || []).map((r) => ({ cursor: 'cur:' + r[0], node: { id: r[0], title: r[1], points: r[2] } }));\n let window = rows;\n if (before) { const idx = rows.findIndex((e) => e.cursor === before); if (idx !== -1) window = rows.slice(0, idx); }\n const trimmedFromStart = last != null && window.length > last;\n if (trimmedFromStart) window = window.slice(window.length - last);\n return { totalCount: rows.length, edges: window, hasNextPage: window.length > 0 && window[window.length - 1].cursor !== rows[rows.length - 1].cursor, hasPreviousPage: trimmedFromStart || (window.length > 0 && window[0].cursor !== rows[0].cursor) };\n} },\nCardConnection: { pageInfo: (conn) => ({ hasNextPage: conn.hasNextPage, hasPreviousPage: conn.hasPreviousPage, startCursor: conn.edges.length ? conn.edges[0].cursor : null, endCursor: conn.edges.length ? conn.edges[conn.edges.length - 1].cursor : null }) }","expected_response":"{\"data\": {\"board\": {\"key\": \"eng\", \"columns\": [{\"name\": \"Doing\", \"cards\": {\"totalCount\": 2, \"edges\": [{\"cursor\": \"cur:c1\", \"node\": {\"id\": \"c1\", \"title\": \"Split resolver bundle\", \"points\": 3}}, {\"cursor\": \"cur:c2\", \"node\": {\"id\": \"c2\", \"title\": \"Cache warm path\", \"points\": 5}}], \"pageInfo\": {\"hasNextPage\": false, \"hasPreviousPage\": false, \"startCursor\": \"cur:c1\", \"endCursor\": \"cur:c2\"}}}, {\"name\": \"Done\", \"cards\": {\"totalCount\": 4, \"edges\": [{\"cursor\": \"cur:c4\", \"node\": {\"id\": \"c4\", \"title\": \"Add tracing spans\", \"points\": 8}}, {\"cursor\": \"cur:c5\", \"node\": {\"id\": \"c5\", \"title\": \"Pin graphql version\", \"points\": 1}}], \"pageInfo\": {\"hasNextPage\": true, \"hasPreviousPage\": true, \"startCursor\": \"cur:c4\", \"endCursor\": \"cur:c5\"}}}]}}}","schema_definition":"type Card { id: ID!, title: String!, points: Int! }\ntype CardEdge { cursor: String!, node: Card! }\ntype PageInfo { hasNextPage: Boolean!, hasPreviousPage: Boolean!, startCursor: String, endCursor: String }\ntype CardConnection { totalCount: Int!, edges: [CardEdge!]!, pageInfo: PageInfo! }\ntype Column { name: String!, cards(last: Int, before: String): CardConnection! }\ntype Board { key: ID!, columns: [Column!]! }\ntype Query { board(key: ID!): Board }"}} {"submissionId":"cmst6cllz00ewg4p25k2j6or9","title":"Submission 2J6OR9","payload":{"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 } },\n { name: 'R. Mensah', jersey: 21, injury: { kind: 'ankle', weeksOut: 3 } }\n ],\n captain: () => null,\n vacancies: () => null\n}","expected_response":"{\"data\": {\"roster\": [{\"name\": \"K. Abara\", \"jersey\": 7, \"injury\": null}, null, {\"name\": \"T. Volkov\", \"jersey\": null, \"injury\": {\"kind\": \"hamstring\", \"weeksOut\": null}}, {\"name\": \"R. Mensah\", \"jersey\": 21, \"injury\": {\"kind\": \"ankle\", \"weeksOut\": 3}}], \"captain\": null, \"vacancies\": null}}","schema_definition":"type Injury { kind: String!, weeksOut: Int }\ntype Player { name: String!, jersey: Int, injury: Injury }\ntype Query { roster: [Player], captain: Player, vacancies: [Player] }"}} {"submissionId":"cmst6cllz00exg4p21tupypjb","title":"Submission UPYPJB","payload":{"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 })) },\nMember: { badge: (member) => { const badges = { Okafor: 'B-1043', Pereira: 'B-1099', Haddad: 'B-2001' }; return badges[member.name] === undefined ? null : badges[member.name]; } }","expected_response":"{\"errors\": [{\"message\": \"Cannot return null for non-nullable field Member.badge.\"}]}","schema_definition":"enum Shift { DAY, NIGHT }\ntype Member { name: String!, badge: String! }\ntype Crew { shift: Shift!, members: [Member!]! }\ntype Query { crew(shift: Shift!): Crew! }"}} {"submissionId":"cmst6cllz00eyg4p25xciunl7","title":"Submission CIUNL7","payload":{"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) => ({ from: args.from, to: args.to, cents: args.cents }) },\nTransferResult: {\n receipt: (t) => { const balances = { 'acct-a': 2500, 'acct-b': 18000 }; const have = balances[t.from]; if (have === undefined) throw new Error('unknown account ' + t.from); if (have < t.cents) throw new Error('insufficient funds: ' + t.from + ' holds ' + have + ' cents, transfer needs ' + t.cents); return { code: 'RCPT-' + t.from + '-' + t.to, postedCents: t.cents }; },\n balanceAfterCents: (t) => ({ 'acct-a': 2500, 'acct-b': 18000 })[t.from] - t.cents\n}","expected_response":"{\"errors\": [{\"message\": \"insufficient funds: acct-a holds 2500 cents, transfer needs 5000\"}]}","schema_definition":"type Receipt { code: String!, postedCents: Int! }\ntype TransferResult { receipt: Receipt!, balanceAfterCents: Int! }\ntype Query { balanceCents(account: ID!): Int! }\ntype Mutation { transfer(from: ID!, to: ID!, cents: Int!): TransferResult! }"}} {"submissionId":"cmst6cllz00ezg4p20swsae1g","title":"Submission WSAE1G","payload":{"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) throw new Error('no post ' + slug); return row; } },\nPost: { tags: (post) => post.rawTags }","expected_response":"{\"errors\": [{\"message\": \"Expected Iterable, but did not find one for field \\\"Post.tags\\\".\"}]}","schema_definition":"type Tag { slug: String!, label: String! }\ntype Post { slug: ID!, headline: String!, tags: [Tag!]! }\ntype Query { post(slug: ID!): Post! }"}} {"submissionId":"cmst6cllz00f0g4p2gve77yrs","title":"Submission E77YRS","payload":{"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\": \"Value \\\"SPICY\\\" does not exist in \\\"Heat\\\" enum.\"}]}","schema_definition":"enum Heat { MILD, MEDIUM, HOT }\ntype Dish { name: String!, heat: Heat! }\ntype Query { dishes(heat: Heat!): [Dish!]! }"}} {"submissionId":"cmst6cllz00f1g4p2cve8n7w6","title":"Submission E8N7W6","payload":{"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\": [{\"message\": \"Field \\\"temperature\\\" must not have a selection since type \\\"Float!\\\" has no subfields.\"}, {\"message\": \"Field \\\"coolant\\\" of type \\\"Coolant!\\\" must have a selection of subfields. Did you mean \\\"coolant { ... }\\\"?\"}]}","schema_definition":"type Coolant { kind: String!, litres: Float! }\ntype Reactor { id: ID!, temperature: Float!, coolant: Coolant! }\ntype Query { reactor(id: ID!): Reactor! }"}} {"submissionId":"cmst6cllz00f2g4p22fa207cz","title":"Submission A207CZ","payload":{"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 } })[slug] || null }","expected_response":"{\"errors\": [{\"message\": \"Variable \\\"$fallbackSlug\\\" is not defined by operation \\\"GetPage\\\".\"}]}","schema_definition":"type Page { slug: ID!, title: String!, words: Int! }\ntype Query { page(slug: ID!): Page }"}} {"submissionId":"cmst6cllz00f3g4p2r0wx7oic","title":"Submission WX7OIC","payload":{"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 }","resolver_code":"Query: {\n published: () => [\n { __typename: 'Guide', id: 'g-1', publishedAt: '2024-03-02', steps: 7 },\n { __typename: 'Notice', id: 'n-4', publishedAt: null, severity: 'CRITICAL' },\n { __typename: 'Guide', id: 'g-2', publishedAt: '2024-05-19', steps: 3 }\n ],\n entity: (_, { id }) => ({\n 'g-1': { __typename: 'Guide', id: 'g-1', publishedAt: '2024-03-02', steps: 7 },\n 'n-4': { __typename: 'Notice', id: 'n-4', publishedAt: null, severity: 'CRITICAL' }\n })[id] || null\n}","expected_response":"{\"data\": {\"published\": [{\"__typename\": \"Guide\", \"id\": \"g-1\", \"steps\": 7}, {\"__typename\": \"Notice\", \"id\": \"n-4\", \"severity\": \"CRITICAL\"}, {\"__typename\": \"Guide\", \"id\": \"g-2\", \"steps\": 3}], \"notice\": {\"__typename\": \"Notice\", \"id\": \"n-4\", \"publishedAt\": null, \"severity\": \"CRITICAL\"}}}","schema_definition":"enum Severity { INFO, WARN, CRITICAL }\ninterface Entity { id: ID! }\ninterface Publishable implements Entity { id: ID!, publishedAt: String }\ntype Guide implements Publishable & Entity { id: ID!, publishedAt: String, steps: Int! }\ntype Notice implements Publishable & Entity { id: ID!, publishedAt: String, severity: Severity! }\ntype Query { published: [Publishable!]!, entity(id: ID!): Entity }"}} {"submissionId":"cmst6cllz00f4g4p23on9fn8u","title":"Submission N9FN8U","payload":{"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(mode: BIKE) { ...etaBits }\n bikeHeadwind: eta(mode: BIKE, trafficPct: 25) { ...etaBits }\n }\n missingLeg: leg(index: 9) { from }\n }\n}\nfragment etaBits on Eta { minutes mode trafficPct }","resolver_code":"Query: { route: (_, { id }) => id === 'r-77' ? { id: 'r-77', legs: [{ from: 'Depot', to: 'Bridge', km: 6 }, { from: 'Bridge', to: 'Market', km: 9 }, { from: 'Market', to: 'Depot', km: 15 }] } : null },\nRoute: {\n km: (route) => route.legs.reduce((sum, l) => sum + l.km, 0),\n leg: (route, { index }) => route.legs[index] || null,\n eta: (route, { mode, trafficPct }) => { const km = route.legs.reduce((sum, l) => sum + l.km, 0); const kmh = { CAR: 45, BIKE: 18, TRANSIT: 27 }[mode]; const minutes = Math.round((km / kmh) * 60 * (1 + trafficPct / 100)); return { minutes, mode, trafficPct }; }\n},\nLeg: { eta: (leg, { mode, trafficPct }) => { const kmh = { CAR: 45, BIKE: 18, TRANSIT: 27 }[mode]; const minutes = Math.round((leg.km / kmh) * 60 * (1 + trafficPct / 100)); return { minutes, mode, trafficPct }; } }","expected_response":"{\"data\": {\"route\": {\"id\": \"r-77\", \"km\": 30, \"driveClear\": {\"minutes\": 40, \"mode\": \"CAR\", \"trafficPct\": 0}, \"driveJammed\": {\"minutes\": 56, \"mode\": \"CAR\", \"trafficPct\": 40}, \"transit\": {\"minutes\": 77, \"mode\": \"TRANSIT\", \"trafficPct\": 15}, \"longLeg\": {\"from\": \"Market\", \"to\": \"Depot\", \"km\": 15, \"bike\": {\"minutes\": 50, \"mode\": \"BIKE\", \"trafficPct\": 0}, \"bikeHeadwind\": {\"minutes\": 63, \"mode\": \"BIKE\", \"trafficPct\": 25}}, \"missingLeg\": null}}}","schema_definition":"enum Mode { CAR, BIKE, TRANSIT }\ntype Eta { minutes: Int!, mode: Mode!, trafficPct: Int! }\ntype Leg { from: String!, to: String!, km: Float!, eta(mode: Mode!, trafficPct: Int! = 0): Eta! }\ntype Route { id: ID!, km: Float!, leg(index: Int!): Leg, eta(mode: Mode!, trafficPct: Int! = 0): Eta! }\ntype Query { route(id: ID!): Route }"}} {"submissionId":"cmst6cllz00f5g4p22ry9ncfv","title":"Submission Y9NCFV","payload":{"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: (_, { slug }) => {\n const tree = { northwind: { slug: 'northwind', name: 'Northwind Systems', departments: [\n { name: 'Platform', teams: [\n { name: 'Runtime', leadName: 'Ines Duarte', members: [['Ines Duarte', 'Staff Engineer'], ['Piotr Nowak', 'Engineer']] },\n { name: 'Data', leadName: null, members: [['Ada Kovač', 'Engineer'], ['Sam Okoye', 'Engineer'], ['Wei Lin', 'Intern']] }\n ] },\n { name: 'Revenue', teams: [\n { name: 'Billing', leadName: 'Hana Sato', members: [['Hana Sato', 'Manager'], ['Luc Moreau', 'Analyst']] }\n ] }\n ] } };\n return tree[slug] || null;\n} },\nCompany: {\n departments: (company) => company.departments.map((d) => Object.assign({}, d, { path: company.name })),\n headcount: (company) => company.departments.reduce((sum, d) => sum + d.teams.reduce((s, t) => s + t.members.length, 0), 0)\n},\nDepartment: {\n teams: (dept) => dept.teams.map((t) => Object.assign({}, t, { path: dept.path + ' / ' + dept.name })),\n headcount: (dept) => dept.teams.reduce((sum, t) => sum + t.members.length, 0)\n},\nTeam: {\n members: (team) => team.members.map((m) => ({ name: m[0], title: m[1], path: team.path + ' / ' + team.name })),\n lead: (team) => { if (!team.leadName) return null; const row = team.members.find((m) => m[0] === team.leadName); return { name: row[0], title: row[1], path: team.path + ' / ' + team.name }; },\n headcount: (team) => team.members.length\n},\nMember: { chain: (member) => member.path + ' / ' + member.name }","expected_response":"{\"data\": {\"company\": {\"name\": \"Northwind Systems\", \"headcount\": 7, \"departments\": [{\"name\": \"Platform\", \"headcount\": 5, \"teams\": [{\"name\": \"Runtime\", \"headcount\": 2, \"lead\": {\"name\": \"Ines Duarte\", \"title\": \"Staff Engineer\", \"chain\": \"Northwind Systems / Platform / Runtime / Ines Duarte\"}, \"members\": [{\"name\": \"Ines Duarte\", \"title\": \"Staff Engineer\", \"chain\": \"Northwind Systems / Platform / Runtime / Ines Duarte\"}, {\"name\": \"Piotr Nowak\", \"title\": \"Engineer\", \"chain\": \"Northwind Systems / Platform / Runtime / Piotr Nowak\"}]}, {\"name\": \"Data\", \"headcount\": 3, \"lead\": null, \"members\": [{\"name\": \"Ada Kovač\", \"title\": \"Engineer\", \"chain\": \"Northwind Systems / Platform / Data / Ada Kovač\"}, {\"name\": \"Sam Okoye\", \"title\": \"Engineer\", \"chain\": \"Northwind Systems / Platform / Data / Sam Okoye\"}, {\"name\": \"Wei Lin\", \"title\": \"Intern\", \"chain\": \"Northwind Systems / Platform / Data / Wei Lin\"}]}]}, {\"name\": \"Revenue\", \"headcount\": 2, \"teams\": [{\"name\": \"Billing\", \"headcount\": 2, \"lead\": {\"name\": \"Hana Sato\", \"title\": \"Manager\", \"chain\": \"Northwind Systems / Revenue / Billing / Hana Sato\"}, \"members\": [{\"name\": \"Hana Sato\", \"title\": \"Manager\", \"chain\": \"Northwind Systems / Revenue / Billing / Hana Sato\"}, {\"name\": \"Luc Moreau\", \"title\": \"Analyst\", \"chain\": \"Northwind Systems / Revenue / Billing / Luc Moreau\"}]}]}]}}}","schema_definition":"type Member { name: String!, title: String!, chain: String! }\ntype Team { name: String!, members: [Member!]!, lead: Member, headcount: Int! }\ntype Department { name: String!, teams: [Team!]!, headcount: Int! }\ntype Company { slug: ID!, name: String!, departments: [Department!]!, headcount: Int! }\ntype Query { company(slug: ID!): Company }"}} {"submissionId":"cmsu4fykv00fig4p2uhczpppe","title":"Submission CZPPPE","payload":{"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: String! }\ntype Query { tickets: [Ticket!] }"}} {"submissionId":"cmsu4fykv00fjg4p2i8vvop51","title":"Submission VVOP51","payload":{"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!): String! }"}} {"submissionId":"cmsu4fykv00fkg4p2tz6yk2dx","title":"Submission 6YK2DX","payload":{"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! }"}} {"submissionId":"cmsu4fykv00flg4p20luq0iqu","title":"Submission UQ0IQU","payload":{"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! }"}} {"submissionId":"cmsu4fykv00fmg4p2a55vqb5l","title":"Submission 5VQB5L","payload":{"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\":{\"label\":\"c\"}}}}}","schema_definition":"type Node2 { label: String!, child: Node2 }\ntype Query { root: Node2! }"}} {"submissionId":"cmsuh1ail00hgg4p2vht8r5lm","title":"Submission T8R5LM","payload":{"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 * i.qty, 0) }","expected_response":"{\"data\": {\"cart\": {\"items\": [{\"name\": \"Widget\", \"price\": 9.99, \"qty\": 2}, {\"name\": \"Gadget\", \"price\": 19.99, \"qty\": 1}], \"total\": 39.97}}}","schema_definition":"type Item { name: String!, price: Float!, qty: Int! }\ntype Cart { items: [Item!]!, total: Float! }\ntype Query { cart: Cart }"}} {"submissionId":"cmsuh1ail00hhg4p2pmwuaqcp","title":"Submission WUAQCP","payload":{"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 { id: ID!, title: String! }\ntype Query { findBook(id: ID!): Book }"}} {"submissionId":"cmsuh1ail00hig4p20mywnc3y","title":"Submission YWNC3Y","payload":{"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\": \"PENDING\"}}}","schema_definition":"enum Status { ACTIVE INACTIVE PENDING }\ntype User { id: ID!, status: Status! }\ntype Query { user(id: ID!): User }"}} {"submissionId":"cmsuh1ail00hjg4p2qk6prr1w","title":"Submission 6PRR1W","payload":{"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\"}]}","schema_definition":"type Query { withdraw(amount: Float!): Float! }"}} {"submissionId":"cmsuh1ail00hkg4p2w2r9k7ka","title":"Submission R9K7KA","payload":{"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,0) / p.reviews.length }","expected_response":"{\"data\": {\"product\": {\"name\": \"Headphones\", \"reviews\": [{\"rating\": 4}, {\"rating\": 5}, {\"rating\": 3}], \"averageRating\": 4}}}","schema_definition":"type Review { rating: Int! }\ntype Product { name: String!, reviews: [Review!]!, averageRating: Float! }\ntype Query { product: Product }"}} {"submissionId":"cmsuhiol600jrg4p228a1fnne","title":"Submission A1FNNE","payload":{"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 { books(first: Int!): [Book!]! }"}} {"submissionId":"cmsuhiol600jsg4p2jcgzkzzo","title":"Submission GZKZZO","payload":{"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\": \"Toni Morrison\", \"bookCount\": 3}}}","schema_definition":"type Author { name: String!, bookCount: Int! }\ntype Query { author(id: ID!): Author }"}} {"submissionId":"cmsuhiol600jtg4p25nvdwsb9","title":"Submission VDWSB9","payload":{"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 { username: String!, bio: String }\ntype Query { profile(id: ID!): Profile }"}} {"submissionId":"cmsuhiol600jug4p2o7p1cdss","title":"Submission P1CDSS","payload":{"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 { increment(by: Int!): Int! }"}} {"submissionId":"cmsuhiol600jvg4p25ue1futt","title":"Submission E1FUTT","payload":{"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 DELIVERED }\ntype Order { id: ID!, status: OrderStatus! }\ntype Query { order(id: ID!): Order }"}} {"submissionId":"cmsuhl4k400jwg4p2pj5cegbw","title":"Submission 5CEGBW","payload":{"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\": {\"movies\": [{\"title\": \"Dune\", \"year\": 2021}, {\"title\": \"Arrival\", \"year\": 2016}]}}","schema_definition":"type Movie { title: String!, year: Int!, genre: String! }\ntype Query { movies(genre: String!): [Movie!]! }"}} {"submissionId":"cmsuhl4k400jxg4p2056bs0mz","title":"Submission 6BS0MZ","payload":{"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_definition":"type Query { squareRoot(n: Float!): Float! }"}} {"submissionId":"cmsuhl4k400jyg4p2kk1pzpvg","title":"Submission 1PZPVG","payload":{"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\", \"roster\": [{\"name\": \"Sam\", \"position\": \"QB\"}, {\"name\": \"Jo\", \"position\": \"WR\"}]}}}","schema_definition":"type Player { name: String!, position: String! }\ntype Team { name: String!, roster: [Player!]! }\ntype Query { team(name: String!): Team }"}} {"submissionId":"cmsuhl4k400jzg4p216z00gwp","title":"Submission Z00GWP","payload":{"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\", \"price\": 49.99, \"onSale\": true}}}","schema_definition":"type Product { name: String!, price: Float!, onSale: Boolean! }\ntype Query { product(id: ID!): Product }"}} {"submissionId":"cmsuhl4k400k0g4p2159tywli","title":"Submission 9TYWLI","payload":{"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\": \"Call mom\"}]}}","schema_definition":"type Todo { text: String!, done: Boolean! }\ntype Query { todos(done: Boolean!): [Todo!]! }"}} {"submissionId":"cmsujbjjc00m1g4p2qcaz5fq9","title":"Submission AZ5FQ9","payload":{"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: 1932 }] }; return db.books.filter(b => b.author === author); } }","expected_response":"{\"data\": {\"booksByAuthor\": [{\"title\": \"1984\", \"year\": 1949}, {\"title\": \"Animal Farm\", \"year\": 1945}]}}","schema_definition":"type Book { title: String!, author: String!, year: Int! }\ntype Query { booksByAuthor(author: String!): [Book!]! }"}} {"submissionId":"cmsujbjjc00m2g4p29k681ny6","title":"Submission 681NY6","payload":{"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 Query { safeSqrt(n: Float!): Float }"}} {"submissionId":"cmsujbjjc00m3g4p24f615p6n","title":"Submission 615P6N","payload":{"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.filter(o => o.status === status); } }","expected_response":"{\"data\": {\"ordersByStatus\": [{\"id\": \"o1\", \"total\": 59.5}, {\"id\": \"o3\", \"total\": 99}]}}","schema_definition":"type Order { id: ID!, status: String!, total: Float! }\ntype Query { ordersByStatus(status: String!): [Order!]! }"}} {"submissionId":"cmsujbjjc00m4g4p27gbgfo93","title":"Submission BGFO93","payload":{"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\": {\"formatCurrency\": \"$42.50\"}}","schema_definition":"type Query { formatCurrency(amount: Float!, currency: String!): String! }"}} {"submissionId":"cmsujbjjc00m5g4p2i5zgyg9y","title":"Submission ZGYG9Y","payload":{"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; return t; } }","expected_response":"{\"data\": {\"toggleTask\": {\"id\": \"t1\", \"done\": true}}}","schema_definition":"type Task { id: ID!, done: Boolean! }\ntype Mutation { toggleTask(id: ID!): Task }\ntype Query { placeholder: String }"}} {"submissionId":"cmsuk7q7p00qcg4p2qjwciluj","title":"Submission WCILUJ","payload":{"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, Robot\", authorId: \"1\" }\n ],\n reviews: [\n { bookId: \"b1\", stars: 5, comment: \"Classic\" },\n { bookId: \"b1\", stars: 4, comment: \"Great read\" },\n { bookId: \"b2\", stars: 5, comment: \"Loved it\" }\n ]\n };\n return {\n author: (_, {id}) => globalThis.__db1.authors.find(a => a.id === id)\n };\n})(),\nAuthor: {\n books: (author) => globalThis.__db1.books.filter(b => b.authorId === author.id)\n},\nBook: {\n reviews: (book) => globalThis.__db1.reviews.filter(r => r.bookId === book.id)\n}","expected_response":"{\"data\":{\"author\":{\"name\":\"Isaac Asimov\",\"books\":[{\"title\":\"Foundation\",\"reviews\":[{\"stars\":5,\"comment\":\"Classic\"},{\"stars\":4,\"comment\":\"Great read\"}]},{\"title\":\"I, Robot\",\"reviews\":[{\"stars\":5,\"comment\":\"Loved it\"}]}]}}}","schema_definition":"type Review { stars: Int!, comment: String! }\ntype Book { id: ID!, title: String!, reviews: [Review!]! }\ntype Author { id: ID!, name: String!, books: [Book!]! }\ntype Query { author(id: ID!): Author }"}} {"submissionId":"cmsuk7q7p00qdg4p2w7ahncsv","title":"Submission AHNCSV","payload":{"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 = db.orders.find(o => o.id === id);\n if (!order) throw new Error(`order ${id} not found`);\n return order;\n }\n };\n})(),\nOrder: {\n total: (order) => order.items.reduce((sum, i) => sum + i.qty * i.price, 0)\n}","expected_response":"{\"errors\":[{\"message\":\"order o9 not found\"}]}","schema_definition":"type Item { sku: String!, qty: Int!, price: Float! }\ntype Order { id: ID!, customer: String!, items: [Item!]!, total: Float! }\ntype Query { order(id: ID!): Order }"}} {"submissionId":"cmsuk7q7p00qeg4p22pg5jkdo","title":"Submission G5JKDO","payload":{"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: \"Agreed\" }\n ],\n likes: [\n { commentId: \"c1\", user: \"bob\" }\n ]\n };\n return {\n post: (_, {id}) => globalThis.__db3.posts.find(p => p.id === id)\n };\n})(),\nPost: {\n comments: (post) => globalThis.__db3.comments.filter(c => c.postId === post.id)\n},\nComment: {\n likes: (comment) => globalThis.__db3.likes.filter(l => l.commentId === comment.id)\n}","expected_response":"{\"data\":{\"post\":{\"body\":\"Hello social world\",\"comments\":[{\"text\":\"Nice!\",\"likes\":[{\"user\":\"bob\"}]},{\"text\":\"Agreed\",\"likes\":[]}]}}}","schema_definition":"type Like { user: String! }\ntype Comment { id: ID!, text: String!, likes: [Like!]! }\ntype Post { id: ID!, body: String!, comments: [Comment!]! }\ntype Query { post(id: ID!): Post }"}} {"submissionId":"cmsuk7q7p00qfg4p2mc3fr4gi","title":"Submission 3FR4GI","payload":{"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 issue: (_, {id}) => db.issues.find(i => i.id === id)\n };\n})(),\nMutation: (() => {\n const db = {\n issues: [{ id: \"i1\", title: \"Login fails on Safari\", status: \"OPEN\", comments: [] }]\n };\n return {\n addComment: (_, {issueId, author, text}) => {\n const issue = db.issues.find(i => i.id === issueId);\n if (!issue) throw new Error(\"issue not found\");\n issue.comments.push({ author, text });\n return issue;\n }\n };\n})(),\nIssue: {\n comments: (issue) => issue.comments\n}","expected_response":"{\"data\":{\"addComment\":{\"title\":\"Login fails on Safari\",\"status\":\"OPEN\",\"comments\":[{\"author\":\"sam\",\"text\":\"Working on it\"}]}}}","schema_definition":"enum IssueStatus { OPEN, IN_PROGRESS, CLOSED }\ntype Comment { author: String!, text: String! }\ntype Issue { id: ID!, title: String!, status: IssueStatus!, comments: [Comment!]! }\ntype Query { issue(id: ID!): Issue }\ntype Mutation { addComment(issueId: ID!, author: String!, text: String!): Issue }"}} {"submissionId":"cmsuk7q7p00qgg4p27xbtp4xq","title":"Submission BTP4XQ","payload":{"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 === id),\n shipOrder: (_, {warehouseId, sku, qty}) => {\n const wh = db.warehouses.find(w => w.id === warehouseId);\n if (!wh) throw new Error(\"warehouse not found\");\n const product = wh.products.find(p => p.sku === sku);\n if (!product) throw new Error(\"product not found in warehouse\");\n if (qty > product.stock) throw new Error(`insufficient stock: requested ${qty}, available ${product.stock}`);\n product.stock -= qty;\n return product.stock;\n }\n };\n})(),\nWarehouse: {\n products: (wh) => wh.products\n}","expected_response":"{\"errors\":[{\"message\":\"insufficient stock: requested 50, available 12\"}]}","schema_definition":"type Product { sku: String!, stock: Int! }\ntype Warehouse { id: ID!, name: String!, products: [Product!]! }\ntype Query { warehouse(id: ID!): Warehouse, shipOrder(warehouseId: ID!, sku: String!, qty: Int!): Int! }"}} {"submissionId":"cmsuk7q7p00qhg4p2iz9xubw6","title":"Submission 9XUBW6","payload":{"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\" }, { id: \"t2\", name: \"graphql\" }]\n };\n return {\n posts: () => db.posts.map(p => ({ ...p, tags: p.tagIds.map(tid => db.tags.find(t => t.id === tid)) }))\n };\n})()","expected_response":"{\"data\":{\"posts\":[{\"title\":\"GraphQL Basics\",\"tags\":[{\"name\":\"beginner\"},{\"name\":\"graphql\"}]},{\"title\":\"Advanced Resolvers\",\"tags\":[{\"name\":\"graphql\"}]}]}}","schema_definition":"type Tag { name: String! }\ntype Post { id: ID!, title: String!, tags: [Tag!]! }\ntype Query { posts: [Post!]! }"}} {"submissionId":"cmsuk7q7p00qig4p2wckiypkd","title":"Submission KIYPKD","payload":{"sample_query":"{ room(id: \"nope\") { name } }","resolver_code":"Query: (() => {\n globalThis.__db7 = {\n rooms: [\n { id: \"r1\", name: \"general\", messages: [{ text: \"hi\", senderId: \"u1\" }] }\n ],\n users: [{ id: \"u1\", handle: \"nova\" }]\n };\n return {\n room: (_, {id}) => {\n const room = globalThis.__db7.rooms.find(r => r.id === id);\n if (!room) throw new Error(\"room not found\");\n return room;\n }\n };\n})(),\nRoom: {\n messages: (room) => room.messages\n},\nMessage: {\n sender: (message) => globalThis.__db7.users.find(u => u.id === message.senderId)\n}","expected_response":"{\"errors\":[{\"message\":\"room not found\"}]}","schema_definition":"type User { id: ID!, handle: String! }\ntype Message { text: String!, sender: User! }\ntype Room { id: ID!, name: String!, messages: [Message!]! }\ntype Query { room(id: ID!): Room }"}} {"submissionId":"cmsuk7q7p00qkg4p2525ffeap","title":"Submission 5FFEAP","payload":{"sample_query":"mutation { addIngredient(recipeId: \"r1\", name: \"Basil\", grams: 10) { title ingredients { name grams } } }","resolver_code":"Query: (() => {\n const db = {\n recipes: [{ id: \"r1\", title: \"Tomato Soup\", ingredients: [{ name: \"Tomato\", grams: 300 }] }]\n };\n return {\n recipe: (_, {id}) => db.recipes.find(r => r.id === id)\n };\n})(),\nMutation: (() => {\n const db = {\n recipes: [{ id: \"r1\", title: \"Tomato Soup\", ingredients: [{ name: \"Tomato\", grams: 300 }] }]\n };\n return {\n addIngredient: (_, {recipeId, name, grams}) => {\n const recipe = db.recipes.find(r => r.id === recipeId);\n if (!recipe) throw new Error(\"recipe not found\");\n recipe.ingredients.push({ name, grams });\n return recipe;\n }\n };\n})(),\nRecipe: {\n ingredients: (recipe) => recipe.ingredients\n}","expected_response":"{\"data\":{\"addIngredient\":{\"title\":\"Tomato Soup\",\"ingredients\":[{\"name\":\"Tomato\",\"grams\":300},{\"name\":\"Basil\",\"grams\":10}]}}}","schema_definition":"type Ingredient { name: String!, grams: Int! }\ntype Recipe { id: ID!, title: String!, ingredients: [Ingredient!]! }\ntype Query { recipe(id: ID!): Recipe }\ntype Mutation { addIngredient(recipeId: ID!, name: String!, grams: Int!): Recipe }"}} {"submissionId":"cmsuk7q7p00qlg4p2h35t6nu2","title":"Submission 5T6NU2","payload":{"sample_query":"{ department(id: \"d1\") { name employees { name level } } }","resolver_code":"Query: (() => {\n globalThis.__db10 = {\n departments: [{ id: \"d1\", name: \"Engineering\" }],\n employees: [\n { deptId: \"d1\", name: \"Rae\", level: \"SENIOR\" },\n { deptId: \"d1\", name: \"Kip\", level: \"JUNIOR\" }\n ]\n };\n return {\n department: (_, {id}) => globalThis.__db10.departments.find(d => d.id === id)\n };\n})(),\nDepartment: {\n employees: (dept) => globalThis.__db10.employees.filter(e => e.deptId === dept.id)\n}","expected_response":"{\"data\":{\"department\":{\"name\":\"Engineering\",\"employees\":[{\"name\":\"Rae\",\"level\":\"SENIOR\"},{\"name\":\"Kip\",\"level\":\"JUNIOR\"}]}}}","schema_definition":"enum Level { JUNIOR, MID, SENIOR, LEAD }\ntype Employee { name: String!, level: Level! }\ntype Department { id: ID!, name: String!, employees: [Employee!]! }\ntype Query { department(id: ID!): Department }"}} {"submissionId":"cmsuk7q7p00qmg4p2fn60y23b","title":"Submission 60Y23B","payload":{"sample_query":"mutation { withdraw(accountId: \"a1\", amount: 500) { owner balance } }","resolver_code":"Query: (() => {\n const db = { accounts: [{ id: \"a1\", owner: \"Priya\", balance: 200.0 }] };\n return {\n account: (_, {id}) => db.accounts.find(a => a.id === id)\n };\n})(),\nMutation: (() => {\n const db = { accounts: [{ id: \"a1\", owner: \"Priya\", balance: 200.0 }] };\n return {\n withdraw: (_, {accountId, amount}) => {\n const acct = db.accounts.find(a => a.id === accountId);\n if (!acct) throw new Error(\"account not found\");\n if (amount > acct.balance) throw new Error(\"insufficient funds\");\n acct.balance -= amount;\n return acct;\n }\n };\n})()","expected_response":"{\"errors\":[{\"message\":\"insufficient funds\"}]}","schema_definition":"type Account { id: ID!, owner: String!, balance: Float! }\ntype Query { account(id: ID!): Account }\ntype Mutation { withdraw(accountId: ID!, amount: Float!): Account }"}} {"submissionId":"cmsuk7q7p00qng4p2m53cfyw7","title":"Submission 3CFYW7","payload":{"sample_query":"{ student(id: \"s1\") { name grades { course score } average } }","resolver_code":"Query: (() => {\n globalThis.__db12 = {\n students: [{ id: \"s1\", name: \"Meera\" }],\n grades: [\n { studentId: \"s1\", course: \"Math\", score: 88 },\n { studentId: \"s1\", course: \"Physics\", score: 92 }\n ]\n };\n return {\n student: (_, {id}) => globalThis.__db12.students.find(s => s.id === id)\n };\n})(),\nStudent: {\n grades: (student) => globalThis.__db12.grades.filter(g => g.studentId === student.id),\n average: (student) => {\n const grades = globalThis.__db12.grades.filter(g => g.studentId === student.id);\n if (grades.length === 0) return 0;\n return grades.reduce((sum, g) => sum + g.score, 0) / grades.length;\n }\n}","expected_response":"{\"data\":{\"student\":{\"name\":\"Meera\",\"grades\":[{\"course\":\"Math\",\"score\":88},{\"course\":\"Physics\",\"score\":92}],\"average\":90}}}","schema_definition":"type Grade { course: String!, score: Int! }\ntype Student { id: ID!, name: String!, grades: [Grade!]!, average: Float! }\ntype Query { student(id: ID!): Student }"}} {"submissionId":"cmsuk7q7p00qpg4p23lv51f7x","title":"Submission V51F7X","payload":{"sample_query":"{ repo(name: \"acme/widgets\") { name issues { title priority labels { name } } } }","resolver_code":"Query: (() => {\n globalThis.__db14 = {\n repos: [{ name: \"acme/widgets\" }],\n issues: [\n { repoName: \"acme/widgets\", title: \"Crash on save\", priority: \"HIGH\", labelNames: [\"bug\", \"urgent\"] },\n { repoName: \"acme/widgets\", title: \"Typo in docs\", priority: \"LOW\", labelNames: [\"docs\"] }\n ]\n };\n return {\n repo: (_, {name}) => globalThis.__db14.repos.find(r => r.name === name)\n };\n})(),\nRepo: {\n issues: (repo) => globalThis.__db14.issues.filter(i => i.repoName === repo.name)\n},\nIssue: {\n labels: (issue) => issue.labelNames.map(n => ({ name: n }))\n}","expected_response":"{\"data\":{\"repo\":{\"name\":\"acme/widgets\",\"issues\":[{\"title\":\"Crash on save\",\"priority\":\"HIGH\",\"labels\":[{\"name\":\"bug\"},{\"name\":\"urgent\"}]},{\"title\":\"Typo in docs\",\"priority\":\"LOW\",\"labels\":[{\"name\":\"docs\"}]}]}}}","schema_definition":"enum Priority { LOW, MEDIUM, HIGH }\ntype Label { name: String! }\ntype Issue { title: String!, priority: Priority!, labels: [Label!]! }\ntype Repo { name: String!, issues: [Issue!]! }\ntype Query { repo(name: String!): Repo }"}} {"submissionId":"cmsuk7q7p00qqg4p2rbbkrd64","title":"Submission BKRD64","payload":{"sample_query":"{ patient(id: \"p404\") { name appointments { time } } }","resolver_code":"Query: (() => {\n globalThis.__db15 = {\n patients: [{ id: \"p1\", name: \"Jonah\" }],\n appointments: [{ patientId: \"p1\", time: \"09:00\", doctorId: \"doc1\" }],\n doctors: [{ id: \"doc1\", name: \"Dr. Lin\", specialty: \"Cardiology\" }]\n };\n return {\n patient: (_, {id}) => {\n const patient = globalThis.__db15.patients.find(p => p.id === id);\n if (!patient) throw new Error(\"patient not found\");\n return patient;\n }\n };\n})(),\nPatient: {\n appointments: (patient) => globalThis.__db15.appointments.filter(a => a.patientId === patient.id)\n},\nAppointment: {\n doctor: (appt) => globalThis.__db15.doctors.find(d => d.id === appt.doctorId)\n}","expected_response":"{\"errors\":[{\"message\":\"patient not found\"}]}","schema_definition":"type Doctor { name: String!, specialty: String! }\ntype Appointment { time: String!, doctor: Doctor! }\ntype Patient { id: ID!, name: String!, appointments: [Appointment!]! }\ntype Query { patient(id: ID!): Patient }"}} {"submissionId":"cmsuk7q7p00qrg4p2rvm29nja","title":"Submission M29NJA","payload":{"sample_query":"{ album(id: \"al1\") { title tracks { title seconds } } }","resolver_code":"Query: (() => {\n globalThis.__db16 = {\n albums: [{ id: \"al1\", title: \"Nightfall\" }],\n tracks: [\n { albumId: \"al1\", title: \"Dusk\", seconds: 210 },\n { albumId: \"al1\", title: \"Midnight\", seconds: 245 },\n { albumId: \"al1\", title: \"Dawn\", seconds: 198 }\n ]\n };\n return {\n album: (_, {id}) => globalThis.__db16.albums.find(a => a.id === id)\n };\n})(),\nAlbum: {\n tracks: (album, {limit}) => globalThis.__db16.tracks.filter(t => t.albumId === album.id).slice(0, limit)\n}","expected_response":"{\"data\":{\"album\":{\"title\":\"Nightfall\",\"tracks\":[{\"title\":\"Dusk\",\"seconds\":210},{\"title\":\"Midnight\",\"seconds\":245}]}}}","schema_definition":"type Track { title: String!, seconds: Int! }\ntype Album { id: ID!, title: String!, tracks(limit: Int = 2): [Track!]! }\ntype Query { album(id: ID!): Album }"}} {"submissionId":"cmsuk7q7p00qsg4p2bbwmv7lh","title":"Submission WMV7LH","payload":{"sample_query":"{ city(name: \"Metropolis\") { name forecasts { day condition highC } } }","resolver_code":"Query: (() => {\n globalThis.__db17 = {\n cities: [{ name: \"Metropolis\" }],\n forecasts: [\n { cityName: \"Metropolis\", day: \"Mon\", condition: \"SUNNY\", highC: 28 },\n { cityName: \"Metropolis\", day: \"Tue\", condition: \"RAINY\", highC: 21 }\n ]\n };\n return {\n city: (_, {name}) => globalThis.__db17.cities.find(c => c.name === name)\n };\n})(),\nCity: {\n forecasts: (city) => globalThis.__db17.forecasts.filter(f => f.cityName === city.name)\n}","expected_response":"{\"data\":{\"city\":{\"name\":\"Metropolis\",\"forecasts\":[{\"day\":\"Mon\",\"condition\":\"SUNNY\",\"highC\":28},{\"day\":\"Tue\",\"condition\":\"RAINY\",\"highC\":21}]}}}","schema_definition":"enum Condition { SUNNY, CLOUDY, RAINY, SNOWY }\ntype Forecast { day: String!, condition: Condition!, highC: Int! }\ntype City { name: String!, forecasts: [Forecast!]! }\ntype Query { city(name: String!): City }"}} {"submissionId":"cmsuk7q7p00qtg4p2sr2we1dt","title":"Submission 2WE1DT","payload":{"sample_query":"mutation { recordMatch(winnerId: \"t1\", loserId: \"t2\") { name wins losses } }","resolver_code":"Query: (() => {\n const db = {\n teams: [\n { id: \"t1\", name: \"Falcons\", wins: 4, losses: 1 },\n { id: \"t2\", name: \"Otters\", wins: 2, losses: 3 }\n ]\n };\n return {\n team: (_, {id}) => db.teams.find(t => t.id === id)\n };\n})(),\nMutation: (() => {\n const db = {\n teams: [\n { id: \"t1\", name: \"Falcons\", wins: 4, losses: 1 },\n { id: \"t2\", name: \"Otters\", wins: 2, losses: 3 }\n ]\n };\n return {\n recordMatch: (_, {winnerId, loserId}) => {\n const winner = db.teams.find(t => t.id === winnerId);\n const loser = db.teams.find(t => t.id === loserId);\n if (!winner || !loser) throw new Error(\"team not found\");\n winner.wins += 1;\n loser.losses += 1;\n return winner;\n }\n };\n})()","expected_response":"{\"data\":{\"recordMatch\":{\"name\":\"Falcons\",\"wins\":5,\"losses\":1}}}","schema_definition":"type Team { id: ID!, name: String!, wins: Int!, losses: Int! }\ntype Query { team(id: ID!): Team }\ntype Mutation { recordMatch(winnerId: ID!, loserId: ID!): Team }"}} {"submissionId":"cmsuk7q7p00qug4p2k3b7wvhf","title":"Submission B7WVHF","payload":{"sample_query":"{ listing(id: \"l1\") { address price agent { name } } }","resolver_code":"Query: (() => {\n globalThis.__db19 = {\n listings: [{ id: \"l1\", address: \"12 Elm St\", price: 425000, agentId: \"missing-agent\" }],\n agents: [{ id: \"ag1\", name: \"Rosa Diaz\" }]\n };\n return {\n listing: (_, {id}) => globalThis.__db19.listings.find(l => l.id === id)\n };\n})(),\nListing: {\n agent: (listing) => globalThis.__db19.agents.find(a => a.id === listing.agentId) || null\n}","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Listing.agent.\"}]}","schema_definition":"type Agent { name: String! }\ntype Listing { id: ID!, address: String!, price: Float!, agent: Agent! }\ntype Query { listing(id: ID!): Listing }"}} {"submissionId":"cmsumxkvi011cg4p2hilr9n6m","title":"Submission LR9N6M","payload":{"sample_query":"{ reading { celsius fahrenheit } }","resolver_code":"Query: { reading: () => ({celsius: 21.5, fahrenheit: -999}) },\nReading: { fahrenheit: (r) => r.celsius * 9 / 5 + 32 }","expected_response":"{\"data\":{\"reading\":{\"celsius\":21.5,\"fahrenheit\":70.7}}}","schema_definition":"type Reading { celsius: Float!, fahrenheit: Float! }\ntype Query { reading: Reading! }"}} {"submissionId":"cmsumxkvi011dg4p2u6j6q6mr","title":"Submission J6Q6MR","payload":{"sample_query":"{ account { id nickname displayName } }","resolver_code":"Query: { account: () => ({id: 'a1', nickname: 'old', displayName: 'New Name'}) }","expected_response":"{\"data\":{\"account\":{\"id\":\"a1\",\"nickname\":\"old\",\"displayName\":\"New Name\"}}}","schema_definition":"type Account { id: ID!, nickname: String @deprecated(reason: \"use displayName\"), displayName: String! }\ntype Query { account: Account! }"}} {"submissionId":"cmsumxkvj011eg4p202nrvz84","title":"Submission NRVZ84","payload":{"sample_query":"{ current __type(name: \"Priority\") { name enumValues { name } } }","resolver_code":"Query: { current: () => 'MEDIUM' }","expected_response":"{\"data\":{\"current\":\"MEDIUM\",\"__type\":{\"name\":\"Priority\",\"enumValues\":[{\"name\":\"LOW\"},{\"name\":\"MEDIUM\"},{\"name\":\"HIGH\"}]}}}","schema_definition":"enum Priority { LOW MEDIUM HIGH }\ntype Query { current: Priority! }"}} {"submissionId":"cmsumxkvj011fg4p2z7nxvogf","title":"Submission NXVOGF","payload":{"sample_query":"{ sparse dense }","resolver_code":"Query: { sparse: () => [1, null, 3], dense: () => [4, null, 6] }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Query.dense.\"}],\"data\":{\"sparse\":[1,null,3],\"dense\":null}}","schema_definition":"type Query { sparse: [Int], dense: [Int!] }"}} {"submissionId":"cmsumxkvj011gg4p22k1t1x73","title":"Submission 1T1X73","payload":{"sample_query":"{ basket { items all: count total: count(startsWith: \"ap\") } }","resolver_code":"Query: { basket: () => ({items: ['apple', 'apricot', 'banana', 'cherry']}) },\nBasket: { count: (b, {startsWith}) => startsWith ? b.items.filter(i => i.startsWith(startsWith)).length : b.items.length }","expected_response":"{\"data\":{\"basket\":{\"items\":[\"apple\",\"apricot\",\"banana\",\"cherry\"],\"all\":4,\"total\":2}}}","schema_definition":"type Basket { items: [String!]!, count(startsWith: String): Int! }\ntype Query { basket: Basket! }"}} {"submissionId":"cmsv745kg01aag4p2xmrdi1ga","title":"Submission RDI1GA","payload":{"sample_query":"{ company { name departments { name employees { name title } } } }","resolver_code":"Query: { company: () => ({ name: 'Initech', departments: [ { id: 'd1', name: 'Engineering' }, { id: 'd2', name: 'Sales' } ] }) },\nCompany: { departments: (c) => c.departments },\nDepartment: { employees: (dept) => { const all = { d1: [ {id:'e1', name:'Peter', title:'Engineer'}, {id:'e2', name:'Samir', title:'Engineer'} ], d2: [ {id:'e3', name:'Bill', title:'Sales Rep'} ] }; return all[dept.id] || []; } }","expected_response":"{\"data\":{\"company\":{\"name\":\"Initech\",\"departments\":[{\"name\":\"Engineering\",\"employees\":[{\"name\":\"Peter\",\"title\":\"Engineer\"},{\"name\":\"Samir\",\"title\":\"Engineer\"}]},{\"name\":\"Sales\",\"employees\":[{\"name\":\"Bill\",\"title\":\"Sales Rep\"}]}]}}}","schema_definition":"type Employee { id: ID!, name: String!, title: String! }\ntype Department { id: ID!, name: String!, employees: [Employee!]! }\ntype Company { name: String!, departments: [Department!]! }\ntype Query { company: Company! }"}} {"submissionId":"cmsv74niu01ajg4p23req7nkx","title":"Submission EQ7NKX","payload":{"sample_query":"{ posts(offset: 1, limit: 2) { items { title } hasNextPage } }","resolver_code":"Query: { posts: (_, {offset, limit}) => { const all = [ {id:'p1', title:'First'}, {id:'p2', title:'Second'}, {id:'p3', title:'Third'}, {id:'p4', title:'Fourth'} ]; const slice = all.slice(offset, offset + limit); return { items: slice, hasNextPage: offset + limit < all.length }; } }","expected_response":"{\"data\":{\"posts\":{\"items\":[{\"title\":\"Second\"},{\"title\":\"Third\"}],\"hasNextPage\":true}}}","schema_definition":"type Post { id: ID!, title: String! }\ntype PostConnection { items: [Post!]!, hasNextPage: Boolean! }\ntype Query { posts(offset: Int!, limit: Int!): PostConnection! }"}} {"submissionId":"cmsv756cq01atg4p2rj2u9gm0","title":"Submission 2U9GM0","payload":{"sample_query":"mutation { createUser(input: { username: \"nova\", email: \"nova@example.com\" }) { id username email } }","resolver_code":"Mutation: { createUser: (_, {input}) => { const nextId = String(100 + input.username.length); return { id: nextId, username: input.username, email: input.email }; } }","expected_response":"{\"data\":{\"createUser\":{\"id\":\"104\",\"username\":\"nova\",\"email\":\"nova@example.com\"}}}","schema_definition":"type User { id: ID!, username: String!, email: String! }\ninput CreateUserInput { username: String!, email: String! }\ntype Mutation { createUser(input: CreateUserInput!): User! }\ntype Query { _empty: String }"}} {"submissionId":"cmsv75kt501b4g4p2alwubliq","title":"Submission WUBLIQ","payload":{"sample_query":"mutation { withdraw(accountId: \"a1\", amount: 75) { id balance } }","resolver_code":"Mutation: { withdraw: (_, {accountId, amount}) => { const accounts = { a1: { id: 'a1', balance: 50 } }; const acct = accounts[accountId]; if (!acct) throw new Error('account not found'); if (amount > acct.balance) throw new Error('insufficient funds'); acct.balance -= amount; return acct; } }","expected_response":"{\"errors\":[{\"message\":\"insufficient funds\",\"locations\":[{\"line\":1,\"column\":12}],\"path\":[\"withdraw\"]}],\"data\":null}","schema_definition":"type Account { id: ID!, balance: Float! }\ntype Mutation { withdraw(accountId: ID!, amount: Float!): Account! }\ntype Query { _empty: String }"}} {"submissionId":"cmsv761dl01bfg4p25i1jx777","title":"Submission 1JX777","payload":{"sample_query":"{ user(id: \"1\") { name profile { bio } } }","resolver_code":"Query: { user: (_, {id}) => { if (id !== '1') return null; return { id: '1', name: 'Grace' }; } },\nUser: { profile: (user) => { throw new Error('profile service unavailable'); } }","expected_response":"{\"errors\":[{\"message\":\"profile service unavailable\",\"locations\":[{\"line\":1,\"column\":24}],\"path\":[\"user\",\"profile\"]}],\"data\":{\"user\":null}}","schema_definition":"type Profile { bio: String! }\ntype User { id: ID!, name: String!, profile: Profile! }\ntype Query { user(id: ID!): User }"}} {"submissionId":"cmsv76gbv01bqg4p23zwx0m6b","title":"Submission WX0M6B","payload":{"sample_query":"{ event(id: \"ev1\") { name startsAt } }","resolver_code":"Query: { event: (_, {id}) => ({ id, name: 'Launch Party', startsAt: '2026-09-01T18:00:00.000Z' }) }","expected_response":"{\"data\":{\"event\":{\"name\":\"Launch Party\",\"startsAt\":\"2026-09-01T18:00:00.000Z\"}}}","schema_definition":"scalar DateTime\ntype Event { id: ID!, name: String!, startsAt: DateTime! }\ntype Query { event(id: ID!): Event }"}} {"submissionId":"cmsv76u3101c0g4p2znr56ism","title":"Submission R56ISM","payload":{"sample_query":"{ widget(id: \"w1\") { id config } }","resolver_code":"Query: { widget: (_, {id}) => ({ id, config: { color: 'blue', size: 12, tags: ['a', 'b'] } }) }","expected_response":"{\"data\":{\"widget\":{\"id\":\"w1\",\"config\":{\"color\":\"blue\",\"size\":12,\"tags\":[\"a\",\"b\"]}}}}","schema_definition":"scalar JSON\ntype Widget { id: ID!, config: JSON! }\ntype Query { widget(id: ID!): Widget }"}} {"submissionId":"cmsv779me01cbg4p2eiqw7ks9","title":"Submission QW7KS9","payload":{"sample_query":"{ shapes { id area ... on Circle { radius } ... on Rectangle { width height } } }","resolver_code":"Query: { shapes: () => [ { __typename: 'Circle', id: 's1', radius: 2, area: Math.round(Math.PI * 2 * 2 * 100) / 100 }, { __typename: 'Rectangle', id: 's2', width: 3, height: 4, area: 12 } ] }","expected_response":"{\"data\":{\"shapes\":[{\"id\":\"s1\",\"area\":12.57,\"radius\":2},{\"id\":\"s2\",\"area\":12,\"width\":3,\"height\":4}]}}","schema_definition":"interface Shape { id: ID!, area: Float! }\ntype Circle implements Shape { id: ID!, area: Float!, radius: Float! }\ntype Rectangle implements Shape { id: ID!, area: Float!, width: Float!, height: Float! }\ntype Query { shapes: [Shape!]! }"}} {"submissionId":"cmsv77qk301cmg4p2e5sh4g3i","title":"Submission SH4G3I","payload":{"sample_query":"{ search(term: \"a\") { ... on Book { title } ... on Author { name } } }","resolver_code":"Query: { search: (_, {term}) => { const results = [ { __typename: 'Book', id: 'b1', title: 'GraphQL in Action' }, { __typename: 'Author', id: 'a1', name: 'Samer' } ]; return results.filter(r => (r.title || r.name).toLowerCase().includes(term.toLowerCase())); } }","expected_response":"{\"data\":{\"search\":[{\"title\":\"GraphQL in Action\"},{\"name\":\"Samer\"}]}}","schema_definition":"type Book { id: ID!, title: String! }\ntype Author { id: ID!, name: String! }\nunion SearchResult = Book | Author\ntype Query { search(term: String!): [SearchResult!]! }"}} {"submissionId":"cmsv785l101cwg4p2jes42s44","title":"Submission S42S44","payload":{"sample_query":"{ books { title author { name } } }","resolver_code":"Query: { books: () => [ {id:'b1', title:'Book One', authorId:'a1'}, {id:'b2', title:'Book Two', authorId:'a2'}, {id:'b3', title:'Book Three', authorId:'a1'} ] },\nBook: { author: (book) => { const authorMap = { a1: {id:'a1', name:'Alice'}, a2: {id:'a2', name:'Bob'} }; return authorMap[book.authorId]; } }","expected_response":"{\"data\":{\"books\":[{\"title\":\"Book One\",\"author\":{\"name\":\"Alice\"}},{\"title\":\"Book Two\",\"author\":{\"name\":\"Bob\"}},{\"title\":\"Book Three\",\"author\":{\"name\":\"Alice\"}}]}}","schema_definition":"type Author { id: ID!, name: String! }\ntype Book { id: ID!, title: String!, author: Author! }\ntype Query { books: [Book!]! }"}} {"submissionId":"cmsv78k3y01d7g4p2m2dbfjek","title":"Submission DBFJEK","payload":{"sample_query":"{ products(minPrice: 5) { name price } }","resolver_code":"Query: { products: (_, {minPrice}) => { const all = [ {id:'p1', name:'Widget', price: 9.99}, {id:'p2', name:'Gadget', price: 19.99}, {id:'p3', name:'Gizmo', price: 4.5} ]; if (minPrice == null) return all; return all.filter(p => p.price >= minPrice); } }","expected_response":"{\"data\":{\"products\":[{\"name\":\"Widget\",\"price\":9.99},{\"name\":\"Gadget\",\"price\":19.99}]}}","schema_definition":"type Product { id: ID!, name: String!, price: Float! }\ntype Query { products(minPrice: Float): [Product!]! }"}} {"submissionId":"cmsv78zxl01dhg4p2rjs9oix7","title":"Submission S9OIX7","payload":{"sample_query":"{ items(first: 2, after: \"n1\") { edges { cursor node { label } } pageInfo { hasNextPage endCursor } } }","resolver_code":"Query: { items: (_, {first, after}) => { const all = [ {id:'n1', label:'Alpha'}, {id:'n2', label:'Beta'}, {id:'n3', label:'Gamma'}, {id:'n4', label:'Delta'} ]; const startIndex = after ? all.findIndex(n => n.id === after) + 1 : 0; const slice = all.slice(startIndex, startIndex + first); const edges = slice.map(n => ({ cursor: n.id, node: n })); const hasNextPage = startIndex + first < all.length; return { edges, pageInfo: { hasNextPage, endCursor: edges.length ? edges[edges.length - 1].cursor : null } }; } }","expected_response":"{\"data\":{\"items\":{\"edges\":[{\"cursor\":\"n2\",\"node\":{\"label\":\"Beta\"}},{\"cursor\":\"n3\",\"node\":{\"label\":\"Gamma\"}}],\"pageInfo\":{\"hasNextPage\":true,\"endCursor\":\"n3\"}}}}","schema_definition":"type Node { id: ID!, label: String! }\ntype Edge { cursor: String!, node: Node! }\ntype PageInfo { hasNextPage: Boolean!, endCursor: String }\ntype Connection { edges: [Edge!]!, pageInfo: PageInfo! }\ntype Query { items(first: Int!, after: String): Connection! }"}} {"submissionId":"cmsv79k2t01dtg4p2kic9hk9p","title":"Submission C9HK9P","payload":{"sample_query":"mutation { transfer(fromId: \"a1\", toId: \"a2\", amount: 30) { from { id balance } to { id balance } } }","resolver_code":"Mutation: { transfer: (_, {fromId, toId, amount}) => { const accounts = { a1: { id: 'a1', balance: 100 }, a2: { id: 'a2', balance: 20 } }; const from = accounts[fromId]; const to = accounts[toId]; if (!from || !to) throw new Error('unknown account'); if (from.balance < amount) throw new Error('insufficient funds'); from.balance -= amount; to.balance += amount; return { from, to }; } }","expected_response":"{\"data\":{\"transfer\":{\"from\":{\"id\":\"a1\",\"balance\":70},\"to\":{\"id\":\"a2\",\"balance\":50}}}}","schema_definition":"type Account { id: ID!, balance: Float! }\ntype TransferResult { from: Account!, to: Account! }\ntype Mutation { transfer(fromId: ID!, toId: ID!, amount: Float!): TransferResult! }\ntype Query { _empty: String }"}} {"submissionId":"cmsv79xhr01e4g4p2je7eu0x8","title":"Submission 7EU0X8","payload":{"sample_query":"{ secret(token: \"wrong-token\") { value } }","resolver_code":"Query: { secret: (_, {token}) => { if (token !== 'valid-token') { const err = new Error('not authenticated'); err.extensions = { code: 'UNAUTHENTICATED' }; throw err; } return { value: 'top-secret-data' }; } }","expected_response":"{\"errors\":[{\"message\":\"not authenticated\",\"locations\":[{\"line\":1,\"column\":3}],\"path\":[\"secret\"],\"extensions\":{\"code\":\"UNAUTHENTICATED\"}}],\"data\":null}","schema_definition":"type Secret { value: String! }\ntype Query { secret(token: String!): Secret! }"}} {"submissionId":"cmsv7acqm01efg4p2cd4t8abo","title":"Submission 4T8ABO","payload":{"sample_query":"{ tickets(status: IN_PROGRESS) { title status } }","resolver_code":"Query: { tickets: (_, {status}) => { const all = [ {id:'t1', title:'Fix login', status:'OPEN'}, {id:'t2', title:'Add dark mode', status:'IN_PROGRESS'}, {id:'t3', title:'Old bug', status:'CLOSED'} ]; if (!status) return all; return all.filter(t => t.status === status); } }","expected_response":"{\"data\":{\"tickets\":[{\"title\":\"Add dark mode\",\"status\":\"IN_PROGRESS\"}]}}","schema_definition":"enum Status { OPEN, IN_PROGRESS, CLOSED }\ntype Ticket { id: ID!, title: String!, status: Status! }\ntype Query { tickets(status: Status): [Ticket!]! }"}} {"submissionId":"cmsv7atfj01emg4p2jcqx6m4i","title":"Submission QX6M4I","payload":{"sample_query":"mutation { createOrder(items: [ { sku: \"SKU1\", quantity: 2, unitPrice: 5.5 }, { sku: \"SKU2\", quantity: 1, unitPrice: 10 } ]) { id lineItems { sku quantity unitPrice } total } }","resolver_code":"Mutation: { createOrder: (_, {items}) => ({ id: 'ord-1', lineItems: items }) },\nOrder: { total: (order) => order.lineItems.reduce((sum, li) => sum + li.quantity * li.unitPrice, 0) }","expected_response":"{\"data\":{\"createOrder\":{\"id\":\"ord-1\",\"lineItems\":[{\"sku\":\"SKU1\",\"quantity\":2,\"unitPrice\":5.5},{\"sku\":\"SKU2\",\"quantity\":1,\"unitPrice\":10}],\"total\":21}}}","schema_definition":"type LineItem { sku: String!, quantity: Int!, unitPrice: Float! }\ntype Order { id: ID!, lineItems: [LineItem!]!, total: Float! }\ninput LineItemInput { sku: String!, quantity: Int!, unitPrice: Float! }\ntype Mutation { createOrder(items: [LineItemInput!]!): Order! }\ntype Query { _empty: String }"}} {"submissionId":"cmsv7b9fh01etg4p2zc4q9qv7","title":"Submission 4Q9QV7","payload":{"sample_query":"{ leaderboard(sortBy: \"score\", order: DESC) { name score } }","resolver_code":"Query: { leaderboard: (_, {sortBy, order}) => { const all = [ {id:'p1', name:'Nia', score: 42}, {id:'p2', name:'Omar', score: 88}, {id:'p3', name:'Lee', score: 15} ]; const sorted = [...all].sort((a,b) => a[sortBy] > b[sortBy] ? 1 : -1); return order === 'DESC' ? sorted.reverse() : sorted; } }","expected_response":"{\"data\":{\"leaderboard\":[{\"name\":\"Omar\",\"score\":88},{\"name\":\"Nia\",\"score\":42},{\"name\":\"Lee\",\"score\":15}]}}","schema_definition":"enum SortOrder { ASC, DESC }\ntype Player { id: ID!, name: String!, score: Int! }\ntype Query { leaderboard(sortBy: String!, order: SortOrder!): [Player!]! }"}} {"submissionId":"cmsv7bnlg01ezg4p22u5admyl","title":"Submission 5ADMYL","payload":{"sample_query":"{ vehicles { id wheels ... on Car { trunkCapacityLiters } ... on Truck { maxPayloadKg } } }","resolver_code":"Query: { vehicles: () => [ { __typename: 'Car', id: 'v1', wheels: 4, trunkCapacityLiters: 400 }, { __typename: 'Truck', id: 'v2', wheels: 6, maxPayloadKg: 5000 } ] }","expected_response":"{\"data\":{\"vehicles\":[{\"id\":\"v1\",\"wheels\":4,\"trunkCapacityLiters\":400},{\"id\":\"v2\",\"wheels\":6,\"maxPayloadKg\":5000}]}}","schema_definition":"interface Vehicle { id: ID!, wheels: Int! }\ntype Car implements Vehicle { id: ID!, wheels: Int!, trunkCapacityLiters: Int! }\ntype Truck implements Vehicle { id: ID!, wheels: Int!, maxPayloadKg: Int! }\ntype Query { vehicles: [Vehicle!]! }"}} {"submissionId":"cmsv7c18x01f3g4p24ocivpwf","title":"Submission CIVPWF","payload":{"sample_query":"mutation { publishArticle(title: \"\") { ... on Article { id title } ... on ValidationError { field message } } }","resolver_code":"Mutation: { publishArticle: (_, {title}) => { if (title.trim().length === 0) { return { __typename: 'ValidationError', field: 'title', message: 'title must not be empty' }; } return { __typename: 'Article', id: 'art-1', title }; } }","expected_response":"{\"data\":{\"publishArticle\":{\"field\":\"title\",\"message\":\"title must not be empty\"}}}","schema_definition":"type Article { id: ID!, title: String! }\ntype ValidationError { field: String!, message: String! }\nunion PublishResult = Article | ValidationError\ntype Mutation { publishArticle(title: String!): PublishResult! }\ntype Query { _empty: String }"}} {"submissionId":"cmsv7ch0u01f8g4p2z5zfugvx","title":"Submission ZFUGVX","payload":{"sample_query":"{ items { name category { name } } }","resolver_code":"Query: { items: () => [ {id:'i1', name:'Hammer', categoryId:'c1'}, {id:'i2', name:'Screwdriver', categoryId:'c1'}, {id:'i3', name:'Bolt', categoryId:'c2'}, {id:'i4', name:'Nail', categoryId:'c2'} ] },\nItem: { category: (item) => { const categories = { c1: {id:'c1', name:'Tools'}, c2: {id:'c2', name:'Hardware'} }; return categories[item.categoryId]; } }","expected_response":"{\"data\":{\"items\":[{\"name\":\"Hammer\",\"category\":{\"name\":\"Tools\"}},{\"name\":\"Screwdriver\",\"category\":{\"name\":\"Tools\"}},{\"name\":\"Bolt\",\"category\":{\"name\":\"Hardware\"}},{\"name\":\"Nail\",\"category\":{\"name\":\"Hardware\"}}]}}","schema_definition":"type Category { id: ID!, name: String! }\ntype Item { id: ID!, name: String!, category: Category! }\ntype Query { items: [Item!]! }"}} {"submissionId":"cmsv7ea5701fmg4p2ixp4q56s","title":"Submission P4Q56S","payload":{"sample_query":"{ books { title author { name } } }","resolver_code":"Query: { books: () => [ {id:'b1', title:'Book One', authorId:'a1'}, {id:'b2', title:'Book Two', authorId:'a2'}, {id:'b3', title:'Book Three', authorId:'a1'} ] },\nBook: { author: (book) => { const authorsById = { a1: {id:'a1', name:'Alice'}, a2: {id:'a2', name:'Bob'} }; return authorsById[book.authorId]; } }","expected_response":"{\"data\":{\"books\":[{\"title\":\"Book One\",\"author\":{\"name\":\"Alice\"}},{\"title\":\"Book Two\",\"author\":{\"name\":\"Bob\"}},{\"title\":\"Book Three\",\"author\":{\"name\":\"Alice\"}}]}}","schema_definition":"type Author { id: ID!, name: String! }\ntype Book { id: ID!, title: String!, author: Author! }\ntype Query { books: [Book!]! }"}} {"submissionId":"cmsv7eoev01fpg4p2jzyk3pdx","title":"Submission YK3PDX","payload":{"sample_query":"{ items { name category { name } } }","resolver_code":"Query: { items: () => [ {id:'i1', name:'Hammer', categoryId:'c1'}, {id:'i2', name:'Screwdriver', categoryId:'c1'}, {id:'i3', name:'Bolt', categoryId:'c2'}, {id:'i4', name:'Nail', categoryId:'c2'} ] },\nItem: { category: (item) => { const categoriesById = { c1: {id:'c1', name:'Tools'}, c2: {id:'c2', name:'Hardware'} }; return categoriesById[item.categoryId]; } }","expected_response":"{\"data\":{\"items\":[{\"name\":\"Hammer\",\"category\":{\"name\":\"Tools\"}},{\"name\":\"Screwdriver\",\"category\":{\"name\":\"Tools\"}},{\"name\":\"Bolt\",\"category\":{\"name\":\"Hardware\"}},{\"name\":\"Nail\",\"category\":{\"name\":\"Hardware\"}}]}}","schema_definition":"type Category { id: ID!, name: String! }\ntype Item { id: ID!, name: String!, category: Category! }\ntype Query { items: [Item!]! }"}} {"submissionId":"cmsv8f8nl01heg4p21eb1uvgk","title":"Submission B1UVGK","payload":{"sample_query":"{ withArg: greet(name: \"Ada\") explicitDefault: greet }","resolver_code":"Query: {\n greet: (_, { name }) => `Hello, ${name}!`\n}","expected_response":"{\"data\":{\"withArg\":\"Hello, Ada!\",\"explicitDefault\":\"Hello, World!\"}}","schema_definition":"type Query {\n greet(name: String = \"World\"): String!\n}"}} {"submissionId":"cmsv8ghvo01hjg4p2ntb8imwq","title":"Submission B8IMWQ","payload":{"sample_query":"{ defaultOpts: itemCount overrideLimit: itemCount(opts: { limit: 5 }) fullOverride: itemCount(opts: { limit: 2, includeArchived: true }) }","resolver_code":"Query: {\n itemCount: (_, { opts }) => `limit=${opts.limit},archived=${opts.includeArchived}`\n}","expected_response":"{\"data\":{\"defaultOpts\":\"limit=10,archived=false\",\"overrideLimit\":\"limit=5,archived=false\",\"fullOverride\":\"limit=2,archived=true\"}}","schema_definition":"input PageOptions {\n limit: Int = 10\n includeArchived: Boolean = false\n}\ntype Query {\n itemCount(opts: PageOptions = {}): String!\n}"}} {"submissionId":"cmsv8hr3701hog4p2u8sr9tuw","title":"Submission SR9TUW","payload":{"sample_query":"{ alice: user(id: \"1\") { name } bob: user(id: \"2\") { name } missing: user(id: \"9\") { name } }","resolver_code":"Query: {\n user: (_, { id }) => {\n const users = { \"1\": { id: \"1\", name: \"Ada\" }, \"2\": { id: \"2\", name: \"Grace\" } };\n return users[id] || null;\n }\n}","expected_response":"{\"data\":{\"alice\":{\"name\":\"Ada\"},\"bob\":{\"name\":\"Grace\"},\"missing\":null}}","schema_definition":"type User {\n id: ID!\n name: String!\n}\ntype Query {\n user(id: ID!): User\n}"}} {"submissionId":"cmsv8irei01hsg4p2x1f13913","title":"Submission F13913","payload":{"sample_query":"mutation { first: createNote(text: \"buy milk\") { id text } second: createNote(text: \"walk dog\") { id text } }","resolver_code":"Mutation: {\n createNote: (() => {\n let seq = 0;\n return (_, { text }) => {\n seq += 1;\n return { id: String(seq), text };\n };\n })()\n}","expected_response":"{\"data\":{\"first\":{\"id\":\"1\",\"text\":\"buy milk\"},\"second\":{\"id\":\"2\",\"text\":\"walk dog\"}}}","schema_definition":"type Note {\n id: ID!\n text: String!\n}\ntype Query {\n _empty: Boolean\n}\ntype Mutation {\n createNote(text: String!): Note!\n}"}} {"submissionId":"cmsv8jfw001hwg4p2rx0ug26l","title":"Submission 0UG26L","payload":{"sample_query":"query { books { ...BookFields } } fragment BookFields on Book { id title pages }","resolver_code":"Query: {\n books: () => ([\n { id: \"1\", title: \"Dune\", pages: 412 },\n { id: \"2\", title: \"Foundation\", pages: 255 },\n ])\n}","expected_response":"{\"data\":{\"books\":[{\"id\":\"1\",\"title\":\"Dune\",\"pages\":412},{\"id\":\"2\",\"title\":\"Foundation\",\"pages\":255}]}}","schema_definition":"type Book {\n id: ID!\n title: String!\n pages: Int!\n}\ntype Query {\n books: [Book!]!\n}"}} {"submissionId":"cmsv8k15201i0g4p21p3pjfjs","title":"Submission 3PJFJS","payload":{"sample_query":"query { articles { id tags { ...TagFields } } } fragment TagFields on Tag { label }","resolver_code":"Query: {\n articles: () => ([\n { id: \"1\", tags: [{ label: \"graphql\" }, { label: \"node\" }] },\n { id: \"2\", tags: [{ label: \"testing\" }] },\n ])\n}","expected_response":"{\"data\":{\"articles\":[{\"id\":\"1\",\"tags\":[{\"label\":\"graphql\"},{\"label\":\"node\"}]},{\"id\":\"2\",\"tags\":[{\"label\":\"testing\"}]}]}}","schema_definition":"type Tag {\n label: String!\n}\ntype Article {\n id: ID!\n tags: [Tag!]!\n}\ntype Query {\n articles: [Article!]!\n}"}} {"submissionId":"cmsv8kk8701i4g4p2murn6dck","title":"Submission RN6DCK","payload":{"sample_query":"{ searchProducts(category: \"tools\", minPrice: 10, maxPrice: 50, sortBy: \"price\") { name price } }","resolver_code":"Query: { searchProducts: (_, { category, minPrice, maxPrice, sortBy }) => {\n const catalog = [\n { id: \"1\", name: \"Wrench\", category: \"tools\", price: 12.5 },\n { id: \"2\", name: \"Hammer\", category: \"tools\", price: 9.99 },\n { id: \"3\", name: \"Drill\", category: \"tools\", price: 45.0 },\n { id: \"4\", name: \"Nail\", category: \"hardware\", price: 0.5 },\n { id: \"5\", name: \"Bolt\", category: \"hardware\", price: 0.75 }\n ];\n const filtered = catalog.filter(p => p.category === category && p.price >= minPrice && p.price <= maxPrice);\n return [...filtered].sort((a, b) => sortBy === \"price\" ? a.price - b.price : a.name.localeCompare(b.name));\n} }","expected_response":"{\"data\":{\"searchProducts\":[{\"name\":\"Wrench\",\"price\":12.5},{\"name\":\"Drill\",\"price\":45}]}}","schema_definition":"type Product { id: ID!, name: String!, category: String!, price: Float! }\ntype Query { searchProducts(category: String!, minPrice: Float!, maxPrice: Float!, sortBy: String!): [Product!]! }"}} {"submissionId":"cmsv8l1qi01i8g4p2qae4s3rd","title":"Submission E4S3RD","payload":{"sample_query":"{ topComment(minLikes: 3) { id text likes } }","resolver_code":"Query: { topComment: (_, { minLikes }) => { const comments = [{id:\"1\", text:\"Great post!\", likes: 5}, {id:\"2\", text:\"Meh\", likes: 1}]; return comments.find(c => c.likes >= minLikes) || null; } }","expected_response":"{\"data\": {\"topComment\": {\"id\": \"1\", \"text\": \"Great post!\", \"likes\": 5}}}","schema_definition":"type Comment { id: ID!, text: String!, likes: Int! }\ntype Query { topComment(minLikes: Int!): Comment }"}} {"submissionId":"cmsv8ljw301ibg4p2u2srcz6g","title":"Submission SRCZ6G","payload":{"sample_query":"{ profile { id name email @include(if: false) } }","resolver_code":"Query: {\n profile: () => ({ id: \"1\", name: \"Ada Lovelace\", email: \"ada@example.com\" })\n}","expected_response":"{\"data\":{\"profile\":{\"id\":\"1\",\"name\":\"Ada Lovelace\"}}}","schema_definition":"type Profile {\n id: ID!\n name: String!\n email: String!\n}\ntype Query {\n profile: Profile!\n}"}} {"submissionId":"cmsv8m2s801ieg4p2exehbnoz","title":"Submission EHBNOZ","payload":{"sample_query":"{ estimatedDelivery(orderPlacedDaysAgo: 2, shippingSpeed: \"express\") }","resolver_code":"Query: { estimatedDelivery: (_, { orderPlacedDaysAgo, shippingSpeed }) => { const speeds = { standard: 7, express: 3, overnight: 1 }; const totalDays = speeds[shippingSpeed] ?? 7; const remaining = Math.max(totalDays - orderPlacedDaysAgo, 0); return remaining === 0 ? \"Arriving today\" : `Arriving in ${remaining} day(s)`; } }","expected_response":"{\"data\": {\"estimatedDelivery\": \"Arriving in 1 day(s)\"}}","schema_definition":"type Query { estimatedDelivery(orderPlacedDaysAgo: Int!, shippingSpeed: String!): String! }"}} {"submissionId":"cmsv8me6e01ifg4p2nd05u54o","title":"Submission 05U54O","payload":{"sample_query":"{ ticket { id subject internalNotes @skip(if: true) status } }","resolver_code":"Query: {\n ticket: () => ({ id: \"T-100\", subject: \"Login issue\", internalNotes: \"Escalated to L2\", status: \"open\" })\n}","expected_response":"{\"data\":{\"ticket\":{\"id\":\"T-100\",\"subject\":\"Login issue\",\"status\":\"open\"}}}","schema_definition":"type Ticket {\n id: ID!\n subject: String!\n internalNotes: String!\n status: String!\n}\ntype Query {\n ticket: Ticket!\n}"}} {"submissionId":"cmsv8mvlu01iig4p21j4yzqyd","title":"Submission 4YZQYD","payload":{"sample_query":"{\n account {\n id\n balance @include(if: true)\n internalCode @skip(if: true)\n nickname\n }\n}","resolver_code":"Query: {\n account: () => ({ id: \"1\", balance: 42.5, internalCode: \"X-9\", nickname: \"primary\" })\n}","expected_response":"{\"data\":{\"account\":{\"id\":\"1\",\"balance\":42.5,\"nickname\":\"primary\"}}}","schema_definition":"type Account {\n id: ID!\n balance: Float!\n internalCode: String!\n nickname: String!\n}\ntype Query {\n account: Account!\n}"}} {"submissionId":"cmsv8ng4d01ikg4p2x539uf9a","title":"Submission 39UF9A","payload":{"sample_query":"mutation { placeOrder(input: { productId: \"sku-1\", quantity: 0 }) }","resolver_code":"Mutation: { placeOrder: (_, { input }) => { if (input.quantity <= 0) throw new Error(\"quantity must be positive\"); return `Order placed for ${input.quantity} of ${input.productId}`; } }","expected_response":"{\"errors\":[{\"message\":\"quantity must be positive\",\"locations\":[{\"line\":1,\"column\":12}],\"path\":[\"placeOrder\"]}],\"data\":null}","schema_definition":"input OrderInput { productId: String!, quantity: Int! }\ntype Query { _empty: Boolean }\ntype Mutation { placeOrder(input: OrderInput!): String! }"}} {"submissionId":"cmsv8nygr01img4p29itfyvuk","title":"Submission TFYVUK","payload":{"sample_query":"mutation { submitSurvey(input: { title: \"CSAT\", answers: [\"good\", \"great\", \"ok\"] }) { title answerCount firstAnswer } }","resolver_code":"Mutation: {\n submitSurvey: (_, { input }) => ({\n title: input.title,\n answerCount: input.answers.length,\n firstAnswer: input.answers[0] || null,\n })\n}","expected_response":"{\"data\":{\"submitSurvey\":{\"title\":\"CSAT\",\"answerCount\":3,\"firstAnswer\":\"good\"}}}","schema_definition":"input SurveyInput {\n title: String!\n answers: [String!]!\n}\ntype Survey {\n title: String!\n answerCount: Int!\n firstAnswer: String\n}\ntype Query {\n _empty: Boolean\n}\ntype Mutation {\n submitSurvey(input: SurveyInput!): Survey!\n}"}} {"submissionId":"cmsv8odgf01iog4p26cr96axx","title":"Submission R96AXX","payload":{"sample_query":"{ matrix }","resolver_code":"Query: {\n matrix: () => ([[1, 2, 3], [4, 5], [6]])\n}","expected_response":"{\"data\":{\"matrix\":[[1,2,3],[4,5],[6]]}}","schema_definition":"type Query {\n matrix: [[Int!]!]!\n}"}} {"submissionId":"cmsv8ot8b01iqg4p2sdj416r1","title":"Submission J416R1","payload":{"sample_query":"{ scores }","resolver_code":"Query: {\n scores: () => ([10, null, 30, null])\n}","expected_response":"{\"data\":{\"scores\":[10,null,30,null]}}","schema_definition":"type Query {\n scores: [Int]\n}"}} {"submissionId":"cmsv8p87401isg4p2jxptis6j","title":"Submission PTIS6J","payload":{"sample_query":"{ invoice { id lineItems { id amount } } }","resolver_code":"Query: {\n invoice: () => ({\n id: \"INV-1\",\n lineItems: [\n { id: \"1\", amount: 100 },\n { id: \"2\", get amount() { throw new Error(\"corrupt amount\"); } },\n { id: \"3\", amount: 300 },\n ],\n })\n}","expected_response":"{\"data\":{\"invoice\":null},\"errors\":[{\"message\":\"corrupt amount\"}]}","schema_definition":"type LineItem {\n id: ID!\n amount: Int!\n}\ntype Invoice {\n id: ID!\n lineItems: [LineItem!]!\n}\ntype Query {\n invoice: Invoice\n}"}} {"submissionId":"cmsv8pxil01itg4p2qnpzpxsa","title":"Submission PZPXSA","payload":{"sample_query":"{ thread { id text replies { id text replies { id text replies { id } } } } }","resolver_code":"Query: {\n thread: () => ({\n id: \"1\",\n text: \"root comment\",\n replies: [\n {\n id: \"2\",\n text: \"first reply\",\n replies: [\n { id: \"3\", text: \"nested reply\", replies: [] },\n ],\n },\n { id: \"4\", text: \"second reply\", replies: [] },\n ],\n })\n}","expected_response":"{\"data\":{\"thread\":{\"id\":\"1\",\"text\":\"root comment\",\"replies\":[{\"id\":\"2\",\"text\":\"first reply\",\"replies\":[{\"id\":\"3\",\"text\":\"nested reply\",\"replies\":[]}]},{\"id\":\"4\",\"text\":\"second reply\",\"replies\":[]}]}}}","schema_definition":"type Comment {\n id: ID!\n text: String!\n replies: [Comment!]!\n}\ntype Query {\n thread: Comment!\n}"}} {"submissionId":"cmsv8qgnu01iug4p26oi3mhzd","title":"Submission I3MHZD","payload":{"sample_query":"{ employee(id: \"3\") { name manager { name manager { name manager { name } } } } }","resolver_code":"Query: {\n employee: (_, { id }) => {\n const db = {\n \"3\": { id: \"3\", name: \"Carol\", managerId: \"2\" },\n \"2\": { id: \"2\", name: \"Bob\", managerId: \"1\" },\n \"1\": { id: \"1\", name: \"Alice\", managerId: null },\n };\n const build = (row) => row ? { id: row.id, name: row.name, manager: build(db[row.managerId]) } : null;\n return build(db[id]);\n }\n}","expected_response":"{\"data\":{\"employee\":{\"name\":\"Carol\",\"manager\":{\"name\":\"Bob\",\"manager\":{\"name\":\"Alice\",\"manager\":null}}}}}","schema_definition":"type Employee {\n id: ID!\n name: String!\n manager: Employee\n}\ntype Query {\n employee(id: ID!): Employee\n}"}} {"submissionId":"cmsv8qzfx01ivg4p2scdolm67","title":"Submission DOLM67","payload":{"sample_query":"mutation { setPrice(name: \"Widget\", priceCents: 1999) { name priceCents } }","resolver_code":"Mutation: { setPrice: (_, { name, priceCents }) => ({ name, priceCents }) }","expected_response":"{\"data\": {\"setPrice\": {\"name\": \"Widget\", \"priceCents\": 1999}}}","schema_definition":"type Product { name: String!, priceCents: Int! }\ntype Query { _empty: Boolean }\ntype Mutation { setPrice(name: String!, priceCents: Int!): Product! }"}} {"submissionId":"cmsv8rjsd01iwg4p2l12xse28","title":"Submission 2XSE28","payload":{"sample_query":"mutation {\n createUsers(inputs: [\n { email: \"ada@example.com\", age: 34 },\n { email: \"not-an-email\", age: 20 },\n { email: \"bob@example.com\", age: 200 },\n ]) { email success error }\n}","resolver_code":"Mutation: {\n createUsers: (_, { inputs }) => inputs.map((input) => {\n if (!input.email.includes(\"@\")) {\n return { email: input.email, success: false, error: \"invalid email format\" };\n }\n if (input.age < 0 || input.age > 150) {\n return { email: input.email, success: false, error: \"age out of range\" };\n }\n return { email: input.email, success: true, error: null };\n })\n}","expected_response":"{\"data\":{\"createUsers\":[{\"email\":\"ada@example.com\",\"success\":true,\"error\":null},{\"email\":\"not-an-email\",\"success\":false,\"error\":\"invalid email format\"},{\"email\":\"bob@example.com\",\"success\":false,\"error\":\"age out of range\"}]}}","schema_definition":"input UserInput {\n email: String!\n age: Int!\n}\ntype UserResult {\n email: String!\n success: Boolean!\n error: String\n}\ntype Query {\n _empty: Boolean\n}\ntype Mutation {\n createUsers(inputs: [UserInput!]!): [UserResult!]!\n}"}} {"submissionId":"cmsvaxhlw01n8g4p2i7yfrjyh","title":"Submission YFRJYH","payload":{"sample_query":"{\n library {\n __typename\n id\n title\n runtimeMinutes\n ... on Episode { series }\n ... on Draft { editor }\n }\n}","resolver_code":"Query: {\n library: () => [\n { __typename: 'Episode', id: 'e1', title: 'Pilot', seconds: 1490, series: 'Deep Field' },\n { __typename: 'Draft', id: 'd1', title: null, editor: 'kim', seconds: null },\n { __typename: 'Episode', id: 'e2', title: 'Drift', seconds: 65, series: 'Deep Field' },\n { __typename: 'Draft', id: 'd2', title: 'Untitled', editor: null, seconds: 240 }\n ]\n},\nEpisode: {\n runtimeMinutes: (ep) => Math.round(ep.seconds / 60),\n title: (ep) => ep.title.toUpperCase()\n},\nDraft: {\n runtimeMinutes: (d) => (d.seconds == null ? null : Math.floor(d.seconds / 60)),\n title: (d) => d.title\n}","expected_response":"{\"data\": {\"library\": [{\"__typename\": \"Episode\", \"id\": \"e1\", \"title\": \"PILOT\", \"runtimeMinutes\": 25, \"series\": \"Deep Field\"}, {\"__typename\": \"Draft\", \"id\": \"d1\", \"title\": null, \"runtimeMinutes\": null, \"editor\": \"kim\"}, {\"__typename\": \"Episode\", \"id\": \"e2\", \"title\": \"DRIFT\", \"runtimeMinutes\": 1, \"series\": \"Deep Field\"}, {\"__typename\": \"Draft\", \"id\": \"d2\", \"title\": \"Untitled\", \"runtimeMinutes\": 4, \"editor\": null}]}}","schema_definition":"interface Media {\n id: ID!\n title: String\n runtimeMinutes: Int\n}\ntype Episode implements Media {\n id: ID!\n title: String!\n runtimeMinutes: Int\n series: String!\n}\ntype Draft implements Media {\n id: ID!\n title: String\n runtimeMinutes: Int\n editor: String\n}\ntype Query { library: [Media!]! }"}} {"submissionId":"cmsvaxhlw01n9g4p2ev459nm9","title":"Submission 459NM9","payload":{"sample_query":"mutation {\n dup: signup(input: {email: \"ada@example.com\", age: 30}) { ...R }\n minor: signup(input: {email: \"kid@example.com\", age: 15}) { ...R }\n fresh: signup(input: {email: \"grace@example.com\", age: 41}) { ...R }\n repeat: signup(input: {email: \"grace@example.com\", age: 41}) { ...R }\n}\n\nfragment R on SignupResult {\n __typename\n ... on SignupSuccess { account { id email } }\n ... on ValidationFailure { errorCount errors { field reason } }\n}","resolver_code":"Mutation: {\n signup: (() => {\n const taken = new Set(['ada@example.com']);\n let seq = 100;\n return (_, { input }) => {\n const errors = [];\n if (taken.has(input.email)) errors.push({ field: 'email', reason: 'already registered' });\n if (input.age < 18) errors.push({ field: 'age', reason: 'must be at least 18' });\n if (errors.length > 0) {\n return { __typename: 'ValidationFailure', errorCount: errors.length, errors: errors };\n }\n taken.add(input.email);\n seq += 1;\n return { __typename: 'SignupSuccess', account: { id: String(seq), email: input.email } };\n };\n })()\n},\nQuery: { registeredCount: () => 1 }","expected_response":"{\"data\": {\"dup\": {\"__typename\": \"ValidationFailure\", \"errorCount\": 1, \"errors\": [{\"field\": \"email\", \"reason\": \"already registered\"}]}, \"minor\": {\"__typename\": \"ValidationFailure\", \"errorCount\": 1, \"errors\": [{\"field\": \"age\", \"reason\": \"must be at least 18\"}]}, \"fresh\": {\"__typename\": \"SignupSuccess\", \"account\": {\"id\": \"101\", \"email\": \"grace@example.com\"}}, \"repeat\": {\"__typename\": \"ValidationFailure\", \"errorCount\": 1, \"errors\": [{\"field\": \"email\", \"reason\": \"already registered\"}]}}}","schema_definition":"input SignupInput { email: String!, age: Int! }\ntype Account { id: ID!, email: String! }\ntype SignupSuccess { account: Account! }\ntype FieldError { field: String!, reason: String! }\ntype ValidationFailure { errorCount: Int!, errors: [FieldError!]! }\nunion SignupResult = SignupSuccess | ValidationFailure\ntype Query { registeredCount: Int! }\ntype Mutation { signup(input: SignupInput!): SignupResult! }"}} {"submissionId":"cmsvaxhlw01nag4p2xx7lbnzc","title":"Submission 7LBNZC","payload":{"sample_query":"{\n omitted: items\n explicitNull: items(limit: null)\n explicitValue: items(limit: 9, tag: null)\n pageDefault: paged\n pagePartial: paged(page: {offset: 5})\n pageNulled: paged(page: {limit: null, offset: 4, label: null})\n}","resolver_code":"Query: {\n items: (_, args) => {\n const show = (v) => (v === undefined ? 'absent' : v === null ? 'null' : JSON.stringify(v));\n return [\n 'limit=' + show(args.limit),\n 'tag=' + show(args.tag),\n 'keys=' + Object.keys(args).sort().join('|')\n ];\n },\n paged: (_, args) => {\n const show = (v) => (v === undefined ? 'absent' : v === null ? 'null' : JSON.stringify(v));\n const p = args.page;\n return [\n 'page=' + (p === null ? 'null' : 'object'),\n 'limit=' + show(p && p.limit),\n 'offset=' + show(p && p.offset),\n 'label=' + show(p && p.label)\n ];\n }\n}","expected_response":"{\"data\": {\"omitted\": [\"limit=3\", \"tag=\\\"all\\\"\", \"keys=limit|tag\"], \"explicitNull\": [\"limit=null\", \"tag=\\\"all\\\"\", \"keys=limit|tag\"], \"explicitValue\": [\"limit=9\", \"tag=null\", \"keys=limit|tag\"], \"pageDefault\": [\"page=object\", \"limit=7\", \"offset=0\", \"label=\\\"std\\\"\"], \"pagePartial\": [\"page=object\", \"limit=2\", \"offset=5\", \"label=\\\"std\\\"\"], \"pageNulled\": [\"page=object\", \"limit=null\", \"offset=4\", \"label=null\"]}}","schema_definition":"input Page { limit: Int = 2, offset: Int = 0, label: String = \"std\" }\ntype Query {\n items(limit: Int = 3, tag: String = \"all\"): [String!]!\n paged(page: Page = {limit: 7}): [String!]!\n}"}} {"submissionId":"cmsvaxhlw01nbg4p27haql0di","title":"Submission AQL0DI","payload":{"sample_query":"{ matrix labels cube }","resolver_code":"Query: {\n matrix: () => [[1, null, 3], null, [], [null]],\n labels: () => [['a', 'b'], [], null, ['c']],\n cube: () => [[[1, 2], []], [], null]\n}","expected_response":"{\"data\": {\"matrix\": [[1, null, 3], null, [], [null]], \"labels\": [[\"a\", \"b\"], [], null, [\"c\"]], \"cube\": [[[1, 2], []], [], null]}}","schema_definition":"type Query {\n matrix: [[Int]]\n labels: [[String!]]!\n cube: [[[Int!]!]]\n}"}} {"submissionId":"cmsvaxhlw01ncg4p21lqi4yl2","title":"Submission QI4YL2","payload":{"sample_query":"{\n outer: probe(tag: \"x\") {\n fieldName\n pathString\n parentTypeName\n returnTypeName\n kid: child {\n pathString\n renamed: fieldName\n child { pathString child { pathString } }\n }\n }\n}","resolver_code":"Query: { probe: (_, args) => ({ depth: 0, tag: args.tag }) },\nProbe: {\n fieldName: (_p, _a, _c, info) => info.fieldName,\n pathString: (_p, _a, _c, info) => { const parts = []; let c = info.path; while (c) { parts.unshift(String(c.key)); c = c.prev; } return parts.join('.'); },\n parentTypeName: (_p, _a, _c, info) => info.parentType.name,\n returnTypeName: (_p, _a, _c, info) => String(info.returnType),\n child: (p) => (p.depth >= 2 ? null : { depth: p.depth + 1, tag: p.tag })\n}","expected_response":"{\"data\": {\"outer\": {\"fieldName\": \"fieldName\", \"pathString\": \"outer.pathString\", \"parentTypeName\": \"Probe\", \"returnTypeName\": \"String!\", \"kid\": {\"pathString\": \"outer.kid.pathString\", \"renamed\": \"fieldName\", \"child\": {\"pathString\": \"outer.kid.child.pathString\", \"child\": null}}}}}","schema_definition":"type Query { probe(tag: String = \"root\"): Probe! }\ntype Probe {\n fieldName: String!\n pathString: String!\n parentTypeName: String!\n returnTypeName: String!\n child: Probe\n}"}} {"submissionId":"cmsvaxhlw01ndg4p2yubh3et0","title":"Submission BH3ET0","payload":{"sample_query":"{\n fromInt: lookup(id: 42) { id kind argType }\n fromString: lookup(id: \"42\") { id kind argType }\n alpha: lookup(id: \"a9\") { id kind argType }\n missing: lookup(id: 999) { id }\n coerced: batch(ids: [7, \"7\", \"a9\", 42])\n single: batch(ids: 7)\n}","resolver_code":"Query: {\n lookup: (_, { id }) => {\n const store = { '42': 'ledger', '7': 'invoice', 'a9': 'draft' };\n return store[id] === undefined ? null : { raw: id, kind: store[id] };\n },\n batch: (_, { ids }) => {\n const store = { '42': 'ledger', '7': 'invoice', 'a9': 'draft' };\n return ids.map((v) => typeof v + ':' + v + ':' + (store[v] || 'missing'));\n }\n},\nRecord: {\n id: (r) => Number.isNaN(Number(r.raw)) ? r.raw : Number(r.raw),\n kind: (r) => r.kind,\n argType: (r) => typeof r.raw\n}","expected_response":"{\"data\": {\"fromInt\": {\"id\": \"42\", \"kind\": \"ledger\", \"argType\": \"string\"}, \"fromString\": {\"id\": \"42\", \"kind\": \"ledger\", \"argType\": \"string\"}, \"alpha\": {\"id\": \"a9\", \"kind\": \"draft\", \"argType\": \"string\"}, \"missing\": null, \"coerced\": [\"string:7:invoice\", \"string:7:invoice\", \"string:a9:draft\", \"string:42:ledger\"], \"single\": [\"string:7:invoice\"]}}","schema_definition":"type Record { id: ID!, kind: String!, argType: String! }\ntype Query {\n lookup(id: ID!): Record\n batch(ids: [ID!]!): [String!]!\n}"}} {"submissionId":"cmsvaxhlw01neg4p2vyrg4m4f","title":"Submission RG4M4F","payload":{"sample_query":"query Health {\n ping\n}\n\nquery Placement {\n region\n echo: ping\n}","resolver_code":"Query: {\n ping: () => 'pong',\n region: () => 'eu-west-1'\n}","expected_response":"{\"errors\": [{\"message\": \"Must provide operation name if query contains multiple operations.\"}]}","schema_definition":"type Query { ping: String!, region: String! }"}} {"submissionId":"cmsvaxhlw01nfg4p2xcvetydd","title":"Submission VETYDD","payload":{"sample_query":"{\n root { ...Head }\n}\n\nfragment Head on Node {\n id\n next { ...Tail }\n}\n\nfragment Tail on Node {\n label\n ...Head\n}","resolver_code":"Query: { root: () => ({ id: 'n1', label: 'start', next: { id: 'n2', label: 'end', next: null } }) },\nNode: { label: (n) => n.label.toUpperCase() }","expected_response":"{\"errors\": [{\"message\": \"Cannot spread fragment \\\"Head\\\" within itself via \\\"Tail\\\".\"}]}","schema_definition":"type Query { root: Node! }\ntype Node { id: ID!, label: String!, next: Node }"}} {"submissionId":"cmsvaxhlw01ngg4p2oidvvye0","title":"Submission DVVYE0","payload":{"sample_query":"query Find($filter: Filter!, $limit: Int) {\n search(filter: $filter, limit: $limit) {\n id\n score\n }\n}","resolver_code":"Query: {\n search: (_, { filter, limit }) => [\n { id: 'h1', score: 90 },\n { id: 'h2', score: 40 }\n ].filter((h) => h.score >= filter.minScore).slice(0, limit)\n}","expected_response":"{\"errors\": [{\"message\": \"Variable \\\"$filter\\\" of required type \\\"Filter!\\\" was not provided.\"}]}","schema_definition":"input Filter { status: String!, minScore: Int = 0 }\ntype Hit { id: ID!, score: Int! }\ntype Query { search(filter: Filter!, limit: Int = 5): [Hit!]! }"}} {"submissionId":"cmsvaxhlw01nhg4p2hn8913mu","title":"Submission 8913MU","payload":{"sample_query":"{\n node {\n id\n ...Basics\n name\n meta { b }\n ...Basics\n meta { c }\n metaResolveCount\n nameResolveCount\n }\n}\n\nfragment Basics on Item {\n id\n name\n meta { a }\n}","resolver_code":"Query: { node: () => ({ id: 'i1', counters: { meta: 0, name: 0 } }) },\nItem: {\n name: (item) => { item.counters.name += 1; return 'widget'; },\n meta: (item) => { item.counters.meta += 1; return { a: 1, b: 2, c: 3 }; },\n metaResolveCount: (item) => item.counters.meta,\n nameResolveCount: (item) => item.counters.name\n}","expected_response":"{\"data\": {\"node\": {\"id\": \"i1\", \"name\": \"widget\", \"meta\": {\"a\": 1, \"b\": 2, \"c\": 3}, \"metaResolveCount\": 1, \"nameResolveCount\": 1}}}","schema_definition":"type Meta { a: Int!, b: Int!, c: Int! }\ntype Item { id: ID!, name: String!, meta: Meta!, metaResolveCount: Int!, nameResolveCount: Int! }\ntype Query { node: Item! }"}} {"submissionId":"cmsvaxhlw01nig4p2p2sjf41z","title":"Submission SJF41Z","payload":{"sample_query":"{\n report {\n title\n details {\n lines @include(if: false)\n secret @skip(if: true)\n }\n optionalDetails {\n ... on Details @include(if: false) { lines }\n }\n }\n}","resolver_code":"Query: { report: (_, args) => ({ verbose: args.verbose, touched: [] }) },\nReport: {\n title: (r) => 'report verbose=' + r.verbose,\n details: (r) => { r.touched.push('details'); return { lines: ['l1', 'l2'], secret: 'shh' }; },\n optionalDetails: (r) => { r.touched.push('optionalDetails'); return { lines: [], secret: 'none' }; }\n},\nDetails: {\n lines: (d) => d.lines,\n secret: (d) => d.secret\n}","expected_response":"{\"data\": {\"report\": {\"title\": \"report verbose=false\", \"details\": {}, \"optionalDetails\": {}}}}","schema_definition":"type Details { lines: [String!]!, secret: String! }\ntype Report { title: String!, details: Details!, optionalDetails: Details }\ntype Query { report(verbose: Boolean = false): Report! }"}} {"submissionId":"cmsvaxhlw01njg4p25vvjgwao","title":"Submission VJGWAO","payload":{"sample_query":"{\n invoice {\n number\n subtotal\n lines { sku qty unitPrice amount }\n roundedTotal: total\n exactTotal: total(rounded: false)\n zeroTax: total(rounded: false, taxRate: 0)\n }\n}","resolver_code":"Query: {\n invoice: () => {\n const mkLine = (sku, qty, unitPrice) => ({\n sku: sku,\n qty: qty,\n unitPrice: unitPrice,\n amount: function () { return Number((this.qty * this.unitPrice).toFixed(2)); }\n });\n const lines = [mkLine('AA-1', 3, 4.25), mkLine('BB-2', 2, 10.1)];\n return {\n number: 'INV-2031',\n lines: lines,\n subtotal: function () { return Number(lines.reduce((s, l) => s + l.qty * l.unitPrice, 0).toFixed(2)); },\n total: function (args) {\n const gross = lines.reduce((s, l) => s + l.qty * l.unitPrice, 0) * (1 + args.taxRate);\n return args.rounded ? Math.round(gross) : Number(gross.toFixed(4));\n }\n };\n }\n}","expected_response":"{\"data\": {\"invoice\": {\"number\": \"INV-2031\", \"subtotal\": 32.95, \"lines\": [{\"sku\": \"AA-1\", \"qty\": 3, \"unitPrice\": 4.25, \"amount\": 12.75}, {\"sku\": \"BB-2\", \"qty\": 2, \"unitPrice\": 10.1, \"amount\": 20.2}], \"roundedTotal\": 40, \"exactTotal\": 39.54, \"zeroTax\": 32.95}}}","schema_definition":"type Line { sku: String!, qty: Int!, unitPrice: Float!, amount: Float! }\ntype Invoice {\n number: String!\n lines: [Line!]!\n subtotal: Float!\n total(rounded: Boolean = true, taxRate: Float = 0.2): Float!\n}\ntype Query { invoice: Invoice! }"}} {"submissionId":"cmsvaxhlw01nkg4p2oftcj3mf","title":"Submission TCJ3MF","payload":{"sample_query":"mutation {\n withNotes: placeOrder(order: {\n customer: \"acme\"\n lines: [\n {sku: \"A\", qty: 4, discount: 0.1}\n {sku: \"B\"}\n {sku: \"C\", qty: 2, discount: null}\n ]\n notes: [\"rush\", \"gift\"]\n }) { customer lineCount totalQty discountedSkus noteCount defaultedQtySkus }\n defaults: placeOrder(order: {\n customer: \"zeta\"\n lines: {sku: \"solo\"}\n }) { customer lineCount totalQty discountedSkus noteCount defaultedQtySkus }\n}","resolver_code":"Query: { orders: () => 0 },\nMutation: {\n placeOrder: (_, { order }) => ({\n customer: order.customer,\n lineCount: order.lines.length,\n totalQty: order.lines.reduce((s, l) => s + l.qty, 0),\n discountedSkus: order.lines.filter((l) => l.discount != null).map((l) => l.sku),\n noteCount: (order.notes || []).length,\n defaultedQtySkus: order.lines.filter((l) => l.qty === 1).map((l) => l.sku)\n })\n}","expected_response":"{\"data\": {\"withNotes\": {\"customer\": \"acme\", \"lineCount\": 3, \"totalQty\": 7, \"discountedSkus\": [\"A\"], \"noteCount\": 2, \"defaultedQtySkus\": [\"B\"]}, \"defaults\": {\"customer\": \"zeta\", \"lineCount\": 1, \"totalQty\": 1, \"discountedSkus\": [], \"noteCount\": 0, \"defaultedQtySkus\": [\"solo\"]}}}","schema_definition":"input LineInput { sku: String!, qty: Int = 1, discount: Float }\ninput OrderInput { customer: String!, lines: [LineInput!]!, notes: [String!] = [] }\ntype Order {\n customer: String!\n lineCount: Int!\n totalQty: Int!\n discountedSkus: [String!]!\n noteCount: Int!\n defaultedQtySkus: [String!]!\n}\ntype Query { orders: Int! }\ntype Mutation { placeOrder(order: OrderInput!): Order! }"}} {"submissionId":"cmsvaxhlw01nlg4p2k9fsv0cz","title":"Submission FSV0CZ","payload":{"sample_query":"{\n latest { seq value }\n tick { seq }\n}","resolver_code":"Query: { latest: () => ({ seq: 7, value: 1.5 }) },\nSubscription: { tick: () => ({ seq: 8, value: 1.75 }) }","expected_response":"{\"errors\": [{\"message\": \"Cannot query field \\\"tick\\\" on type \\\"Query\\\".\"}]}","schema_definition":"type Tick { seq: Int!, value: Float! }\ntype Query { latest: Tick! }\ntype Subscription { tick: Tick! }"}} {"submissionId":"cmsvaxhlw01nmg4p261qwqn84","title":"Submission QWQN84","payload":{"sample_query":"{\n big: page(size: 2147483648) { size offset }\n negative: page(size: -2147483649, offset: 1) { size }\n}","resolver_code":"Query: { page: (_, { size, offset }) => ({ size: size, offset: offset }) }","expected_response":"{\"errors\": [{\"message\": \"Int cannot represent non 32-bit signed integer value: 2147483648\"}, {\"message\": \"Int cannot represent non 32-bit signed integer value: -2147483649\"}]}","schema_definition":"type Page { size: Int!, offset: Int! }\ntype Query { page(size: Int!, offset: Int = 0): Page! }"}} {"submissionId":"cmsvaxhlw01nng4p2dpfboej8","title":"Submission FBOEJ8","payload":{"sample_query":"{\n company {\n name path headcount\n divisions {\n name path headcount\n teams {\n name path headcount\n squads {\n name path headcount\n engineers {\n name path skillScore\n skills { name level path }\n }\n }\n }\n }\n }\n}","resolver_code":"Query: {\n company: () => ({\n name: 'Northwind',\n path: 'Northwind',\n divisions: [\n { name: 'Platform', teams: [\n { name: 'Core', squads: [\n { name: 'Runtime', engineers: [\n { name: 'ada', skills: [{ name: 'rust', level: 5 }, { name: 'c', level: 3 }] },\n { name: 'linus', skills: [{ name: 'c', level: 5 }] }\n ] },\n { name: 'Storage', engineers: [\n { name: 'grace', skills: [{ name: 'sql', level: 4 }] }\n ] }\n ] }\n ] },\n { name: 'Growth', teams: [\n { name: 'Web', squads: [\n { name: 'Checkout', engineers: [\n { name: 'mira', skills: [{ name: 'js', level: 4 }, { name: 'css', level: 2 }] }\n ] }\n ] }\n ] }\n ]\n })\n},\nCompany: {\n headcount: (n) => { const c = (x) => (x.skills ? 1 : (x.divisions || x.teams || x.squads || x.engineers || []).reduce((s, k) => s + c(k), 0)); return c(n); },\n divisions: (n) => n.divisions.map((d) => Object.assign({}, d, { path: n.path + '/' + d.name }))\n},\nDivision: {\n headcount: (n) => { const c = (x) => (x.skills ? 1 : (x.teams || x.squads || x.engineers || []).reduce((s, k) => s + c(k), 0)); return c(n); },\n teams: (n) => n.teams.map((t) => Object.assign({}, t, { path: n.path + '/' + t.name }))\n},\nTeam: {\n headcount: (n) => { const c = (x) => (x.skills ? 1 : (x.squads || x.engineers || []).reduce((s, k) => s + c(k), 0)); return c(n); },\n squads: (n) => n.squads.map((s) => Object.assign({}, s, { path: n.path + '/' + s.name }))\n},\nSquad: {\n headcount: (n) => n.engineers.length,\n engineers: (n) => n.engineers.map((e) => Object.assign({}, e, { path: n.path + '/' + e.name }))\n},\nEngineer: {\n skillScore: (e) => e.skills.reduce((s, k) => s + k.level, 0),\n skills: (e) => e.skills.map((k) => Object.assign({}, k, { path: e.path + '/' + k.name }))\n}","expected_response":"{\"data\": {\"company\": {\"name\": \"Northwind\", \"path\": \"Northwind\", \"headcount\": 4, \"divisions\": [{\"name\": \"Platform\", \"path\": \"Northwind/Platform\", \"headcount\": 3, \"teams\": [{\"name\": \"Core\", \"path\": \"Northwind/Platform/Core\", \"headcount\": 3, \"squads\": [{\"name\": \"Runtime\", \"path\": \"Northwind/Platform/Core/Runtime\", \"headcount\": 2, \"engineers\": [{\"name\": \"ada\", \"path\": \"Northwind/Platform/Core/Runtime/ada\", \"skillScore\": 8, \"skills\": [{\"name\": \"rust\", \"level\": 5, \"path\": \"Northwind/Platform/Core/Runtime/ada/rust\"}, {\"name\": \"c\", \"level\": 3, \"path\": \"Northwind/Platform/Core/Runtime/ada/c\"}]}, {\"name\": \"linus\", \"path\": \"Northwind/Platform/Core/Runtime/linus\", \"skillScore\": 5, \"skills\": [{\"name\": \"c\", \"level\": 5, \"path\": \"Northwind/Platform/Core/Runtime/linus/c\"}]}]}, {\"name\": \"Storage\", \"path\": \"Northwind/Platform/Core/Storage\", \"headcount\": 1, \"engineers\": [{\"name\": \"grace\", \"path\": \"Northwind/Platform/Core/Storage/grace\", \"skillScore\": 4, \"skills\": [{\"name\": \"sql\", \"level\": 4, \"path\": \"Northwind/Platform/Core/Storage/grace/sql\"}]}]}]}]}, {\"name\": \"Growth\", \"path\": \"Northwind/Growth\", \"headcount\": 1, \"teams\": [{\"name\": \"Web\", \"path\": \"Northwind/Growth/Web\", \"headcount\": 1, \"squads\": [{\"name\": \"Checkout\", \"path\": \"Northwind/Growth/Web/Checkout\", \"headcount\": 1, \"engineers\": [{\"name\": \"mira\", \"path\": \"Northwind/Growth/Web/Checkout/mira\", \"skillScore\": 6, \"skills\": [{\"name\": \"js\", \"level\": 4, \"path\": \"Northwind/Growth/Web/Checkout/mira/js\"}, {\"name\": \"css\", \"level\": 2, \"path\": \"Northwind/Growth/Web/Checkout/mira/css\"}]}]}]}]}]}}}","schema_definition":"type Skill { name: String!, level: Int!, path: String! }\ntype Engineer { name: String!, skills: [Skill!]!, skillScore: Int!, path: String! }\ntype Squad { name: String!, engineers: [Engineer!]!, headcount: Int!, path: String! }\ntype Team { name: String!, squads: [Squad!]!, headcount: Int!, path: String! }\ntype Division { name: String!, teams: [Team!]!, headcount: Int!, path: String! }\ntype Company { name: String!, divisions: [Division!]!, headcount: Int!, path: String! }\ntype Query { company: Company! }"}} {"submissionId":"cmsvaxhlw01nog4p20a7y51mw","title":"Submission 7Y51MW","payload":{"sample_query":"{\n found: search(term: \"rope\") { term total hits { id tags } facets { name values } }\n none: search(term: \"kayak\") { term total hits { id tags } facets { name values } }\n}","resolver_code":"Query: {\n search: (_, { term }) => {\n const corpus = [\n { id: 'p1', title: 'rope ladder', tags: ['gear', 'climb'] },\n { id: 'p2', title: 'rope bag', tags: [] }\n ];\n return { term: term, matches: corpus.filter((d) => d.title.includes(term)) };\n }\n},\nSearchPage: {\n hits: (p) => p.matches.map((d) => ({ id: d.id, tags: d.tags })),\n total: (p) => p.matches.length,\n facets: (p) => {\n const all = p.matches.reduce((acc, d) => acc.concat(d.tags), []);\n return [\n { name: 'tag', values: Array.from(new Set(all)) },\n { name: 'brand', values: [] }\n ];\n }\n}","expected_response":"{\"data\": {\"found\": {\"term\": \"rope\", \"total\": 2, \"hits\": [{\"id\": \"p1\", \"tags\": [\"gear\", \"climb\"]}, {\"id\": \"p2\", \"tags\": []}], \"facets\": [{\"name\": \"tag\", \"values\": [\"gear\", \"climb\"]}, {\"name\": \"brand\", \"values\": []}]}, \"none\": {\"term\": \"kayak\", \"total\": 0, \"hits\": [], \"facets\": [{\"name\": \"tag\", \"values\": []}, {\"name\": \"brand\", \"values\": []}]}}}","schema_definition":"type Facet { name: String!, values: [String!]! }\ntype Hit { id: ID!, tags: [String!]! }\ntype SearchPage { term: String!, hits: [Hit!]!, facets: [Facet!]!, total: Int! }\ntype Query { search(term: String!): SearchPage! }"}} {"submissionId":"cmsvaxhlw01npg4p2griy4a32","title":"Submission IY4A32","payload":{"sample_query":"{\n channels\n busiest\n email: quota(channel: EMAIL) { ...Q }\n sms: quota(channel: SMS) { ...Q }\n push: quota(channel: PUSH) { ...Q }\n hook: quota(channel: WEBHOOK) { ...Q }\n}\n\nfragment Q on Quota { channel limit used remaining saturated }","resolver_code":"Query: {\n quota: (_, { channel }) => {\n const table = { EMAIL: { limit: 5000, used: 4990 }, SMS: { limit: 500, used: 120 }, PUSH: { limit: 20000, used: 20000 }, WEBHOOK: { limit: 100, used: 3 } };\n return Object.assign({ channel: channel }, table[channel]);\n },\n channels: () => ['EMAIL', 'SMS', 'PUSH', 'WEBHOOK'],\n busiest: () => {\n const table = { EMAIL: { limit: 5000, used: 4990 }, SMS: { limit: 500, used: 120 }, PUSH: { limit: 20000, used: 20000 }, WEBHOOK: { limit: 100, used: 3 } };\n return Object.keys(table).reduce((best, k) => (table[k].used / table[k].limit > table[best].used / table[best].limit ? k : best));\n }\n},\nQuota: {\n remaining: (q) => q.limit - q.used,\n saturated: (q) => q.used >= q.limit\n}","expected_response":"{\"data\": {\"channels\": [\"EMAIL\", \"SMS\", \"PUSH\", \"WEBHOOK\"], \"busiest\": \"PUSH\", \"email\": {\"channel\": \"EMAIL\", \"limit\": 5000, \"used\": 4990, \"remaining\": 10, \"saturated\": false}, \"sms\": {\"channel\": \"SMS\", \"limit\": 500, \"used\": 120, \"remaining\": 380, \"saturated\": false}, \"push\": {\"channel\": \"PUSH\", \"limit\": 20000, \"used\": 20000, \"remaining\": 0, \"saturated\": true}, \"hook\": {\"channel\": \"WEBHOOK\", \"limit\": 100, \"used\": 3, \"remaining\": 97, \"saturated\": false}}}","schema_definition":"enum Channel { EMAIL SMS PUSH WEBHOOK }\ntype Quota { channel: Channel!, limit: Int!, used: Int!, remaining: Int!, saturated: Boolean! }\ntype Query {\n quota(channel: Channel!): Quota!\n channels: [Channel!]!\n busiest: Channel!\n}"}} {"submissionId":"cmsvaxhlw01nqg4p2l89hetd2","title":"Submission 9HETD2","payload":{"sample_query":"{\n listed: pick(ids: [\"a\", 2])\n scalarCoerced: pick(ids: \"solo\")\n intCoerced: pick(ids: 5)\n full: advanced(sel: {ids: [\"x\"], tags: [\"t1\", \"t2\"], depths: [[1, 2], [3]]})\n coerced: advanced(sel: {ids: 9, tags: \"only\", depths: [1, 2]})\n sparse: advanced(sel: {ids: \"z\", tags: null})\n}","resolver_code":"Query: {\n pick: (_, { ids }) => {\n const desc = (v) => (v === undefined ? 'absent' : v === null ? 'null' : Array.isArray(v) ? '[' + v.map(desc).join(',') + ']' : typeof v + '(' + v + ')');\n return [String(ids.length), desc(ids)];\n },\n advanced: (_, { sel }) => {\n const desc = (v) => (v === undefined ? 'absent' : v === null ? 'null' : Array.isArray(v) ? '[' + v.map(desc).join(',') + ']' : typeof v + '(' + v + ')');\n return ['ids=' + desc(sel.ids), 'tags=' + desc(sel.tags), 'depths=' + desc(sel.depths)];\n }\n}","expected_response":"{\"data\": {\"listed\": [\"2\", \"[string(a),string(2)]\"], \"scalarCoerced\": [\"1\", \"[string(solo)]\"], \"intCoerced\": [\"1\", \"[string(5)]\"], \"full\": [\"ids=[string(x)]\", \"tags=[string(t1),string(t2)]\", \"depths=[[number(1),number(2)],[number(3)]]\"], \"coerced\": [\"ids=[string(9)]\", \"tags=[string(only)]\", \"depths=[[number(1)],[number(2)]]\"], \"sparse\": [\"ids=[string(z)]\", \"tags=null\", \"depths=absent\"]}}","schema_definition":"input Selector { ids: [ID!]!, tags: [String!], depths: [[Int!]!] }\ntype Query {\n pick(ids: [ID!]!): [String!]!\n advanced(sel: Selector!): [String!]!\n}"}} {"submissionId":"cmsvaxhlw01nrg4p2ple4dsio","title":"Submission E4DSIO","payload":{"sample_query":"{\n metric {\n count(unit: DAY)\n count(unit: WEEK)\n ...Naming\n name: label\n }\n}\n\nfragment Naming on Metric {\n name\n}","resolver_code":"Query: { metric: () => ({ name: 'signups', label: 'Signups' }) },\nMetric: {\n count: (_m, { unit }) => ({ DAY: 12, WEEK: 84, MONTH: 360 })[unit],\n name: (m) => m.name,\n label: (m) => m.label\n}","expected_response":"{\"errors\": [{\"message\": \"Fields \\\"count\\\" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.\"}, {\"message\": \"Fields \\\"name\\\" conflict because \\\"label\\\" and \\\"name\\\" are different fields. Use different aliases on the fields to fetch both if this was intentional.\"}]}","schema_definition":"enum Unit { DAY WEEK MONTH }\ntype Metric { count(unit: Unit!): Int!, name: String!, label: String! }\ntype Query { metric: Metric! }"}} {"submissionId":"cmsvg9tqv01owg4p2ln3uhzxb","title":"Submission 3UHZXB","payload":{"sample_query":"{ tasks(onlyPending: true) { id title priority } taskCount }","resolver_code":"Query: {\n tasks: (_, {onlyPending}) => {\n const all = [\n {id: \"1\", title: \"Write report\", done: false, priority: 2},\n {id: \"2\", title: \"Fix bug\", done: true, priority: 1},\n {id: \"3\", title: \"Review PR\", done: false, priority: 3},\n ];\n return onlyPending ? all.filter(t => !t.done) : all;\n },\n taskCount: () => 3\n}","expected_response":"{\"data\": {\"tasks\": [{\"id\": \"1\", \"title\": \"Write report\", \"priority\": 2}, {\"id\": \"3\", \"title\": \"Review PR\", \"priority\": 3}], \"taskCount\": 3}}","schema_definition":"type Task { id: ID!, title: String!, done: Boolean!, priority: Int! }\ntype Query { tasks(onlyPending: Boolean!): [Task!]!, taskCount: Int! }"}} {"submissionId":"cmsvg9tqv01oxg4p2ycphjpe6","title":"Submission PHJPE6","payload":{"sample_query":"{ order(id: \"o1\") { id total items { name qty price } } }","resolver_code":"Query: {\n order: (_, {id}) => {\n const orders = {\n \"o1\": { id: \"o1\", items: [ {name: \"Widget\", qty: 2, price: 5.5}, {name: \"Gadget\", qty: 1, price: 12.0} ] }\n };\n return orders[id];\n }\n},\nOrder: {\n total: (order) => order.items.reduce((sum, li) => sum + li.qty * li.price, 0)\n}","expected_response":"{\"data\": {\"order\": {\"id\": \"o1\", \"total\": 23, \"items\": [{\"name\": \"Widget\", \"qty\": 2, \"price\": 5.5}, {\"name\": \"Gadget\", \"qty\": 1, \"price\": 12}]}}}","schema_definition":"type Order { id: ID!, items: [LineItem!]!, total: Float! }\ntype LineItem { name: String!, qty: Int!, price: Float! }\ntype Query { order(id: ID!): Order }"}} {"submissionId":"cmsvg9tqv01oyg4p2e6tbf2sa","title":"Submission TBF2SA","payload":{"sample_query":"{ withdraw(balance: 100.0, amount: 150.0) }","resolver_code":"Query: {\n withdraw: (_, {balance, amount}) => {\n if (amount > balance) {\n throw new Error(\"insufficient funds\");\n }\n return balance - amount;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"insufficient funds\"}]}","schema_definition":"type Query { withdraw(balance: Float!, amount: Float!): Float! }"}} {"submissionId":"cmsvg9tqv01ozg4p2i131yj1f","title":"Submission 31YJ1F","payload":{"sample_query":"{ shapes { area ... on Circle { radius } ... on Rectangle { width height } } }","resolver_code":"Query: {\n shapes: () => [\n { __typename: \"Circle\", radius: 2, area: 12.566370614359172 },\n { __typename: \"Rectangle\", width: 3, height: 4, area: 12 },\n ]\n}","expected_response":"{\"data\": {\"shapes\": [{\"area\": 12.566370614359172, \"radius\": 2}, {\"area\": 12, \"width\": 3, \"height\": 4}]}}","schema_definition":"interface Shape { area: Float! }\ntype Circle implements Shape { area: Float!, radius: Float! }\ntype Rectangle implements Shape { area: Float!, width: Float!, height: Float! }\ntype Query { shapes: [Shape!]! }"}} {"submissionId":"cmsvg9tqv01p0g4p2ewt8cutm","title":"Submission T8CUTM","payload":{"sample_query":"{ classroom { name students(minGrade: 70) { name grade } } }","resolver_code":"Query: {\n classroom: () => ({ name: \"Room A\" })\n},\nClassroom: {\n students: (room, {minGrade}) => {\n const all = [\n {name: \"Ann\", grade: 85},\n {name: \"Ben\", grade: 60},\n {name: \"Cara\", grade: 92},\n ];\n return all.filter(s => s.grade >= minGrade).sort((a,b) => b.grade - a.grade);\n }\n}","expected_response":"{\"data\": {\"classroom\": {\"name\": \"Room A\", \"students\": [{\"name\": \"Cara\", \"grade\": 92}, {\"name\": \"Ann\", \"grade\": 85}]}}}","schema_definition":"type Student { name: String!, grade: Int! }\ntype Classroom { name: String!, students(minGrade: Int!): [Student!]! }\ntype Query { classroom: Classroom! }"}} {"submissionId":"cmsvgn37f01qpg4p2god9g3me","title":"Submission D9G3ME","payload":{"sample_query":"{ posts(limit: 3, offset: 3) { items hasMore } }","resolver_code":"Query: {\n posts: (_, {limit, offset}) => {\n const all = [\"p1\",\"p2\",\"p3\",\"p4\",\"p5\",\"p6\",\"p7\"];\n const slice = all.slice(offset, offset + limit);\n return { items: slice, hasMore: offset + limit < all.length };\n }\n}","expected_response":"{\"data\": {\"posts\": {\"items\": [\"p4\", \"p5\", \"p6\"], \"hasMore\": true}}}","schema_definition":"type PostPage { items: [String!]!, hasMore: Boolean! }\ntype Query { posts(limit: Int!, offset: Int!): PostPage! }"}} {"submissionId":"cmsvgn37g01qqg4p2ix7og4uz","title":"Submission 7OG4UZ","payload":{"sample_query":"{ bookRoom(checkIn: \"2026-09-10\", checkOut: \"2026-09-05\") }","resolver_code":"Query: {\n bookRoom: (_, {checkIn, checkOut}) => {\n if (new Date(checkIn) >= new Date(checkOut)) {\n throw new Error(\"checkIn must be before checkOut\");\n }\n return `Booked from ${checkIn} to ${checkOut}`;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"checkIn must be before checkOut\"}]}","schema_definition":"type Query { bookRoom(checkIn: String!, checkOut: String!): String! }"}} {"submissionId":"cmsvgn37g01qrg4p264h61ew8","title":"Submission H61EW8","payload":{"sample_query":"{ team { name members { name skills { name level } } } }","resolver_code":"Query: {\n team: () => ({\n name: \"Platform\",\n members: [\n { name: \"Ann\", skills: [{name: \"Go\", level: 4}, {name: \"SQL\", level: 3}] },\n { name: \"Ben\", skills: [{name: \"Python\", level: 5}] },\n ]\n })\n}","expected_response":"{\"data\": {\"team\": {\"name\": \"Platform\", \"members\": [{\"name\": \"Ann\", \"skills\": [{\"name\": \"Go\", \"level\": 4}, {\"name\": \"SQL\", \"level\": 3}]}, {\"name\": \"Ben\", \"skills\": [{\"name\": \"Python\", \"level\": 5}]}]}}}","schema_definition":"type Skill { name: String!, level: Int! }\ntype Member { name: String!, skills: [Skill!]! }\ntype Team { name: String!, members: [Member!]! }\ntype Query { team: Team! }"}} {"submissionId":"cmsvgn37g01qsg4p2w97kltue","title":"Submission 7KLTUE","payload":{"sample_query":"{ search(term: \"Dune\") { ... on Book { title author } ... on Movie { title director } } }","resolver_code":"Query: {\n search: (_, {term}) => [\n { __typename: \"Book\", title: \"Dune\", author: \"Herbert\" },\n { __typename: \"Movie\", title: \"Dune\", director: \"Villeneuve\" },\n ]\n}","expected_response":"{\"data\": {\"search\": [{\"title\": \"Dune\", \"author\": \"Herbert\"}, {\"title\": \"Dune\", \"director\": \"Villeneuve\"}]}}","schema_definition":"union SearchResult = Book | Movie\ntype Book { title: String!, author: String! }\ntype Movie { title: String!, director: String! }\ntype Query { search(term: String!): [SearchResult!]! }"}} {"submissionId":"cmsvgn37g01qtg4p2zz3duih1","title":"Submission 3DUIH1","payload":{"sample_query":"{ statusFor(id: \"2\") }","resolver_code":"Query: {\n statusFor: (_, {id}) => {\n const map = { \"1\": \"ACTIVE\", \"2\": \"INACTIVE\", \"3\": \"PENDING\" };\n return map[id] || \"PENDING\";\n }\n}","expected_response":"{\"data\": {\"statusFor\": \"INACTIVE\"}}","schema_definition":"enum Status { ACTIVE, INACTIVE, PENDING }\ntype Query { statusFor(id: ID!): Status! }"}} {"submissionId":"cmsvgn37g01qug4p21q8jvy67","title":"Submission 8JVY67","payload":{"sample_query":"{ tasks { id title } }","resolver_code":"Query: {\n tasks: () => [\n { id: \"1\", title: \"A\" },\n null,\n { id: \"3\", title: \"C\" },\n ]\n}","expected_response":"{\"errors\": [{\"message\": \"Cannot return null for non-nullable field Query.tasks.\"}]}","schema_definition":"type Task { id: ID!, title: String! }\ntype Query { tasks: [Task!]! }"}} {"submissionId":"cmsvgn37g01qvg4p22z6mepsu","title":"Submission 6MEPSU","payload":{"sample_query":"{ userName(id: \" 5 \") }","resolver_code":"Query: {\n userName: (_, {id}) => {\n const trimmed = String(id).trim();\n const map = { \"5\": \"Alice\", \"7\": \"Bob\" };\n if (!(trimmed in map)) throw new Error(\"user not found\");\n return map[trimmed];\n }\n}","expected_response":"{\"data\": {\"userName\": \"Alice\"}}","schema_definition":"type Query { userName(id: ID!): String! }"}} {"submissionId":"cmsvgn37g01qwg4p27rve81ae","title":"Submission VE81AE","payload":{"sample_query":"{ rootCategory { name subcategories { name subcategories { name } } } }","resolver_code":"Query: {\n rootCategory: () => ({\n name: \"Electronics\",\n subcategories: [\n { name: \"Phones\", subcategories: [] },\n { name: \"Laptops\", subcategories: [{ name: \"Gaming\", subcategories: [] }] },\n ]\n })\n}","expected_response":"{\"data\": {\"rootCategory\": {\"name\": \"Electronics\", \"subcategories\": [{\"name\": \"Phones\", \"subcategories\": []}, {\"name\": \"Laptops\", \"subcategories\": [{\"name\": \"Gaming\"}]}]}}}","schema_definition":"type Category { name: String!, subcategories: [Category!]! }\ntype Query { rootCategory: Category! }"}} {"submissionId":"cmsvgn37g01qxg4p2qaoawu8m","title":"Submission OAWU8M","payload":{"sample_query":"{ u1: userById(id: \"1\") u2: userById(id: \"2\") }","resolver_code":"Query: {\n userById: (_, {id}) => {\n const map = { \"1\": \"Alice\", \"2\": \"Bob\" };\n return map[id] || \"Unknown\";\n }\n}","expected_response":"{\"data\": {\"u1\": \"Alice\", \"u2\": \"Bob\"}}","schema_definition":"type Query { userById(id: ID!): String! }"}} {"submissionId":"cmsvgn37g01qyg4p20pzbxdte","title":"Submission ZBXDTE","payload":{"sample_query":"{ productsByIds(ids: [\"2\", \"3\", \"9\"]) { id name } }","resolver_code":"Query: {\n productsByIds: (_, {ids}) => {\n const db = { \"1\": \"Widget\", \"2\": \"Gadget\", \"3\": \"Gizmo\" };\n return ids.filter(id => db[id]).map(id => ({ id, name: db[id] }));\n }\n}","expected_response":"{\"data\": {\"productsByIds\": [{\"id\": \"2\", \"name\": \"Gadget\"}, {\"id\": \"3\", \"name\": \"Gizmo\"}]}}","schema_definition":"type Product { id: ID!, name: String! }\ntype Query { productsByIds(ids: [ID!]!): [Product!]! }"}} {"submissionId":"cmsvgn37g01qzg4p2cv8k4iv8","title":"Submission 8K4IV8","payload":{"sample_query":"{ applyDiscount(price: 9.99, qty: 12) }","resolver_code":"Query: {\n applyDiscount: (_, {price, qty}) => {\n if (qty < 0) throw new Error(\"quantity cannot be negative\");\n const discount = qty >= 10 ? 0.1 : 0;\n return Math.round(price * qty * (1 - discount) * 100) / 100;\n }\n}","expected_response":"{\"data\": {\"applyDiscount\": 107.89}}","schema_definition":"type Query { applyDiscount(price: Float!, qty: Int!): Float! }"}} {"submissionId":"cmsvgn37g01r0g4p2gw6hvemg","title":"Submission 6HVEMG","payload":{"sample_query":"{ vehicles { wheels } }","resolver_code":"Query: {\n vehicles: () => [\n { __typename: \"Car\", wheels: 4, brand: \"Toyota\" },\n { __typename: \"Truck\", wheels: 6, capacityTons: 5.5 },\n ]\n}","expected_response":"{\"data\": {\"vehicles\": [{\"wheels\": 4}, {\"wheels\": 6}]}}","schema_definition":"interface Vehicle { wheels: Int! }\ntype Car implements Vehicle { wheels: Int!, brand: String! }\ntype Truck implements Vehicle { wheels: Int!, capacityTons: Float! }\ntype Query { vehicles: [Vehicle!]! }"}} {"submissionId":"cmsvgn37g01r1g4p24iheihbp","title":"Submission HEIHBP","payload":{"sample_query":"{ withDefault: greet withOverride: greet(name: \"Alice\") }","resolver_code":"Query: {\n greet: (_, {name}) => `Hello, ${name}!`\n}","expected_response":"{\"data\": {\"withDefault\": \"Hello, World!\", \"withOverride\": \"Hello, Alice!\"}}","schema_definition":"type Query { greet(name: String = \"World\"): String! }"}} {"submissionId":"cmsvgn37g01r2g4p2q01f1yc1","title":"Submission 1F1YC1","payload":{"sample_query":"{ leaderboard { name score } }","resolver_code":"Query: {\n leaderboard: () => {\n const players = [\n { name: \"Zoe\", score: 90 },\n { name: \"Amy\", score: 90 },\n { name: \"Bo\", score: 95 },\n ];\n return [...players].sort((a, b) => b.score - a.score || a.name.localeCompare(b.name));\n }\n}","expected_response":"{\"data\": {\"leaderboard\": [{\"name\": \"Bo\", \"score\": 95}, {\"name\": \"Amy\", \"score\": 90}, {\"name\": \"Zoe\", \"score\": 90}]}}","schema_definition":"type Player { name: String!, score: Int! }\ntype Query { leaderboard: [Player!]! }"}} {"submissionId":"cmsvgn37g01r3g4p2g1bkur12","title":"Submission BKUR12","payload":{"sample_query":"{ safeValue riskyValue }","resolver_code":"Query: {\n safeValue: () => 42,\n riskyValue: () => { throw new Error(\"computation failed\"); }\n}","expected_response":"{\"errors\": [{\"message\": \"computation failed\"}], \"data\": {\"safeValue\": 42, \"riskyValue\": null}}","schema_definition":"type Query { safeValue: Int!, riskyValue: Int }"}} {"submissionId":"cmsvgn37g01r4g4p2wxsxvll2","title":"Submission SXVLL2","payload":{"sample_query":"{ author { name books { title author { name } } } }","resolver_code":"Query: {\n author: () => {\n const authorRecord = { name: \"Le Guin\" };\n return {\n name: authorRecord.name,\n books: [\n { title: \"The Dispossessed\", __authorRef: authorRecord },\n { title: \"The Left Hand of Darkness\", __authorRef: authorRecord },\n ]\n };\n }\n},\nBook: {\n author: (book) => book.__authorRef\n}","expected_response":"{\"data\": {\"author\": {\"name\": \"Le Guin\", \"books\": [{\"title\": \"The Dispossessed\", \"author\": {\"name\": \"Le Guin\"}}, {\"title\": \"The Left Hand of Darkness\", \"author\": {\"name\": \"Le Guin\"}}]}}}","schema_definition":"type Author { name: String!, books: [Book!]! }\ntype Book { title: String!, author: Author! }\ntype Query { author: Author! }"}} {"submissionId":"cmsvgn37g01r5g4p2j66exlh6","title":"Submission 6EXLH6","payload":{"sample_query":"{ items(category: \"furniture\", onlyInStock: true) { name inStock } }","resolver_code":"Query: {\n items: (_, {category, onlyInStock}) => {\n const all = [\n { name: \"Chair\", category: \"furniture\", inStock: true },\n { name: \"Table\", category: \"furniture\", inStock: false },\n { name: \"Lamp\", category: \"lighting\", inStock: true },\n ];\n return all.filter(i => i.category === category && (!onlyInStock || i.inStock));\n }\n}","expected_response":"{\"data\": {\"items\": [{\"name\": \"Chair\", \"inStock\": true}]}}","schema_definition":"type Item { name: String!, category: String!, inStock: Boolean! }\ntype Query { items(category: String!, onlyInStock: Boolean!): [Item!]! }"}} {"submissionId":"cmsvgn37g01r6g4p2mkwojiwj","title":"Submission WOJIWJ","payload":{"sample_query":"{ company(id: \"2\") { name ceo { name } } }","resolver_code":"Query: {\n company: (_, {id}) => {\n const db = { \"1\": { name: \"Acme\", ceo: { name: \"Jane\" } }, \"2\": { name: \"Startup\", ceo: null } };\n return db[id];\n }\n}","expected_response":"{\"data\": {\"company\": {\"name\": \"Startup\", \"ceo\": null}}}","schema_definition":"type Person { name: String! }\ntype Company { name: String!, ceo: Person }\ntype Query { company(id: ID!): Company! }"}} {"submissionId":"cmsvgn37g01r7g4p2cj8wb64g","title":"Submission 8WB64G","payload":{"sample_query":"{ filterEven(nums: [1, 2, 3, 4, 5, 6, 7, 8]) }","resolver_code":"Query: {\n filterEven: (_, {nums}) => nums.filter(n => n % 2 === 0)\n}","expected_response":"{\"data\": {\"filterEven\": [2, 4, 6, 8]}}","schema_definition":"type Query { filterEven(nums: [Int!]!): [Int!]! }"}} {"submissionId":"cmsvgn37g01r8g4p2y71mkvwv","title":"Submission 1MKVWV","payload":{"sample_query":"{ weightedAverage(scores: [80, 90, 70], weights: [0.5, 0.3, 0.2]) }","resolver_code":"Query: {\n weightedAverage: (_, {scores, weights}) => {\n let sum = 0, wsum = 0;\n for (let i = 0; i < scores.length; i++) {\n sum += scores[i] * weights[i];\n wsum += weights[i];\n }\n return Math.round((sum / wsum) * 100) / 100;\n }\n}","expected_response":"{\"data\": {\"weightedAverage\": 81}}","schema_definition":"type Query { weightedAverage(scores: [Float!]!, weights: [Float!]!): Float! }"}} {"submissionId":"cmsvhfvmf01u4g4p2h6ok6l8z","title":"Submission OK6L8Z","payload":{"sample_query":"{ cart { id items { id price qty } total } }","resolver_code":"Query: {\n cart: () => ({\n id: \"c1\",\n items: [\n { id: \"i1\", price: 10, qty: 2 },\n { id: \"i2\", price: 5, qty: 3 }\n ]\n })\n},\nCart: {\n total: (parent) => parent.items.reduce((sum, it) => sum + it.price * it.qty, 0)\n}","expected_response":"{\"data\": {\"cart\": {\"id\": \"c1\", \"items\": [{\"id\": \"i1\", \"price\": 10, \"qty\": 2}, {\"id\": \"i2\", \"price\": 5, \"qty\": 3}], \"total\": 35}}}","schema_definition":"type Item { id: ID!, price: Int!, qty: Int! }\ntype Cart { id: ID!, items: [Item!]!, total: Int! }\ntype Query { cart: Cart! }"}} {"submissionId":"cmsvhfvmf01u5g4p2vf957uqy","title":"Submission 957UQY","payload":{"sample_query":"{ order { id subtotal tax } }","resolver_code":"Query: {\n order: () => ({ id: \"1\", subtotal: 100 })\n},\nOrder: {\n tax: (parent) => Math.round(parent.subtotal * 0.08)\n}","expected_response":"{\"data\": {\"order\": {\"id\": \"1\", \"subtotal\": 100, \"tax\": 8}}}","schema_definition":"type Order { id: ID!, subtotal: Int!, tax: Int! }\ntype Query { order: Order! }"}} {"submissionId":"cmsvhfvmf01u6g4p2oymlvid4","title":"Submission MLVID4","payload":{"sample_query":"{ itemsByStatus(status: DELETED) }","resolver_code":"Query: {\n itemsByStatus: (_, { status }) => status === \"ACTIVE\" ? 5 : 0\n}","expected_response":"{\"errors\": [{\"message\": \"Value \\\"DELETED\\\" does not exist in \\\"Status\\\" enum.\", \"locations\": [{\"line\": 1, \"column\": 25}]}]}","schema_definition":"enum Status { ACTIVE, INACTIVE, PENDING }\ntype Query { itemsByStatus(status: Status!): Int! }"}} {"submissionId":"cmsvhfvmf01u7g4p2imavfb9e","title":"Submission AVFB9E","payload":{"sample_query":"{ scores }","resolver_code":"Query: {\n scores: () => [10, 20, null, 40]\n}","expected_response":"{\"errors\": [{\"message\": \"Cannot return null for non-nullable field Query.scores.\", \"locations\": [{\"line\": 1, \"column\": 3}], \"path\": [\"scores\", 2]}]}","schema_definition":"type Query { scores: [Int!]! }"}} {"submissionId":"cmsvhfvmf01u8g4p2pym1bu57","title":"Submission M1BU57","payload":{"sample_query":"{ outer { inner { value } } }","resolver_code":"Query: {\n outer: () => ({ inner: null })\n}","expected_response":"{\"errors\": [{\"message\": \"Cannot return null for non-nullable field Outer.inner.\", \"locations\": [{\"line\": 1, \"column\": 11}], \"path\": [\"outer\", \"inner\"]}]}","schema_definition":"type Inner { value: Int! }\ntype Outer { inner: Inner! }\ntype Query { outer: Outer! }"}} {"submissionId":"cmsvhfvmf01u9g4p239erlc76","title":"Submission ERLC76","payload":{"sample_query":"mutation { createUser(email: \"not-an-email\") { id email } }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n createUser: (_, { email }) => {\n if (!email.includes(\"@\")) {\n throw new Error(\"Invalid email format\");\n }\n return { id: \"99\", email };\n }\n}","expected_response":"{\"errors\": [{\"message\": \"Invalid email format\", \"locations\": [{\"line\": 1, \"column\": 12}], \"path\": [\"createUser\"]}], \"data\": {\"createUser\": null}}","schema_definition":"type User { id: ID!, email: String! }\ntype Query { ping: String }\ntype Mutation { createUser(email: String!): User }"}} {"submissionId":"cmsvhfvmf01uag4p2bxct4s34","title":"Submission CT4S34","payload":{"sample_query":"{ describe(person: { name: \"Alice\", address: { city: \"Springfield\", zip: \"00000\" } }) }","resolver_code":"Query: {\n describe: (_, { person }) => `${person.name} lives in ${person.address.city} ${person.address.zip}`\n}","expected_response":"{\"data\": {\"describe\": \"Alice lives in Springfield 00000\"}}","schema_definition":"input AddressInput { city: String!, zip: String! }\ninput PersonInput { name: String!, address: AddressInput! }\ntype Query { describe(person: PersonInput!): String! }"}} {"submissionId":"cmsvhfvmf01ubg4p22g337qe1","title":"Submission 337QE1","payload":{"sample_query":"{ cartTotal(prices: [10, 20, 30]) }","resolver_code":"Query: { cartTotal: (_, { prices, taxRate }) => { const sum = prices.reduce((a,b) => a+b, 0); return Math.round(sum * (1+taxRate) * 100) / 100; } }","expected_response":"{\"data\": {\"cartTotal\": 64.8}}","schema_definition":"type Query { cartTotal(prices: [Float!]!, taxRate: Float = 0.08): Float! }"}} {"submissionId":"cmsvhfvmf01ucg4p2key0vwyh","title":"Submission Y0VWYH","payload":{"sample_query":"{ first: user(id: \"1\") { name } second: user(id: \"2\") { name } }","resolver_code":"Query: {\n user: (_, { id }) => ({ id, name: id === \"1\" ? \"Alice\" : \"Bob\" })\n}","expected_response":"{\"data\": {\"first\": {\"name\": \"Alice\"}, \"second\": {\"name\": \"Bob\"}}}","schema_definition":"type Query { user(id: ID!): UserRecord! }\ntype UserRecord { id: ID!, name: String! }"}} {"submissionId":"cmsvhfvmf01udg4p275vd9esd","title":"Submission VD9ESD","payload":{"sample_query":"{ checkStock(itemId: \"sku-99\") }","resolver_code":"Query: { checkStock: (_, { itemId }) => { const inventory = { \"sku-1\": 42, \"sku-2\": 0 }; if (!(itemId in inventory)) throw new Error(\"unknown item: \" + itemId); return inventory[itemId]; } }","expected_response":"{\"errors\":[{\"message\":\"unknown item: sku-99\",\"locations\":[{\"line\":1,\"column\":3}],\"path\":[\"checkStock\"]}],\"data\":null}","schema_definition":"type Query { checkStock(itemId: String!): Int! }"}} {"submissionId":"cmsvhg9z001ueg4p2bapde33a","title":"Submission PDE33A","payload":{"sample_query":"{ head { value next { value next { value next { value } } } } }","resolver_code":"Query: {\n head: () => {\n const n3 = { value: 3, next: null };\n const n2 = { value: 2, next: n3 };\n const n1 = { value: 1, next: n2 };\n return n1;\n }\n}","expected_response":"{\"data\": {\"head\": {\"value\": 1, \"next\": {\"value\": 2, \"next\": {\"value\": 3, \"next\": null}}}}}","schema_definition":"type ListNode { value: Int!, next: ListNode }\ntype Query { head: ListNode! }"}} {"submissionId":"cmsvhg9z001ufg4p2hdh17rso","title":"Submission H17RSO","payload":{"sample_query":"{ escalate(current: MEDIUM) }","resolver_code":"Query: {\n escalate: (_, { current }) => {\n const order = [\"LOW\", \"MEDIUM\", \"HIGH\"];\n const idx = order.indexOf(current);\n return order[Math.min(idx + 1, order.length - 1)];\n }\n}","expected_response":"{\"data\": {\"escalate\": \"HIGH\"}}","schema_definition":"enum Priority { LOW, MEDIUM, HIGH }\ntype Query { escalate(current: Priority!): Priority! }"}} {"submissionId":"cmsvhg9z001ugg4p238vfqz3e","title":"Submission VFQZ3E","payload":{"sample_query":"{ tags categories }","resolver_code":"Query: {\n tags: () => null,\n categories: () => []\n}","expected_response":"{\"data\": {\"tags\": null, \"categories\": []}}","schema_definition":"type Query { tags: [String!], categories: [String!]! }"}} {"submissionId":"cmsvhg9z001uhg4p2rcu14mfd","title":"Submission U14MFD","payload":{"sample_query":"{ products(minPrice: 10) { name price } }","resolver_code":"Query: {\n products: (_, { minPrice }) => [\n { id: \"1\", price: 10, name: \"Widget\" },\n { id: \"2\", price: 50, name: \"Gadget\" },\n { id: \"3\", price: 5, name: \"Gizmo\" }\n ].filter(p => p.price >= minPrice)\n}","expected_response":"{\"data\": {\"products\": [{\"name\": \"Widget\", \"price\": 10}, {\"name\": \"Gadget\", \"price\": 50}]}}","schema_definition":"type Product { id: ID!, price: Int!, name: String! }\ntype Query { products(minPrice: Int = 0): [Product!]! }"}} {"submissionId":"cmsvhg9z001uig4p2j1m8g91w","title":"Submission M8G91W","payload":{"sample_query":"{ me { ...UserFields } } fragment UserFields on User { id name email }","resolver_code":"Query: {\n me: () => ({ id: \"1\", name: \"Alice\", email: \"alice@example.com\" })\n}","expected_response":"{\"data\": {\"me\": {\"id\": \"1\", \"name\": \"Alice\", \"email\": \"alice@example.com\"}}}","schema_definition":"type User { id: ID!, name: String!, email: String! }\ntype Query { me: User! }"}} {"submissionId":"cmsvhg9z001ujg4p27mzuf3ds","title":"Submission ZUF3DS","payload":{"sample_query":"{ lookup(id: 42) }","resolver_code":"Query: {\n lookup: (_, { id }) => `looked up id=${id} (type ${typeof id})`\n}","expected_response":"{\"data\": {\"lookup\": \"looked up id=42 (type string)\"}}","schema_definition":"type Query { lookup(id: ID!): String! }"}} {"submissionId":"cmsvhg9z001ukg4p2k47rsrlc","title":"Submission 7RSRLC","payload":{"sample_query":"{ name secret @include(if: false) }","resolver_code":"Query: {\n name: () => \"public\",\n secret: () => \"hidden\"\n}","expected_response":"{\"data\": {\"name\": \"public\"}}","schema_definition":"type Query { name: String!, secret: String! }"}} {"submissionId":"cmsvhg9z001ulg4p2kb24faea","title":"Submission 24FAEA","payload":{"sample_query":"{ start { id b { id c { id a { id } } } } }","resolver_code":"Query: { start: () => {\n const aRec = { id: \"a1\" };\n const bRec = { id: \"b1\" };\n const cRec = { id: \"c1\" };\n aRec.b = bRec;\n bRec.c = cRec;\n cRec.a = aRec;\n return aRec;\n} },\nA: { b: (a) => a.b },\nB: { c: (b) => b.c },\nC: { a: (c) => c.a }","expected_response":"{\"data\": {\"start\": {\"id\": \"a1\", \"b\": {\"id\": \"b1\", \"c\": {\"id\": \"c1\", \"a\": {\"id\": \"a1\"}}}}}}","schema_definition":"type A { id: ID!, b: B! }\ntype B { id: ID!, c: C! }\ntype C { id: ID!, a: A! }\ntype Query { start: A! }"}} {"submissionId":"cmsvhg9z001umg4p2wf9r4mm1","title":"Submission 9R4MM1","payload":{"sample_query":"{ multiply(a: 5) }","resolver_code":"Query: {\n multiply: (_, { a, b }) => a * b\n}","expected_response":"{\"data\": {\"multiply\": 10}}","schema_definition":"type Query { multiply(a: Int!, b: Int = 2): Int! }"}} {"submissionId":"cmsvhg9z001ung4p2jxzbntuo","title":"Submission ZBNTUO","payload":{"sample_query":"{ roundedCount }","resolver_code":"Query: {\n roundedCount: () => 7.0\n}","expected_response":"{\"data\": {\"roundedCount\": 7}}","schema_definition":"type Query { roundedCount: Int! }"}} {"submissionId":"cmsvmh0a001wqg4p2kymqjhkb","title":"Submission MQJHKB","payload":{"sample_query":"{ product { id price discountedPrice } }","resolver_code":"Query: {\n product: () => ({ id: \"1\", price: 100.0 })\n},\nProduct: {\n discountedPrice: (p) => Math.round(p.price * 0.8 * 100) / 100\n}","expected_response":"{\"data\": {\"product\": {\"id\": \"1\", \"price\": 100, \"discountedPrice\": 80}}}","schema_definition":"type Product { id: ID!, price: Float!, discountedPrice: Float! }\ntype Query { product: Product! }"}} {"submissionId":"cmsvmh0a001wrg4p2tkaw4in5","title":"Submission AW4IN5","payload":{"sample_query":"{ users { name } }","resolver_code":"Query: {\n users: (_, { onlyActive }) => [\n { id: \"1\", name: \"Alice\", active: true },\n { id: \"2\", name: \"Bob\", active: false },\n { id: \"3\", name: \"Carol\", active: true }\n ].filter(u => !onlyActive || u.active)\n}","expected_response":"{\"data\": {\"users\": [{\"name\": \"Alice\"}, {\"name\": \"Carol\"}]}}","schema_definition":"type User { id: ID!, name: String!, active: Boolean! }\ntype Query { users(onlyActive: Boolean = true): [User!]! }"}} {"submissionId":"cmsvmh0a001wsg4p2i8eeqpab","title":"Submission EEQPAB","payload":{"sample_query":"{ categorize(celsius: 30) }","resolver_code":"Query: {\n categorize: (_, { celsius }) => {\n if (celsius < 10) return \"COLD\";\n if (celsius < 25) return \"MILD\";\n return \"HOT\";\n }\n}","expected_response":"{\"data\": {\"categorize\": \"HOT\"}}","schema_definition":"enum TempCategory { COLD, MILD, HOT }\ntype Query { categorize(celsius: Int!): TempCategory! }"}} {"submissionId":"cmsvmh0a001wtg4p2ra9wptyf","title":"Submission 9WPTYF","payload":{"sample_query":"{ stats { count total average } }","resolver_code":"Query: {\n stats: () => {\n const values = [10, 20, 30, 40];\n return { values };\n }\n},\nStats: {\n count: (s) => s.values.length,\n total: (s) => s.values.reduce((a, b) => a + b, 0),\n average: (s) => s.values.reduce((a, b) => a + b, 0) / s.values.length\n}","expected_response":"{\"data\": {\"stats\": {\"count\": 4, \"total\": 100, \"average\": 25}}}","schema_definition":"type Stats { count: Int!, total: Int!, average: Float! }\ntype Query { stats: Stats! }"}} {"submissionId":"cmsvmh0a001wug4p2uqkwrbjr","title":"Submission KWRBJR","payload":{"sample_query":"{ id optionalNote }","resolver_code":"Query: {\n id: () => \"abc123\",\n optionalNote: () => null\n}","expected_response":"{\"data\": {\"id\": \"abc123\", \"optionalNote\": null}}","schema_definition":"type Query { id: ID!, optionalNote: String }"}} {"submissionId":"cmsvmh0a001wvg4p2rqu6o8jh","title":"Submission U6O8JH","payload":{"sample_query":"{ scores }","resolver_code":"Query: {\n scores: () => [10, null, 30, null]\n}","expected_response":"{\"data\": {\"scores\": [10, null, 30, null]}}","schema_definition":"type Query { scores: [Int] }"}} {"submissionId":"cmsvmh0a001wwg4p24gi91oo7","title":"Submission I91OO7","payload":{"sample_query":"mutation { increment(by: 3) { value } }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n increment: (_, { by }) => ({ value: 5 + by })\n}","expected_response":"{\"data\": {\"increment\": {\"value\": 8}}}","schema_definition":"type Counter { value: Int! }\ntype Mutation { increment(by: Int = 1): Counter! }\ntype Query { ping: String }"}} {"submissionId":"cmsvmh0a001wxg4p2udagzpd4","title":"Submission AGZPD4","payload":{"sample_query":"{ shout(text: \"hello\") }","resolver_code":"Query: {\n shout: (_, { text }) => text.toUpperCase() + \"!\"\n}","expected_response":"{\"data\": {\"shout\": \"HELLO!\"}}","schema_definition":"type Query { shout(text: String!): String! }"}} {"submissionId":"cmsvmh0a001wyg4p2w7yu2638","title":"Submission YU2638","payload":{"sample_query":"{ sumList(nums: [1, 2, 3, 4, 5]) }","resolver_code":"Query: {\n sumList: (_, { nums }) => nums.reduce((a, b) => a + b, 0)\n}","expected_response":"{\"data\": {\"sumList\": 15}}","schema_definition":"type Query { sumList(nums: [Int!]!): Int! }"}} {"submissionId":"cmsvmh0a001wzg4p2gxrdjgp8","title":"Submission RDJGP8","payload":{"sample_query":"{ level1 { level2 { level3 { value } } } }","resolver_code":"Query: {\n level1: () => ({ level2: { level3: { value: 99 } } })\n}","expected_response":"{\"data\": {\"level1\": {\"level2\": {\"level3\": {\"value\": 99}}}}}","schema_definition":"type Level3 { value: Int! }\ntype Level2 { level3: Level3! }\ntype Level1 { level2: Level2! }\ntype Query { level1: Level1! }"}} {"submissionId":"cmsvml76s01y4g4p2ry02d24y","title":"Submission 02D24Y","payload":{"sample_query":"{ safeName riskyDivide(a: 10, b: 0) }","resolver_code":"Query: {\n safeName: () => \"server1\",\n riskyDivide: (_, { a, b }) => {\n if (b === 0) throw new Error(\"division by zero\");\n return a / b;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"division by zero\", \"locations\": [{\"line\": 1, \"column\": 12}], \"path\": [\"riskyDivide\"]}], \"data\": {\"safeName\": \"server1\", \"riskyDivide\": null}}","schema_definition":"type Query { safeName: String!, riskyDivide(a: Int!, b: Int!): Int }"}} {"submissionId":"cmsvml76s01y5g4p2zioa1d8s","title":"Submission OA1D8S","payload":{"sample_query":"{ items { id lineTotal } }","resolver_code":"Query: {\n items: () => [\n { id: \"1\", price: 5, qty: 3 },\n { id: \"2\", price: 10, qty: 2 }\n ]\n},\nItem: {\n lineTotal: (i) => i.price * i.qty\n}","expected_response":"{\"data\": {\"items\": [{\"id\": \"1\", \"lineTotal\": 15}, {\"id\": \"2\", \"lineTotal\": 20}]}}","schema_definition":"type Item { id: ID!, price: Int!, qty: Int!, lineTotal: Int! }\ntype Query { items: [Item!]! }"}} {"submissionId":"cmsvml76s01y6g4p2klq0dfrv","title":"Submission Q0DFRV","payload":{"sample_query":"{ status(verbose: true) }","resolver_code":"Query: {\n status: (_, { verbose }) => verbose ? \"System operational, all checks passed\" : \"OK\"\n}","expected_response":"{\"data\": {\"status\": \"System operational, all checks passed\"}}","schema_definition":"type Query { status(verbose: Boolean = false): String! }"}} {"submissionId":"cmsvml76s01y7g4p2z9agvw9a","title":"Submission AGVW9A","payload":{"sample_query":"{ user { id name } }","resolver_code":"Query: {\n user: () => ({ id: \"1\", name: \"Dave\", secretInternalField: \"hidden\" })\n}","expected_response":"{\"data\": {\"user\": {\"id\": \"1\", \"name\": \"Dave\"}}}","schema_definition":"type User { id: ID!, name: String! }\ntype Query { user: User! }"}} {"submissionId":"cmsvml76s01y8g4p2jze3hshd","title":"Submission E3HSHD","payload":{"sample_query":"{ celsiusToFahrenheit(values: [0, 100, 37]) }","resolver_code":"Query: { celsiusToFahrenheit: (_, { values }) => values.map(c => Math.round((c * 9/5 + 32) * 100) / 100) }","expected_response":"{\"data\": {\"celsiusToFahrenheit\": [32, 212, 98.6]}}","schema_definition":"type Query { celsiusToFahrenheit(values: [Float!]!): [Float!]! }"}} {"submissionId":"cmsvml76s01y9g4p2mf2pfhcg","title":"Submission 2PFHCG","payload":{"sample_query":"{ percentage(part: 3, total: 8) }","resolver_code":"Query: {\n percentage: (_, { part, total }) => Math.round((part / total) * 10000) / 100\n}","expected_response":"{\"data\": {\"percentage\": 37.5}}","schema_definition":"type Query { percentage(part: Int!, total: Int!): Float! }"}} {"submissionId":"cmsvml76s01yag4p23o7rtu32","title":"Submission 7RTU32","payload":{"sample_query":"mutation { compute(a: 4, b: 6) { sum product } }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n compute: (_, { a, b }) => ({ sum: a + b, product: a * b })\n}","expected_response":"{\"data\": {\"compute\": {\"sum\": 10, \"product\": 24}}}","schema_definition":"type Result { sum: Int!, product: Int! }\ntype Mutation { compute(a: Int!, b: Int!): Result! }\ntype Query { ping: String }"}} {"submissionId":"cmsvml76s01ybg4p28wppfexa","title":"Submission PPFEXA","payload":{"sample_query":"{ bmi(body: { weightKg: 70, heightM: 1.75 }) }","resolver_code":"Query: {\n bmi: (_, { body }) => Math.round((body.weightKg / (body.heightM * body.heightM)) * 10) / 10\n}","expected_response":"{\"data\": {\"bmi\": 22.9}}","schema_definition":"input BodyInput { weightKg: Float!, heightM: Float! }\ntype Query { bmi(body: BodyInput!): Float! }"}} {"submissionId":"cmsvml76s01ycg4p2dx1ef0cu","title":"Submission 1EF0CU","payload":{"sample_query":"{ root { value children { value children { value } } } }","resolver_code":"Query: {\n root: () => ({\n value: 1,\n children: [\n { value: 2, children: [{ value: 4, children: [] }] },\n { value: 3, children: [] }\n ]\n })\n}","expected_response":"{\"data\": {\"root\": {\"value\": 1, \"children\": [{\"value\": 2, \"children\": [{\"value\": 4}]}, {\"value\": 3, \"children\": []}]}}}","schema_definition":"type TreeNode { value: Int!, children: [TreeNode!]! }\ntype Query { root: TreeNode! }"}} {"submissionId":"cmsvml76s01ydg4p245xnp1ti","title":"Submission XNP1TI","payload":{"sample_query":"{ tags }","resolver_code":"Query: {\n tags: () => []\n}","expected_response":"{\"data\": {\"tags\": []}}","schema_definition":"type Query { tags: [String!]! }"}} {"submissionId":"cmsvmljy501yeg4p2f2kgtaua","title":"Submission KGTAUA","payload":{"sample_query":"{ x: cube(n: 2) y: cube(n: 4) }","resolver_code":"Query: {\n cube: (_, { n }) => n * n * n\n}","expected_response":"{\"data\": {\"x\": 8, \"y\": 64}}","schema_definition":"type Query { cube(n: Int!): Int! }"}} {"submissionId":"cmsvnjd76020ng4p28lz40glx","title":"Submission Z40GLX","payload":{"sample_query":"mutation { applyDiscount(code: \"SAVE20\", subtotal: 150) }","resolver_code":"Mutation: { applyDiscount: (_, { code, subtotal }) => { const discounts = { SAVE10: 0.1, SAVE20: 0.2 }; const rate = discounts[code] || 0; return Math.round(subtotal * (1 - rate) * 100) / 100; } }","expected_response":"{\"data\": {\"applyDiscount\": 120}}","schema_definition":"type Query { _empty: Boolean }\ntype Mutation { applyDiscount(code: String!, subtotal: Float!): Float! }"}} {"submissionId":"cmsvnjd76020og4p2e8tytt0t","title":"Submission TYTT0T","payload":{"sample_query":"{ overtimePay(baseRate: 20, hoursWorked: 46) }","resolver_code":"Query: { overtimePay: (_, { baseRate, hoursWorked }) => { const regular = Math.min(hoursWorked, 40); const overtime = Math.max(hoursWorked - 40, 0); return baseRate * regular + baseRate * 1.5 * overtime; } }","expected_response":"{\"data\": {\"overtimePay\": 980}}","schema_definition":"type Query { overtimePay(baseRate: Float!, hoursWorked: Float!): Float! }"}} {"submissionId":"cmsvnjd76020pg4p2sebnsxz3","title":"Submission BNSXZ3","payload":{"sample_query":"{ fruits(color: \"red\") { name } }","resolver_code":"Query: {\n fruits: (_, { color }) => [\n { name: \"apple\", color: \"red\" },\n { name: \"banana\", color: \"yellow\" },\n { name: \"cherry\", color: \"red\" }\n ].filter(f => f.color === color)\n}","expected_response":"{\"data\": {\"fruits\": [{\"name\": \"apple\"}, {\"name\": \"cherry\"}]}}","schema_definition":"type Fruit { name: String!, color: String! }\ntype Query { fruits(color: String!): [Fruit!]! }"}} {"submissionId":"cmsvnjd76020qg4p2j2pp9vw9","title":"Submission PP9VW9","payload":{"sample_query":"mutation { addTag(tag: \"new\") }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n addTag: (_, { tag }) => [\"existing\", \"tags\", tag]\n}","expected_response":"{\"data\": {\"addTag\": [\"existing\", \"tags\", \"new\"]}}","schema_definition":"type Mutation { addTag(tag: String!): [String!]! }\ntype Query { ping: String }"}} {"submissionId":"cmsvnjd76020rg4p2fankmidd","title":"Submission NKMIDD","payload":{"sample_query":"{ account(id: \"99\") { id balance } }","resolver_code":"Query: {\n account: (_, { id }) => {\n const accounts = { \"1\": { id: \"1\", balance: 100 } };\n return accounts[id] || null;\n }\n}","expected_response":"{\"data\": {\"account\": null}}","schema_definition":"type Account { id: ID!, balance: Int! }\ntype Query { account(id: ID!): Account }"}} {"submissionId":"cmsvnjd76020sg4p24dwd61ni","title":"Submission WD61NI","payload":{"sample_query":"{ orders(status: SHIPPED) { id } }","resolver_code":"Query: {\n orders: (_, { status }) => [\n { id: \"1\", status: \"PENDING\" },\n { id: \"2\", status: \"SHIPPED\" },\n { id: \"3\", status: \"SHIPPED\" }\n ].filter(o => o.status === status)\n}","expected_response":"{\"data\": {\"orders\": [{\"id\": \"2\"}, {\"id\": \"3\"}]}}","schema_definition":"enum OrderStatus { PENDING, SHIPPED, DELIVERED }\ntype Order { id: ID!, status: OrderStatus! }\ntype Query { orders(status: OrderStatus!): [Order!]! }"}} {"submissionId":"cmsvnjd76020tg4p2x3bfkm1s","title":"Submission BFKM1S","payload":{"sample_query":"{ student { name average } }","resolver_code":"Query: { student: () => ({ name: \"Sam\", grades: [80, 90, 70, 100] }) },\nStudent: {\n average: (s) => s.grades.reduce((a, b) => a + b, 0) / s.grades.length\n}","expected_response":"{\"data\": {\"student\": {\"name\": \"Sam\", \"average\": 85}}}","schema_definition":"type Student { name: String!, average: Float! }\ntype Query { student: Student! }"}} {"submissionId":"cmsvnjd76020ug4p2uodmarqw","title":"Submission DMARQW","payload":{"sample_query":"mutation { createCustomer(name: \"Lee\", city: \"Austin\", zip: \"78701\") { name address { city zip } } }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n createCustomer: (_, { name, city, zip }) => ({ name, address: { city, zip } })\n}","expected_response":"{\"data\": {\"createCustomer\": {\"name\": \"Lee\", \"address\": {\"city\": \"Austin\", \"zip\": \"78701\"}}}}","schema_definition":"type Address { city: String!, zip: String! }\ntype Customer { name: String!, address: Address! }\ntype Mutation { createCustomer(name: String!, city: String!, zip: String!): Customer! }\ntype Query { ping: String }"}} {"submissionId":"cmsvnjd76020vg4p242j5ce5j","title":"Submission J5CE5J","payload":{"sample_query":"{ wordLength(word: \"graphql\") }","resolver_code":"Query: {\n wordLength: (_, { word }) => word.length\n}","expected_response":"{\"data\": {\"wordLength\": 7}}","schema_definition":"type Query { wordLength(word: String!): Int! }"}} {"submissionId":"cmsvnjd76020wg4p2df5h1kjn","title":"Submission 5H1KJN","payload":{"sample_query":"{ info(n: 7) { value isEven } }","resolver_code":"Query: { info: (_, { n }) => ({ value: n }) },\nNumberInfo: {\n isEven: (i) => i.value % 2 === 0\n}","expected_response":"{\"data\": {\"info\": {\"value\": 7, \"isEven\": false}}}","schema_definition":"type NumberInfo { value: Int!, isEven: Boolean! }\ntype Query { info(n: Int!): NumberInfo! }"}} {"submissionId":"cmsvnjd76020xg4p28n4b8xgz","title":"Submission 4B8XGZ","payload":{"sample_query":"{ cart { total } }","resolver_code":"Query: { cart: () => ({ orders: [{ id: \"1\", amount: 20 }, { id: \"2\", amount: 35 }] }) },\nCart: {\n total: (c) => c.orders.reduce((sum, o) => sum + o.amount, 0)\n}","expected_response":"{\"data\": {\"cart\": {\"total\": 55}}}","schema_definition":"type Order { id: ID!, amount: Int! }\ntype Cart { orders: [Order!]!, total: Int! }\ntype Query { cart: Cart! }"}} {"submissionId":"cmsvnjd76020yg4p2v6lgyy82","title":"Submission LGYY82","payload":{"sample_query":"{ fullAddress(street: \"1 Main St\", city: \"Springfield\", zip: \"62704\") }","resolver_code":"Query: {\n fullAddress: (_, { street, city, zip }) => `${street}, ${city} ${zip}`\n}","expected_response":"{\"data\": {\"fullAddress\": \"1 Main St, Springfield 62704\"}}","schema_definition":"type Query { fullAddress(street: String!, city: String!, zip: String!): String! }"}} {"submissionId":"cmsvnjd76020zg4p2eop4o547","title":"Submission P4O547","payload":{"sample_query":"{ milesToKm(miles: 26.2) }","resolver_code":"Query: {\n milesToKm: (_, { miles }) => Math.round(miles * 1.60934 * 100) / 100\n}","expected_response":"{\"data\": {\"milesToKm\": 42.16}}","schema_definition":"type Query { milesToKm(miles: Float!): Float! }"}} {"submissionId":"cmsvnjd760210g4p2sq0j5gpv","title":"Submission 0J5GPV","payload":{"sample_query":"{ head { value next { value next { value next { value } } } } }","resolver_code":"Query: {\n head: () => ({\n value: 1,\n next: { value: 2, next: { value: 3, next: null } }\n })\n}","expected_response":"{\"data\": {\"head\": {\"value\": 1, \"next\": {\"value\": 2, \"next\": {\"value\": 3, \"next\": null}}}}}","schema_definition":"type Node { value: Int!, next: Node }\ntype Query { head: Node! }"}} {"submissionId":"cmsvnjd760211g4p2455nrkfn","title":"Submission 5NRKFN","payload":{"sample_query":"{ squareRoot(n: -4) }","resolver_code":"Query: {\n squareRoot: (_, { n }) => {\n if (n < 0) throw new Error(\"cannot compute square root of negative number\");\n return Math.sqrt(n);\n }\n}","expected_response":"{\"errors\": [{\"message\": \"cannot compute square root of negative number\", \"locations\": [{\"line\": 1, \"column\": 3}], \"path\": [\"squareRoot\"]}], \"data\": null}","schema_definition":"type Query { squareRoot(n: Int!): Float! }"}} {"submissionId":"cmsvnjd760212g4p233dxe3x2","title":"Submission DXE3X2","payload":{"sample_query":"{ maxOf(nums: [3, 9, 1, 7, 4]) }","resolver_code":"Query: {\n maxOf: (_, { nums }) => Math.max(...nums)\n}","expected_response":"{\"data\": {\"maxOf\": 9}}","schema_definition":"type Query { maxOf(nums: [Int!]!): Int! }"}} {"submissionId":"cmsvnjd760213g4p2jofxpltr","title":"Submission FXPLTR","payload":{"sample_query":"{ discountCode(eligible: false) }","resolver_code":"Query: {\n discountCode: (_, { eligible }) => eligible ? \"SAVE10\" : null\n}","expected_response":"{\"data\": {\"discountCode\": null}}","schema_definition":"type Query { discountCode(eligible: Boolean!): String }"}} {"submissionId":"cmsvnjd760214g4p2145t7vwr","title":"Submission 5T7VWR","payload":{"sample_query":"{ standard: priceWithTax(price: 100, taxRate: 0.08) premium: priceWithTax(price: 200, taxRate: 0.08) }","resolver_code":"Query: {\n priceWithTax: (_, { price, taxRate }) => Math.round(price * (1 + taxRate) * 100) / 100\n}","expected_response":"{\"data\": {\"standard\": 108, \"premium\": 216}}","schema_definition":"type Query { priceWithTax(price: Float!, taxRate: Float!): Float! }"}} {"submissionId":"cmsvnjd760215g4p2mnt4hi7q","title":"Submission T4HI7Q","payload":{"sample_query":"{ orderTotal(order: { items: [10, 20, 30] }) }","resolver_code":"Query: {\n orderTotal: (_, { order }) => order.items.reduce((a, b) => a + b, 0)\n}","expected_response":"{\"data\": {\"orderTotal\": 60}}","schema_definition":"input OrderInput { items: [Int!]! }\ntype Query { orderTotal(order: OrderInput!): Int! }"}} {"submissionId":"cmsvnjd760216g4p2os53vd9s","title":"Submission 53VD9S","payload":{"sample_query":"{ tagCount }","resolver_code":"Query: {\n tagCount: (_, { tags }) => tags.length\n}","expected_response":"{\"data\": {\"tagCount\": 2}}","schema_definition":"type Query { tagCount(tags: [String!] = [\"default\", \"sample\"]): Int! }"}} {"submissionId":"cmsvnjqxf0217g4p29fsamaqg","title":"Submission SAMAQG","payload":{"sample_query":"{ warehouse(threshold: 50) { name stock lowStock } }","resolver_code":"Query: { warehouse: (_, { threshold }) => ({ name: \"Central\", stock: 42, threshold }) },\nWarehouse: {\n lowStock: (w) => w.stock < w.threshold\n}","expected_response":"{\"data\": {\"warehouse\": {\"name\": \"Central\", \"stock\": 42, \"lowStock\": true}}}","schema_definition":"type Warehouse { name: String!, stock: Int!, lowStock: Boolean! }\ntype Query { warehouse(threshold: Int!): Warehouse! }"}} {"submissionId":"cmsvnwdlk023gg4p2tiupnkoe","title":"Submission UPNKOE","payload":{"sample_query":"{ package(weightKg: 4.4) { weightKg shippingCost } }","resolver_code":"Query: { package: (_, { weightKg }) => ({ weightKg }) },\nPackage: {\n shippingCost: (p) => Math.round(p.weightKg * 2.5 * 100) / 100\n}","expected_response":"{\"data\": {\"package\": {\"weightKg\": 4.4, \"shippingCost\": 11}}}","schema_definition":"type Package { weightKg: Float!, shippingCost: Float! }\ntype Query { package(weightKg: Float!): Package! }"}} {"submissionId":"cmsvnwdlk023hg4p21dy73v3h","title":"Submission Y73V3H","payload":{"sample_query":"{ articles(limit: 2) { id title } }","resolver_code":"Query: {\n articles: (_, { limit }) => [\n { id: \"1\", title: \"First\" },\n { id: \"2\", title: \"Second\" },\n { id: \"3\", title: \"Third\" },\n { id: \"4\", title: \"Fourth\" }\n ].slice(0, limit)\n}","expected_response":"{\"data\": {\"articles\": [{\"id\": \"1\", \"title\": \"First\"}, {\"id\": \"2\", \"title\": \"Second\"}]}}","schema_definition":"type Article { id: ID!, title: String! }\ntype Query { articles(limit: Int!): [Article!]! }"}} {"submissionId":"cmsvnwdlk023ig4p22la39936","title":"Submission A39936","payload":{"sample_query":"{ product { name reviews { rating comment } } }","resolver_code":"Query: {\n product: () => ({\n name: \"Widget\",\n reviews: [\n { rating: 5, comment: \"Great\" },\n { rating: 2, comment: \"Meh\" },\n { rating: 4, comment: \"Good\" }\n ]\n })\n}","expected_response":"{\"data\": {\"product\": {\"name\": \"Widget\", \"reviews\": [{\"rating\": 5, \"comment\": \"Great\"}, {\"rating\": 2, \"comment\": \"Meh\"}, {\"rating\": 4, \"comment\": \"Good\"}]}}}","schema_definition":"type Review { rating: Int!, comment: String! }\ntype Product { name: String!, reviews: [Review!]! }\ntype Query { product: Product! }"}} {"submissionId":"cmsvnwdlk023jg4p23921k3dm","title":"Submission 21K3DM","payload":{"sample_query":"mutation { deleteItem(id: \"5\") }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n deleteItem: (_, { id }) => {\n const existing = new Set([\"1\", \"2\", \"3\"]);\n return existing.has(id);\n }\n}","expected_response":"{\"data\": {\"deleteItem\": false}}","schema_definition":"type Mutation { deleteItem(id: ID!): Boolean! }\ntype Query { ping: String }"}} {"submissionId":"cmsvnwdlk023kg4p2pts2ebly","title":"Submission S2EBLY","payload":{"sample_query":"{ person { name age } }","resolver_code":"Query: { person: () => ({ name: \"Sam\", birthYear: 1990 }) },\nPerson: {\n age: (p) => 2026 - p.birthYear\n}","expected_response":"{\"data\": {\"person\": {\"name\": \"Sam\", \"age\": 36}}}","schema_definition":"type Person { name: String!, birthYear: Int!, age: Int! }\ntype Query { person: Person! }"}} {"submissionId":"cmsvnwdlk023lg4p2gnw92as4","title":"Submission W92AS4","payload":{"sample_query":"{ pageSize }","resolver_code":"Query: {\n pageSize: (_, { size }) => size\n}","expected_response":"{\"data\": {\"pageSize\": 10}}","schema_definition":"type Query { pageSize(size: Int = 10): Int! }"}} {"submissionId":"cmsvnwdlk023mg4p2ck2gs009","title":"Submission 2GS009","payload":{"sample_query":"{ order(quantity: 12, unitPrice: 2.5) { quantity unitPrice subtotal discountApplied total } }","resolver_code":"Query: {\n order: (_, { quantity, unitPrice }) => ({ quantity, unitPrice })\n},\nOrder: {\n subtotal: (parent) => parent.quantity * parent.unitPrice,\n discountApplied: (parent) => parent.quantity >= 10,\n total: (parent) => {\n const subtotal = parent.quantity * parent.unitPrice;\n return parent.quantity >= 10 ? subtotal * 0.9 : subtotal;\n }\n}","expected_response":"{\"data\":{\"order\":{\"quantity\":12,\"unitPrice\":2.5,\"subtotal\":30,\"discountApplied\":true,\"total\":27}}}","schema_definition":"type Order { quantity: Int!, unitPrice: Float!, subtotal: Float!, discountApplied: Boolean!, total: Float! }\ntype Query { order(quantity: Int!, unitPrice: Float!): Order! }"}} {"submissionId":"cmsvnwdlk023ng4p2op2mxm12","title":"Submission 2MXM12","payload":{"sample_query":"mutation { withdraw(currentBalance: 100, amount: 150) { balance currency } }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n withdraw: (_, { currentBalance, amount }) => {\n if (amount <= 0) throw new Error(\"withdrawal amount must be positive\");\n if (amount > currentBalance) throw new Error(\"insufficient funds\");\n return { balance: currentBalance - amount, currency: \"USD\" };\n }\n}","expected_response":"{\"errors\":[{\"message\":\"insufficient funds\",\"locations\":[{\"line\":1,\"column\":12}],\"path\":[\"withdraw\"]}],\"data\":null}","schema_definition":"type Account { balance: Float!, currency: String! }\ntype Query { ping: String }\ntype Mutation { withdraw(currentBalance: Float!, amount: Float!): Account! }"}} {"submissionId":"cmsvnwdlk023og4p2dg4i4d39","title":"Submission 4I4D39","payload":{"sample_query":"{ doubleAll(nums: [1, 2, 3, 4]) }","resolver_code":"Query: {\n doubleAll: (_, { nums }) => nums.map(n => n * 2)\n}","expected_response":"{\"data\": {\"doubleAll\": [2, 4, 6, 8]}}","schema_definition":"type Query { doubleAll(nums: [Int!]!): [Int!]! }"}} {"submissionId":"cmsvnwdlk023pg4p2fexxzr1c","title":"Submission XXZR1C","payload":{"sample_query":"{ joinWords(words: [\"red\", \"green\", \"blue\"], separator: \" | \") }","resolver_code":"Query: {\n joinWords: (_, { words, separator }) => words.join(separator)\n}","expected_response":"{\"data\": {\"joinWords\": \"red | green | blue\"}}","schema_definition":"type Query { joinWords(words: [String!]!, separator: String!): String! }"}} {"submissionId":"cmsvnwdlk023qg4p20wbmi307","title":"Submission BMI307","payload":{"sample_query":"{ author { initials } }","resolver_code":"Query: { author: () => ({ firstName: \"Grace\", lastName: \"Hopper\" }) },\nAuthor: {\n initials: (a) => `${a.firstName[0]}${a.lastName[0]}`\n}","expected_response":"{\"data\": {\"author\": {\"initials\": \"GH\"}}}","schema_definition":"type Author { firstName: String!, lastName: String!, initials: String! }\ntype Query { author: Author! }"}} {"submissionId":"cmsvnwdlk023rg4p2qwzcph72","title":"Submission ZCPH72","payload":{"sample_query":"{ bothTrue(a: true, b: false) }","resolver_code":"Query: {\n bothTrue: (_, { a, b }) => a && b\n}","expected_response":"{\"data\": {\"bothTrue\": false}}","schema_definition":"type Query { bothTrue(a: Boolean!, b: Boolean!): Boolean! }"}} {"submissionId":"cmsvnwdlk023sg4p2b4kka1sp","title":"Submission KKA1SP","payload":{"sample_query":"{ rect { label area } }","resolver_code":"Query: { rect: () => ({ width: 4, height: 5, label: \"Box A\" }) },\nRectangle: {\n area: (r) => r.width * r.height\n}","expected_response":"{\"data\": {\"rect\": {\"label\": \"Box A\", \"area\": 20}}}","schema_definition":"type Rectangle { width: Float!, height: Float!, label: String!, area: Float! }\ntype Query { rect: Rectangle! }"}} {"submissionId":"cmsvnwdlk023tg4p2jtiojlw3","title":"Submission IOJLW3","payload":{"sample_query":"mutation { toggleFeature(current: true) }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n toggleFeature: (_, { current }) => !current\n}","expected_response":"{\"data\": {\"toggleFeature\": false}}","schema_definition":"type Mutation { toggleFeature(current: Boolean!): Boolean! }\ntype Query { ping: String }"}} {"submissionId":"cmsvnwdlk023ug4p2qsn5ftb4","title":"Submission N5FTB4","payload":{"sample_query":"{ average(nums: [2.5, 3.5, 4.0]) }","resolver_code":"Query: {\n average: (_, { nums }) => Math.round((nums.reduce((a, b) => a + b, 0) / nums.length) * 100) / 100\n}","expected_response":"{\"data\": {\"average\": 3.33}}","schema_definition":"type Query { average(nums: [Float!]!): Float! }"}} {"submissionId":"cmsvnwdlk023vg4p2xxl55auy","title":"Submission L55AUY","payload":{"sample_query":"{ account(type: \"gold\") { type isPremium } }","resolver_code":"Query: { account: (_, { type }) => ({ type }) },\nAccount: {\n isPremium: (a) => a.type === \"gold\" || a.type === \"platinum\"\n}","expected_response":"{\"data\": {\"account\": {\"type\": \"gold\", \"isPremium\": true}}}","schema_definition":"type Account { type: String!, isPremium: Boolean! }\ntype Query { account(type: String!): Account! }"}} {"submissionId":"cmsvnwdlk023wg4p2pvd4puqw","title":"Submission D4PUQW","payload":{"sample_query":"{ factorial(n: 6) }","resolver_code":"Query: {\n factorial: (_, { n }) => {\n function fact(x) { return x <= 1 ? 1 : x * fact(x - 1); }\n return fact(n);\n }\n}","expected_response":"{\"data\": {\"factorial\": 720}}","schema_definition":"type Query { factorial(n: Int!): Int! }"}} {"submissionId":"cmsvnwdlk023xg4p2igotqu3f","title":"Submission OTQU3F","payload":{"sample_query":"{ rectangle(width: 4, height: 5) { width height area } }","resolver_code":"Query: {\n rectangle: (_, { width, height }) => ({ width, height })\n},\nRectangle: {\n area: (parent) => parent.width * parent.height\n}","expected_response":"{\"data\":{\"rectangle\":{\"width\":4,\"height\":5,\"area\":20}}}","schema_definition":"type Rectangle { width: Float!, height: Float!, area: Float! }\ntype Query { rectangle(width: Float!, height: Float!): Rectangle! }"}} {"submissionId":"cmsvnwdlk023yg4p22xg365yf","title":"Submission G365YF","payload":{"sample_query":"{ reverseList(items: [\"a\", \"b\", \"c\", \"d\"]) }","resolver_code":"Query: {\n reverseList: (_, { items }) => [...items].reverse()\n}","expected_response":"{\"data\": {\"reverseList\": [\"d\", \"c\", \"b\", \"a\"]}}","schema_definition":"type Query { reverseList(items: [String!]!): [String!]! }"}} {"submissionId":"cmsvnwdlk023zg4p2kbbvwbod","title":"Submission BVWBOD","payload":{"sample_query":"{ endpoint { fullUrl } }","resolver_code":"Query: { endpoint: () => ({ protocol: \"https\", host: \"api.example.com\", path: \"/v1/users\" }) },\nEndpoint: {\n fullUrl: (e) => `${e.protocol}://${e.host}${e.path}`\n}","expected_response":"{\"data\": {\"endpoint\": {\"fullUrl\": \"https://api.example.com/v1/users\"}}}","schema_definition":"type Endpoint { protocol: String!, host: String!, path: String!, fullUrl: String! }\ntype Query { endpoint: Endpoint! }"}} {"submissionId":"cmsvocvnr027mg4p2gfrut8uy","title":"Submission RUT8UY","payload":{"sample_query":"{ products(inStockOnly: true) { name inStock } }","resolver_code":"Query: {\n products: (_, {inStockOnly}) => {\n const all = [\n {name: \"Widget\", inStock: true},\n {name: \"Gadget\", inStock: false},\n {name: \"Gizmo\", inStock: true}\n ];\n return inStockOnly ? all.filter(p => p.inStock) : all;\n }\n}","expected_response":"{\"data\": {\"products\": [{\"name\": \"Widget\", \"inStock\": true}, {\"name\": \"Gizmo\", \"inStock\": true}]}}","schema_definition":"type Product { name: String!, inStock: Boolean! }\ntype Query { products(inStockOnly: Boolean = false): [Product!]! }"}} {"submissionId":"cmsvocvnr027og4p2t0i21b91","title":"Submission I21B91","payload":{"sample_query":"{ author { name bookCount books { title } } }","resolver_code":"Query: {\n author: () => ({name: \"Frank Herbert\", books: [{title: \"Dune\"}, {title: \"Dune Messiah\"}, {title: \"Children of Dune\"}]})\n},\nAuthor: {\n bookCount: (a) => a.books.length\n}","expected_response":"{\"data\": {\"author\": {\"name\": \"Frank Herbert\", \"bookCount\": 3, \"books\": [{\"title\": \"Dune\"}, {\"title\": \"Dune Messiah\"}, {\"title\": \"Children of Dune\"}]}}}","schema_definition":"type Book { title: String! }\ntype Author { name: String!, books: [Book!]!, bookCount: Int! }\ntype Query { author: Author }"}} {"submissionId":"cmsvocvnr027qg4p267npdtz5","title":"Submission NPDTZ5","payload":{"sample_query":"{ numbers(offset: 3, limit: 2) }","resolver_code":"Query: {\n numbers: (_, {offset, limit}) => {\n const all = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n return all.slice(offset, offset + limit);\n }\n}","expected_response":"{\"data\": {\"numbers\": [4, 5]}}","schema_definition":"type Query { numbers(offset: Int = 0, limit: Int = 10): [Int!]! }"}} {"submissionId":"cmsvocvns027rg4p2o1s87nub","title":"Submission S87NUB","payload":{"sample_query":"{ tasks(minPriority: MEDIUM) { title priority } }","resolver_code":"Query: {\n tasks: (_, {minPriority}) => {\n const order = {LOW: 0, MEDIUM: 1, HIGH: 2};\n const all = [\n {title: \"Clean desk\", priority: \"LOW\"},\n {title: \"Fix bug\", priority: \"HIGH\"},\n {title: \"Reply email\", priority: \"MEDIUM\"}\n ];\n return all.filter(t => order[t.priority] >= order[minPriority]);\n }\n}","expected_response":"{\"data\": {\"tasks\": [{\"title\": \"Fix bug\", \"priority\": \"HIGH\"}, {\"title\": \"Reply email\", \"priority\": \"MEDIUM\"}]}}","schema_definition":"enum Priority { LOW, MEDIUM, HIGH }\ntype Task { title: String!, priority: Priority! }\ntype Query { tasks(minPriority: Priority = LOW): [Task!]! }"}} {"submissionId":"cmsvocvns027sg4p2ducnmkfw","title":"Submission CNMKFW","payload":{"sample_query":"{ comments { text author } }","resolver_code":"Query: {\n comments: () => ([\n {text: \"Great post!\", author: \"Alice\"},\n {text: \"Anonymous comment\", author: null}\n ])\n}","expected_response":"{\"data\": {\"comments\": [{\"text\": \"Great post!\", \"author\": \"Alice\"}, {\"text\": \"Anonymous comment\", \"author\": null}]}}","schema_definition":"type Comment { text: String!, author: String }\ntype Query { comments: [Comment!]! }"}} {"submissionId":"cmsvocvns027tg4p20b24ny9g","title":"Submission 24NY9G","payload":{"sample_query":"{ cart { items total } }","resolver_code":"Query: {\n cart: () => ({items: [10, 20, 30]})\n},\nCart: {\n total: (c) => c.items.reduce((sum, x) => sum + x, 0)\n}","expected_response":"{\"data\": {\"cart\": {\"items\": [10, 20, 30], \"total\": 60}}}","schema_definition":"type Cart { items: [Int!]!, total: Int! }\ntype Query { cart: Cart }"}} {"submissionId":"cmsvocvns027vg4p2v8cprcbk","title":"Submission CPRCBK","payload":{"sample_query":"{ shout(text: \"hello\") }","resolver_code":"Query: { shout: (_, {text}) => text.toUpperCase() + '!' }","expected_response":"{\"data\": {\"shout\": \"HELLO!\"}}","schema_definition":"type Query { shout(text: String!): String! }"}} {"submissionId":"cmsvor0hk02b8g4p2rjqn1037","title":"Submission QN1037","payload":{"sample_query":"{ item(basePrice: 80, percentOff: 25) { finalPrice } }","resolver_code":"Query: { item: (_, { basePrice, percentOff }) => ({ basePrice, percentOff }) },\nItem: { finalPrice: (i) => Math.round(i.basePrice * (1 - i.percentOff / 100) * 100) / 100 }","expected_response":"{\"data\": {\"item\": {\"finalPrice\": 60}}}","schema_definition":"type Item { basePrice: Float!, percentOff: Float!, finalPrice: Float! }\ntype Query { item(basePrice: Float!, percentOff: Float!): Item! }"}} {"submissionId":"cmsvor0hk02b9g4p25xtjteee","title":"Submission TJTEEE","payload":{"sample_query":"mutation { increment(current: 10, step: 5) }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: { increment: (_, { current, step }) => current + step }","expected_response":"{\"data\": {\"increment\": 15}}","schema_definition":"type Mutation { increment(current: Int!, step: Int!): Int! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02bag4p24ah8bpdn","title":"Submission H8BPDN","payload":{"sample_query":"{ aboveThreshold(nums: [3, 8, 1, 12, 5], min: 5) }","resolver_code":"Query: { aboveThreshold: (_, { nums, min }) => nums.filter(n => n >= min) }","expected_response":"{\"data\": {\"aboveThreshold\": [8, 12, 5]}}","schema_definition":"type Query { aboveThreshold(nums: [Int!]!, min: Int!): [Int!]! }"}} {"submissionId":"cmsvor0hk02bbg4p28o8nog3o","title":"Submission 8NOG3O","payload":{"sample_query":"{ student { name passed } }","resolver_code":"Query: { student: () => ({ name: \"Kim\", scores: [45, 72, 88, 30] }) },\nStudent: { passed: (s) => s.scores.map(sc => sc >= 50) }","expected_response":"{\"data\": {\"student\": {\"name\": \"Kim\", \"passed\": [false, true, true, false]}}}","schema_definition":"type Student { name: String!, scores: [Int!]!, passed: [Boolean!]! }\ntype Query { student: Student! }"}} {"submissionId":"cmsvor0hk02bcg4p2mn7aoj52","title":"Submission 7AOJ52","payload":{"sample_query":"mutation { squareRoot(n: -9) }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n squareRoot: (_, { n }) => {\n if (n < 0) throw new Error(\"cannot take square root of negative number\");\n return Math.sqrt(n);\n }\n}","expected_response":"{\"errors\": [{\"message\": \"cannot take square root of negative number\", \"locations\": [{\"line\": 1, \"column\": 12}], \"path\": [\"squareRoot\"]}], \"data\": null}","schema_definition":"type Mutation { squareRoot(n: Float!): Float! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02bdg4p2fnwf6fu9","title":"Submission WF6FU9","payload":{"sample_query":"{ greetRole }","resolver_code":"Query: { greetRole: (_, { role }) => `Welcome, ${role}!` }","expected_response":"{\"data\": {\"greetRole\": \"Welcome, guest!\"}}","schema_definition":"type Query { greetRole(role: String = \"guest\"): String! }"}} {"submissionId":"cmsvor0hk02beg4p2i80pa2l9","title":"Submission 0PA2L9","payload":{"sample_query":"{ circle(radius: 5) { area circumference } }","resolver_code":"Query: { circle: (_, { radius }) => ({ radius }) },\nCircle: {\n area: (c) => Math.round(Math.PI * c.radius * c.radius * 100) / 100,\n circumference: (c) => Math.round(2 * Math.PI * c.radius * 100) / 100\n}","expected_response":"{\"data\": {\"circle\": {\"area\": 78.54, \"circumference\": 31.42}}}","schema_definition":"type Circle { radius: Float!, area: Float!, circumference: Float! }\ntype Query { circle(radius: Float!): Circle! }"}} {"submissionId":"cmsvor0hk02bfg4p26n4ybsgi","title":"Submission 4YBSGI","payload":{"sample_query":"{ post { title commentCount } }","resolver_code":"Query: {\n post: () => ({\n title: \"Hello\",\n comments: [{ text: \"Nice!\" }, { text: \"Thanks\" }, { text: \"+1\" }]\n })\n},\nPost: { commentCount: (p) => p.comments.length }","expected_response":"{\"data\": {\"post\": {\"title\": \"Hello\", \"commentCount\": 3}}}","schema_definition":"type Comment { text: String! }\ntype Post { title: String!, comments: [Comment!]!, commentCount: Int! }\ntype Query { post: Post! }"}} {"submissionId":"cmsvor0hk02bgg4p2ayvkywxt","title":"Submission VKYWXT","payload":{"sample_query":"{ sortDesc(nums: [4, 1, 9, 3, 7]) }","resolver_code":"Query: { sortDesc: (_, { nums }) => [...nums].sort((a, b) => b - a) }","expected_response":"{\"data\": {\"sortDesc\": [9, 7, 4, 3, 1]}}","schema_definition":"type Query { sortDesc(nums: [Int!]!): [Int!]! }"}} {"submissionId":"cmsvor0hk02bhg4p2wzz5ac03","title":"Submission Z5AC03","payload":{"sample_query":"{ sameWord(a: \"Hello\", b: \"HELLO\") }","resolver_code":"Query: { sameWord: (_, { a, b }) => a.toLowerCase() === b.toLowerCase() }","expected_response":"{\"data\": {\"sameWord\": true}}","schema_definition":"type Query { sameWord(a: String!, b: String!): Boolean! }"}} {"submissionId":"cmsvor0hk02big4p2fvpv2dtq","title":"Submission PV2DTQ","payload":{"sample_query":"{ order { total } }","resolver_code":"Query: {\n order: () => ({\n items: [\n { price: 9.99, qty: 3 },\n { price: 4.5, qty: 2 },\n { price: 20.0, qty: 1 }\n ]\n })\n},\nOrder: { total: (o) => Math.round(o.items.reduce((sum, i) => sum + i.price * i.qty, 0) * 100) / 100 }","expected_response":"{\"data\": {\"order\": {\"total\": 58.97}}}","schema_definition":"type LineItem { price: Float!, qty: Int! }\ntype Order { items: [LineItem!]!, total: Float! }\ntype Query { order: Order! }"}} {"submissionId":"cmsvor0hk02bjg4p2y2166z57","title":"Submission 166Z57","payload":{"sample_query":"mutation { addTag(existing: [\"red\", \"blue\"], tag: \"green\") }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: { addTag: (_, { existing, tag }) => [...existing, tag].length }","expected_response":"{\"data\": {\"addTag\": 3}}","schema_definition":"type Mutation { addTag(existing: [String!]!, tag: String!): Int! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02bkg4p2aooh213n","title":"Submission OH213N","payload":{"sample_query":"{ profile(username: \"newuser\") { username bio } }","resolver_code":"Query: { profile: (_, { username }) => ({ username, bio: null }) }","expected_response":"{\"data\": {\"profile\": {\"username\": \"newuser\", \"bio\": null}}}","schema_definition":"type Profile { username: String!, bio: String }\ntype Query { profile(username: String!): Profile! }"}} {"submissionId":"cmsvor0hk02blg4p23h6gbj5m","title":"Submission 6GBJ5M","payload":{"sample_query":"{ task(status: \"completed\") { status isDone } }","resolver_code":"Query: { task: (_, { status }) => ({ status }) },\nTask: { isDone: (t) => t.status === \"completed\" || t.status === \"closed\" }","expected_response":"{\"data\": {\"task\": {\"status\": \"completed\", \"isDone\": true}}}","schema_definition":"type Task { status: String!, isDone: Boolean! }\ntype Query { task(status: String!): Task! }"}} {"submissionId":"cmsvor0hk02bmg4p2i5wr6e3a","title":"Submission WR6E3A","payload":{"sample_query":"{ greetAll(names: [\"Ann\", \"Ben\"]) }","resolver_code":"Query: { greetAll: (_, { names }) => names.map(n => `Hi, ${n}!`) }","expected_response":"{\"data\": {\"greetAll\": [\"Hi, Ann!\", \"Hi, Ben!\"]}}","schema_definition":"type Query { greetAll(names: [String!]!): [String!]! }"}} {"submissionId":"cmsvor0hk02bng4p2ly9pzp6u","title":"Submission 9PZP6U","payload":{"sample_query":"{ fib(n: 10) }","resolver_code":"Query: {\n fib: (_, { n }) => {\n function fibonacci(x) { return x <= 1 ? x : fibonacci(x - 1) + fibonacci(x - 2); }\n return fibonacci(n);\n }\n}","expected_response":"{\"data\": {\"fib\": 55}}","schema_definition":"type Query { fib(n: Int!): Int! }"}} {"submissionId":"cmsvor0hk02bog4p2dj693nkr","title":"Submission 693NKR","payload":{"sample_query":"mutation { makeRectangle(width: 6, height: 3) { area } }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: { makeRectangle: (_, { width, height }) => ({ width, height }) },\nRectangle: { area: (r) => r.width * r.height }","expected_response":"{\"data\": {\"makeRectangle\": {\"area\": 18}}}","schema_definition":"type Rectangle { width: Float!, height: Float!, area: Float! }\ntype Mutation { makeRectangle(width: Float!, height: Float!): Rectangle! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02bpg4p22l93yoj2","title":"Submission 93YOJ2","payload":{"sample_query":"{ distinctCount(items: [\"a\", \"b\", \"a\", \"c\", \"b\", \"a\"]) }","resolver_code":"Query: { distinctCount: (_, { items }) => new Set(items).size }","expected_response":"{\"data\": {\"distinctCount\": 3}}","schema_definition":"type Query { distinctCount(items: [String!]!): Int! }"}} {"submissionId":"cmsvor0hk02bqg4p2xj339nzf","title":"Submission 339NZF","payload":{"sample_query":"mutation { double(n: 21) negate(n: 7) }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n double: (_, { n }) => n * 2,\n negate: (_, { n }) => -n\n}","expected_response":"{\"data\": {\"double\": 42, \"negate\": -7}}","schema_definition":"type Mutation { double(n: Int!): Int!, negate(n: Int!): Int! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02brg4p2burn3p7w","title":"Submission RN3P7W","payload":{"sample_query":"{ person { bmiCategory } }","resolver_code":"Query: { person: () => ({ weightKg: 70, heightM: 1.75 }) },\nPerson: {\n bmiCategory: (p) => {\n const bmi = p.weightKg / (p.heightM * p.heightM);\n if (bmi < 18.5) return \"underweight\";\n if (bmi < 25) return \"normal\";\n if (bmi < 30) return \"overweight\";\n return \"obese\";\n }\n}","expected_response":"{\"data\": {\"person\": {\"bmiCategory\": \"normal\"}}}","schema_definition":"type Person { weightKg: Float!, heightM: Float!, bmiCategory: String! }\ntype Query { person: Person! }"}} {"submissionId":"cmsvor0hk02bsg4p2tg82lsw1","title":"Submission 82LSW1","payload":{"sample_query":"mutation { firstOf(items: []) }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n firstOf: (_, { items }) => {\n if (items.length === 0) throw new Error(\"items list cannot be empty\");\n return items[0];\n }\n}","expected_response":"{\"errors\": [{\"message\": \"items list cannot be empty\", \"locations\": [{\"line\": 1, \"column\": 12}], \"path\": [\"firstOf\"]}], \"data\": null}","schema_definition":"type Mutation { firstOf(items: [String!]!): String! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02btg4p2d8wzng1g","title":"Submission WZNG1G","payload":{"sample_query":"{ company { highEarnerCount } }","resolver_code":"Query: {\n company: () => ({\n employees: [\n { name: \"A\", salary: 50000 },\n { name: \"B\", salary: 120000 },\n { name: \"C\", salary: 95000 },\n { name: \"D\", salary: 150000 }\n ]\n })\n},\nCompany: { highEarnerCount: (c) => c.employees.filter(e => e.salary >= 100000).length }","expected_response":"{\"data\": {\"company\": {\"highEarnerCount\": 2}}}","schema_definition":"type Employee { name: String!, salary: Int! }\ntype Company { employees: [Employee!]!, highEarnerCount: Int! }\ntype Query { company: Company! }"}} {"submissionId":"cmsvor0hk02bug4p2x57gxdq6","title":"Submission 7GXDQ6","payload":{"sample_query":"{ priceWithTax(price: 100) }","resolver_code":"Query: { priceWithTax: (_, { price, taxRate }) => Math.round(price * (1 + taxRate) * 100) / 100 }","expected_response":"{\"data\": {\"priceWithTax\": 108}}","schema_definition":"type Query { priceWithTax(price: Float!, taxRate: Float = 0.08): Float! }"}} {"submissionId":"cmsvor0hk02bvg4p2s5hruxxe","title":"Submission HRUXXE","payload":{"sample_query":"{ stats(nums: [7, 2, 9, 4, 1]) { min max } }","resolver_code":"Query: { stats: (_, { nums }) => ({ min: Math.min(...nums), max: Math.max(...nums) }) }","expected_response":"{\"data\": {\"stats\": {\"min\": 1, \"max\": 9}}}","schema_definition":"type Stats { min: Int!, max: Int! }\ntype Query { stats(nums: [Int!]!): Stats! }"}} {"submissionId":"cmsvor0hk02bwg4p2gijof2v8","title":"Submission JOF2V8","payload":{"sample_query":"{ splitWords(sentence: \"the quick brown fox\") }","resolver_code":"Query: { splitWords: (_, { sentence }) => sentence.split(\" \") }","expected_response":"{\"data\": {\"splitWords\": [\"the\", \"quick\", \"brown\", \"fox\"]}}","schema_definition":"type Query { splitWords(sentence: String!): [String!]! }"}} {"submissionId":"cmsvor0hk02bxg4p2gww1loec","title":"Submission W1LOEC","payload":{"sample_query":"{ square { area } triangle { area } }","resolver_code":"Query: {\n square: () => ({ side: 4 }),\n triangle: () => ({ base: 6, height: 3 })\n},\nSquare: { area: (s) => s.side * s.side },\nTriangle: { area: (t) => 0.5 * t.base * t.height }","expected_response":"{\"data\": {\"square\": {\"area\": 16}, \"triangle\": {\"area\": 9}}}","schema_definition":"type Square { side: Float!, area: Float! }\ntype Triangle { base: Float!, height: Float!, area: Float! }\ntype Query { square: Square!, triangle: Triangle! }"}} {"submissionId":"cmsvor0hk02byg4p29ze7q8ao","title":"Submission E7Q8AO","payload":{"sample_query":"mutation { createUsername(name: \"Al\") }","resolver_code":"Query: { ping: () => \"pong\" },\nMutation: {\n createUsername: (_, { name }) => {\n if (name.length < 3) throw new Error(\"username must be at least 3 characters\");\n return name.toLowerCase();\n }\n}","expected_response":"{\"errors\": [{\"message\": \"username must be at least 3 characters\", \"locations\": [{\"line\": 1, \"column\": 12}], \"path\": [\"createUsername\"]}], \"data\": null}","schema_definition":"type Mutation { createUsername(name: String!): String! }\ntype Query { ping: String }"}} {"submissionId":"cmsvor0hk02bzg4p2kzn1aaih","title":"Submission N1AAIH","payload":{"sample_query":"{ report { weightedAverage } }","resolver_code":"Query: {\n report: () => ({\n grades: [\n { score: 90, weight: 0.5 },\n { score: 80, weight: 0.3 },\n { score: 70, weight: 0.2 }\n ]\n })\n},\nReport: {\n weightedAverage: (r) => Math.round(r.grades.reduce((sum, g) => sum + g.score * g.weight, 0) * 100) / 100\n}","expected_response":"{\"data\": {\"report\": {\"weightedAverage\": 83}}}","schema_definition":"type Grade { score: Int!, weight: Float! }\ntype Report { grades: [Grade!]!, weightedAverage: Float! }\ntype Query { report: Report! }"}} {"submissionId":"cmsvor0hk02c0g4p2o9ewnlsh","title":"Submission EWNLSH","payload":{"sample_query":"{ page(offset: 2, limit: 3) }","resolver_code":"Query: {\n page: (_, { offset, limit }) => {\n const all = [10, 20, 30, 40, 50, 60, 70, 80];\n return all.slice(offset, offset + limit);\n }\n}","expected_response":"{\"data\": {\"page\": [30, 40, 50]}}","schema_definition":"type Query { page(offset: Int!, limit: Int!): [Int!]! }"}} {"submissionId":"cmsvor0hk02c1g4p226x0a1rm","title":"Submission X0A1RM","payload":{"sample_query":"{ cart(subtotal: 50) { label } }","resolver_code":"Query: { cart: (_, { subtotal, couponPercent }) => ({ subtotal, couponPercent: couponPercent ?? null }) },\nCart: {\n label: (c) => c.couponPercent ? `${c.couponPercent}% off applied` : \"no discount\"\n}","expected_response":"{\"data\": {\"cart\": {\"label\": \"no discount\"}}}","schema_definition":"type Cart { subtotal: Float!, couponPercent: Float, label: String! }\ntype Query { cart(subtotal: Float!, couponPercent: Float): Cart! }"}} {"submissionId":"cmsvqtnc502sgg4p2v1hantza","title":"Submission HANTZA","payload":{"sample_query":"{ itemsByWarehouse(warehouse: \"west\") { name quantity } }","resolver_code":"Query: { itemsByWarehouse: (_, { warehouse }) => [\n { id: \"1\", name: \"Wrench\", quantity: 42, warehouse: \"west\" },\n { id: \"2\", name: \"Hammer\", quantity: 7, warehouse: \"east\" }\n].filter(i => i.warehouse === warehouse) }","expected_response":"{\"data\": {\"itemsByWarehouse\": [{\"name\": \"Wrench\", \"quantity\": 42}]}}","schema_definition":"type Item { id: ID!, name: String!, quantity: Int!, warehouse: String! }\ntype Query { itemsByWarehouse(warehouse: String!): [Item!]! }"}} {"submissionId":"cmsvrifbx02smg4p2ynr2no6a","title":"Submission R2NO6A","payload":{"sample_query":"{ sensor { id celsius } }","resolver_code":"Query: { sensor: () => ({id: 's1'}) }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Sensor.celsius.\"}],\"data\":null}","schema_definition":"type Sensor { id: ID!, celsius: Float! }\ntype Query { sensor: Sensor! }"}} {"submissionId":"cmsvrifby02sng4p2elzjihxd","title":"Submission ZJIHXD","payload":{"sample_query":"{ crates { code mass } }","resolver_code":"Query: { crates: () => [{code: 'A', mass: 3}, {code: 'B'}] }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Crate.mass.\"}],\"data\":null}","schema_definition":"type Crate { code: String!, mass: Int! }\ntype Query { crates: [Crate!]! }"}} {"submissionId":"cmsvrifby02sog4p228jyvk0b","title":"Submission JYVK0B","payload":{"sample_query":"{ route { id legs { from to } } }","resolver_code":"Query: { route: () => ({id: 'r1', legs: [{from: 'X', to: 'Y'}, {from: 'Y'}]}) }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Leg.to.\"}],\"data\":{\"route\":null}}","schema_definition":"type Leg { from: String!, to: String! }\ntype Route { id: ID!, legs: [Leg!]! }\ntype Query { route: Route }"}} {"submissionId":"cmsvrifby02spg4p20lyaowhf","title":"Submission YAOWHF","payload":{"sample_query":"{ slots { hour taken } }","resolver_code":"Query: { slots: () => [{hour: 9, taken: false}, null, {hour: 11, taken: true}] }","expected_response":"{\"data\":{\"slots\":[{\"hour\":9,\"taken\":false},null,{\"hour\":11,\"taken\":true}]}}","schema_definition":"type Slot { hour: Int!, taken: Boolean! }\ntype Query { slots: [Slot] }"}} {"submissionId":"cmsvrifby02sqg4p2qmdhgonu","title":"Submission DHGONU","payload":{"sample_query":"{ withdraw(amount: 500, balance: 120) }","resolver_code":"Query: { withdraw: (_, {amount, balance}) => { if (amount > balance) throw new Error('insufficient funds'); return balance - amount; } }","expected_response":"{\"errors\":[{\"message\":\"insufficient funds\"}],\"data\":null}","schema_definition":"type Query { withdraw(amount: Int!, balance: Int!): Int! }"}} {"submissionId":"cmsvrifby02srg4p2rvqg5doh","title":"Submission QG5DOH","payload":{"sample_query":"{ ok: parseAge(raw: \"42\") bad: parseAge(raw: \"4.5\") }","resolver_code":"Query: { parseAge: (_, {raw}) => { const n = Number(raw); if (!Number.isInteger(n)) throw new Error('not an integer: ' + raw); return n; } }","expected_response":"{\"errors\":[{\"message\":\"not an integer: 4.5\"}],\"data\":null}","schema_definition":"type Query { parseAge(raw: String!): Int! }"}} {"submissionId":"cmsvrifby02ssg4p2gw5asnbt","title":"Submission 5ASNBT","payload":{"sample_query":"{ doc(id: \"9\") { id body } }","resolver_code":"Query: { doc: (_, {id}) => { if (id !== '1') throw new Error('document ' + id + ' not found'); return {id, body: 'hello'}; } }","expected_response":"{\"errors\":[{\"message\":\"document 9 not found\"}],\"data\":null}","schema_definition":"type Doc { id: ID!, body: String! }\ntype Query { doc(id: ID!): Doc! }"}} {"submissionId":"cmsvrifby02stg4p2px67wlci","title":"Submission 67WLCI","payload":{"sample_query":"{ mean(total: 7, count: 2) }","resolver_code":"Query: { mean: (_, {total, count}) => total / count }","expected_response":"{\"errors\":[{\"message\":\"Int cannot represent non-integer value: 3.5\"}],\"data\":null}","schema_definition":"type Query { mean(total: Int!, count: Int!): Int! }"}} {"submissionId":"cmsvrifby02sug4p2elufbjl5","title":"Submission UFBJL5","payload":{"sample_query":"{ whole: ratio(a: 6, b: 3) fractional: ratio(a: 7, b: 2) }","resolver_code":"Query: { ratio: (_, {a, b}) => a / b }","expected_response":"{\"data\":{\"whole\":2,\"fractional\":3.5}}","schema_definition":"type Query { ratio(a: Int!, b: Int!): Float! }"}} {"submissionId":"cmsvrifby02svg4p2h4hn0w2f","title":"Submission HN0W2F","payload":{"sample_query":"{ fromInt: label(id: 7) fromString: label(id: \"7\") }","resolver_code":"Query: { label: (_, {id}) => typeof id + ':' + id }","expected_response":"{\"data\":{\"fromInt\":\"string:7\",\"fromString\":\"string:7\"}}","schema_definition":"type Query { label(id: ID!): String! }"}} {"submissionId":"cmsvrifby02swg4p25nzaxn6i","title":"Submission ZAXN6I","payload":{"sample_query":"{ flag(on: true) }","resolver_code":"Query: { flag: (_, {on}) => typeof on + ':' + on }","expected_response":"{\"data\":{\"flag\":\"boolean:true\"}}","schema_definition":"type Query { flag(on: Boolean!): String! }"}} {"submissionId":"cmsvrifby02sxg4p2jyui0a3g","title":"Submission UI0A3G","payload":{"sample_query":"{ big(n: 1.5) }","resolver_code":"Query: { big: (_, {n}) => n * 2 }","expected_response":"{\"data\":{\"big\":3}}","schema_definition":"type Query { big(n: Float!): Float! }"}} {"submissionId":"cmsvrifby02syg4p2y6undh2b","title":"Submission UNDH2B","payload":{"sample_query":"{ level(n: 2) }","resolver_code":"Query: { level: (_, {n}) => ['LOW', 'HIGH', 'CRITICAL'][n] }","expected_response":"{\"errors\":[{\"message\":\"Enum \\\"Level\\\" cannot represent value: \\\"CRITICAL\\\"\"}],\"data\":null}","schema_definition":"enum Level { LOW HIGH }\ntype Query { level(n: Int!): Level! }"}} {"submissionId":"cmsvrifby02szg4p246qqr3vo","title":"Submission QQR3VO","payload":{"sample_query":"{ ok: pick(s: HEARTS) bad: pick(s: CLUBS) }","resolver_code":"Query: { pick: (_, {s}) => 'got ' + s }","expected_response":"{\"errors\":[{\"message\":\"Value \\\"CLUBS\\\" does not exist in \\\"Suit\\\" enum.\"}]}","schema_definition":"enum Suit { HEARTS SPADES }\ntype Query { pick(s: Suit!): String! }"}} {"submissionId":"cmsvrifby02t0g4p2m931e1si","title":"Submission 31E1SI","payload":{"sample_query":"{ modes __type(name: \"Mode\") { enumValues { name } } }","resolver_code":"Query: { modes: () => ['READ', 'WRITE'] }","expected_response":"{\"data\":{\"modes\":[\"READ\",\"WRITE\"],\"__type\":{\"enumValues\":[{\"name\":\"READ\"},{\"name\":\"WRITE\"}]}}}","schema_definition":"enum Mode { READ WRITE }\ntype Query { modes: [Mode!]! }"}} {"submissionId":"cmsvrifby02t1g4p2onla8tqq","title":"Submission LA8TQQ","payload":{"sample_query":"{ dflt: page(items: [\"a\",\"b\",\"c\",\"d\",\"e\"]) explicit: page(items: [\"a\",\"b\",\"c\",\"d\",\"e\"], size: 1) }","resolver_code":"Query: { page: (_, {items, size}) => items.slice(0, size) }","expected_response":"{\"data\":{\"dflt\":[\"a\",\"b\",\"c\"],\"explicit\":[\"a\"]}}","schema_definition":"type Query { page(items: [String!]!, size: Int = 3): [String!]! }"}} {"submissionId":"cmsvrifby02t2g4p26ziql8km","title":"Submission IQL8KM","payload":{"sample_query":"{ span(r: {lo: 10, hi: 4}) }","resolver_code":"Query: { span: (_, {r}) => { if (r.hi < r.lo) throw new Error('hi must not be below lo'); return r.hi - r.lo; } }","expected_response":"{\"errors\":[{\"message\":\"hi must not be below lo\"}],\"data\":null}","schema_definition":"input Range { lo: Int!, hi: Int! }\ntype Query { span(r: Range!): Int! }"}} {"submissionId":"cmsvrifby02t3g4p2xcuutkyb","title":"Submission UUTKYB","payload":{"sample_query":"{ rank(tags: [{key: \"a\", weight: 1}, {key: \"b\", weight: 5}]) { key score } }","resolver_code":"Query: { rank: (_, {tags}) => tags.map(t => ({key: t.key, score: t.weight * 2})).sort((a, b) => b.score - a.score) }","expected_response":"{\"data\":{\"rank\":[{\"key\":\"b\",\"score\":10},{\"key\":\"a\",\"score\":2}]}}","schema_definition":"input Tag { key: String!, weight: Int! }\ntype Hit { key: String!, score: Int! }\ntype Query { rank(tags: [Tag!]!): [Hit!]! }"}} {"submissionId":"cmsvrifby02t4g4p251jzkt3r","title":"Submission JZKT3R","payload":{"sample_query":"{ count(f: [{field: \"a\", min: 1}, {field: \"b\", min: \"oops\"}]) }","resolver_code":"Query: { count: (_, {f}) => f.length }","expected_response":"{\"errors\":[{\"message\":\"Int cannot represent non-integer value: \\\"oops\\\"\"}]}","schema_definition":"input Filter { field: String!, min: Int! }\ntype Query { count(f: [Filter!]!): Int! }"}} {"submissionId":"cmsvrifby02t6g4p2vvdz0f0o","title":"Submission DZ0F0O","payload":{"sample_query":"query { bill { a: net { ...M } b: vat { ...M } c: total { ...M } } } fragment M on Money { cents currency }","resolver_code":"Query: { bill: () => ({net: {cents: 1000, currency: 'GBP'}, vat: {cents: 200, currency: 'GBP'}, total: {cents: 1200, currency: 'GBP'}}) }","expected_response":"{\"data\":{\"bill\":{\"a\":{\"cents\":1000,\"currency\":\"GBP\"},\"b\":{\"cents\":200,\"currency\":\"GBP\"},\"c\":{\"cents\":1200,\"currency\":\"GBP\"}}}}","schema_definition":"type Money { cents: Int!, currency: String! }\ntype Bill { net: Money!, vat: Money!, total: Money! }\ntype Query { bill: Bill! }"}} {"submissionId":"cmsvrifby02t7g4p2npi9p4hl","title":"Submission I9P4HL","payload":{"sample_query":"query { head { ...N next { ...N next { ...N next { ...N } } } } } fragment N on Node3 { name }","resolver_code":"Query: { head: () => ({name: 'a', next: {name: 'b', next: {name: 'c', next: null}}}) }","expected_response":"{\"data\":{\"head\":{\"name\":\"a\",\"next\":{\"name\":\"b\",\"next\":{\"name\":\"c\",\"next\":null}}}}}","schema_definition":"type Node3 { name: String!, next: Node3 }\ntype Query { head: Node3! }"}} {"submissionId":"cmsvrifby02t8g4p26uhpw6cc","title":"Submission HPW6CC","payload":{"sample_query":"{ panel { id brief @include(if: true) verbose @include(if: false) } }","resolver_code":"Query: { panel: () => ({id: 'p', brief: 'short', verbose: 'long'}) }","expected_response":"{\"data\":{\"panel\":{\"id\":\"p\",\"brief\":\"short\"}}}","schema_definition":"type Panel { id: ID!, brief: String!, verbose: String! }\ntype Query { panel: Panel! }"}} {"submissionId":"cmsvrifby02t9g4p2vwiazm9a","title":"Submission IAZM9A","payload":{"sample_query":"{ row { a b @skip(if: true) c @skip(if: false) } }","resolver_code":"Query: { row: () => ({a: 1, b: 2, c: 3}) }","expected_response":"{\"data\":{\"row\":{\"a\":1,\"c\":3}}}","schema_definition":"type Row { a: Int!, b: Int!, c: Int! }\ntype Query { row: Row! }"}} {"submissionId":"cmsvrifby02tag4p2q80nsfuf","title":"Submission 0NSFUF","payload":{"sample_query":"{ cart { grand lines { qty total } } }","resolver_code":"Query: { cart: () => ({lines: [{qty: 2, unit: 50}, {qty: 3, unit: 10}]}) },\nLine: { total: (l) => l.qty * l.unit },\nCart: { grand: (c) => c.lines.reduce((s, l) => s + l.qty * l.unit, 0) }","expected_response":"{\"data\":{\"cart\":{\"grand\":130,\"lines\":[{\"qty\":2,\"total\":100},{\"qty\":3,\"total\":30}]}}}","schema_definition":"type Line { qty: Int!, unit: Int!, total: Int! }\ntype Cart { lines: [Line!]!, grand: Int! }\ntype Query { cart: Cart! }"}} {"submissionId":"cmsvrifby02tbg4p2fwlnihps","title":"Submission LNIHPS","payload":{"sample_query":"{ words { text length upper } }","resolver_code":"Query: { words: () => [{text: 'alpha'}, {text: 'be'}] },\nWord: { length: (w) => w.text.length, upper: (w) => w.text.toUpperCase() }","expected_response":"{\"data\":{\"words\":[{\"text\":\"alpha\",\"length\":5,\"upper\":\"ALPHA\"},{\"text\":\"be\",\"length\":2,\"upper\":\"BE\"}]}}","schema_definition":"type Word { text: String!, length: Int!, upper: String! }\ntype Query { words: [Word!]! }"}} {"submissionId":"cmsvrifby02tcg4p298mejk9u","title":"Submission MEJK9U","payload":{"sample_query":"{ stat { values sum max } }","resolver_code":"Query: { stat: () => ({values: [4, 9, 2]}) },\nStat: { sum: (s) => s.values.reduce((a, b) => a + b, 0), max: (s) => Math.max(...s.values) }","expected_response":"{\"data\":{\"stat\":{\"values\":[4,9,2],\"sum\":15,\"max\":9}}}","schema_definition":"type Stat { values: [Int!]!, sum: Int!, max: Int! }\ntype Query { stat: Stat! }"}} {"submissionId":"cmsvrifby02tdg4p2pbk924gx","title":"Submission K924GX","payload":{"sample_query":"{ bag { all: count withA: count(prefix: \"a\") } }","resolver_code":"Query: { bag: () => ({items: ['ant', 'ape', 'bee']}) },\nBag: { count: (b, {prefix}) => prefix ? b.items.filter(i => i.startsWith(prefix)).length : b.items.length }","expected_response":"{\"data\":{\"bag\":{\"all\":3,\"withA\":2}}}","schema_definition":"type Bag { items: [String!]!, count(prefix: String): Int! }\ntype Query { bag: Bag! }"}} {"submissionId":"cmsvrifby02teg4p2xysc0kdg","title":"Submission SC0KDG","payload":{"sample_query":"{ total(values: [1,2,3]) }","resolver_code":"Query: { total: async (_, {values}) => (await Promise.all(values.map(async v => v + 1))).reduce((a, b) => a + b, 0) }","expected_response":"{\"data\":{\"total\":9}}","schema_definition":"type Query { total(values: [Int!]!): Int! }"}} {"submissionId":"cmsvrifby02tfg4p28hish9ui","title":"Submission ISH9UI","payload":{"sample_query":"{ jobs { id status } }","resolver_code":"Query: { jobs: async () => [{id: 'j1', status: 'done'}, {id: 'j2', status: 'queued'}] }","expected_response":"{\"data\":{\"jobs\":[{\"id\":\"j1\",\"status\":\"done\"},{\"id\":\"j2\",\"status\":\"queued\"}]}}","schema_definition":"type Job { id: ID!, status: String! }\ntype Query { jobs: [Job!]! }"}} {"submissionId":"cmsvrifby02tgg4p2g46nuob1","title":"Submission 6NUOB1","payload":{"sample_query":"{ slow }","resolver_code":"Query: { slow: () => Promise.resolve('resolved') }","expected_response":"{\"data\":{\"slow\":\"resolved\"}}","schema_definition":"type Query { slow: String! }"}} {"submissionId":"cmsvrifby02thg4p2z09coltr","title":"Submission 9COLTR","payload":{"sample_query":"{ failing }","resolver_code":"Query: { failing: async () => { throw new Error('upstream unavailable'); } }","expected_response":"{\"errors\":[{\"message\":\"upstream unavailable\"}],\"data\":null}","schema_definition":"type Query { failing: String! }"}} {"submissionId":"cmsvrifby02tig4p2idi7f8m4","title":"Submission I7F8M4","payload":{"sample_query":"mutation { addTask(input: {title: \"write\", priority: 0}) { title priority } }","resolver_code":"Query: { _: () => null },\nMutation: { addTask: (_, {input}) => { if (input.priority < 1) throw new Error('priority must be at least 1'); return input; } }","expected_response":"{\"errors\":[{\"message\":\"priority must be at least 1\"}],\"data\":null}","schema_definition":"input NewTask { title: String!, priority: Int! }\ntype Task { title: String!, priority: Int! }\ntype Mutation { addTask(input: NewTask!): Task! }\ntype Query { _: String }"}} {"submissionId":"cmsvrifby02tjg4p2zfpjcipf","title":"Submission PJCIPF","payload":{"sample_query":"mutation { rename(input: {id: \"7\", name: \" spaced \"}) { id name } }","resolver_code":"Query: { _: () => null },\nMutation: { rename: (_, {input}) => ({id: input.id, name: input.name.trim()}) }","expected_response":"{\"data\":{\"rename\":{\"id\":\"7\",\"name\":\"spaced\"}}}","schema_definition":"input Rename { id: ID!, name: String! }\ntype Item { id: ID!, name: String! }\ntype Mutation { rename(input: Rename!): Item! }\ntype Query { _: String }"}} {"submissionId":"cmsvrifby02tkg4p2cojxk4td","title":"Submission JXK4TD","payload":{"sample_query":"mutation { first: ping { ok message } second: ping { message } }","resolver_code":"Query: { _: () => null },\nMutation: { ping: () => ({ok: true, message: 'pong'}) }","expected_response":"{\"data\":{\"first\":{\"ok\":true,\"message\":\"pong\"},\"second\":{\"message\":\"pong\"}}}","schema_definition":"type Result2 { ok: Boolean!, message: String! }\ntype Mutation { ping: Result2! }\ntype Query { _: String }"}} {"submissionId":"cmsvrifby02tlg4p2v3b47m5f","title":"Submission B47M5F","payload":{"sample_query":"{ profile { handle missingField } }","resolver_code":"Query: { profile: () => ({handle: 'x'}) }","expected_response":"{\"errors\":[{\"message\":\"Cannot query field \\\"missingField\\\" on type \\\"Profile2\\\".\"}]}","schema_definition":"type Profile2 { handle: String! }\ntype Query { profile: Profile2! }"}} {"submissionId":"cmsvrifby02tmg4p2jd14zgu7","title":"Submission 14ZGU7","payload":{"sample_query":"{ name notARootField }","resolver_code":"Query: { name: () => 'x' }","expected_response":"{\"errors\":[{\"message\":\"Cannot query field \\\"notARootField\\\" on type \\\"Query\\\".\"}]}","schema_definition":"type Query { name: String! }"}} {"submissionId":"cmsvrifby02tng4p2dmsi48ha","title":"Submission SI48HA","payload":{"sample_query":"{ thing }","resolver_code":"Query: { thing: () => ({id: '1'}) }","expected_response":"{\"errors\":[{\"message\":\"Field \\\"thing\\\" of type \\\"Thing!\\\" must have a selection of subfields. Did you mean \\\"thing { ... }\\\"?\"}]}","schema_definition":"type Thing { id: ID! }\ntype Query { thing: Thing! }"}} {"submissionId":"cmsvrifby02tog4p27bql7q0s","title":"Submission QL7Q0S","payload":{"sample_query":"{ value { nested } }","resolver_code":"Query: { value: () => 1 }","expected_response":"{\"errors\":[{\"message\":\"Field \\\"value\\\" must not have a selection since type \\\"Int!\\\" has no subfields.\"}]}","schema_definition":"type Query { value: Int! }"}} {"submissionId":"cmsvrifby02tpg4p27lmq0ek0","title":"Submission MQ0EK0","payload":{"sample_query":"{ widget { id label __typename } }","resolver_code":"Query: { widget: () => ({id: 'w', label: null}) }","expected_response":"{\"data\":{\"widget\":{\"id\":\"w\",\"label\":null,\"__typename\":\"Widget\"}}}","schema_definition":"type Widget { id: ID!, label: String }\ntype Query { widget: Widget! }"}} {"submissionId":"cmsvrifby02tqg4p2tvba0xsc","title":"Submission BA0XSC","payload":{"sample_query":"{ __type(name: \"Alpha\") { name kind fields { name } } }","resolver_code":"Query: { alpha: () => ({a: 1}) }","expected_response":"{\"data\":{\"__type\":{\"name\":\"Alpha\",\"kind\":\"OBJECT\",\"fields\":[{\"name\":\"a\"}]}}}","schema_definition":"type Alpha { a: Int! }\ntype Query { alpha: Alpha! }"}} {"submissionId":"cmsvrqoez02trg4p2q37p6ryv","title":"Submission 7P6RYV","payload":{"sample_query":"{ aa bb }","resolver_code":"Query: { aa: () => [1, null], bb: () => null }","expected_response":"{\"data\":{\"aa\":[1,null],\"bb\":null}}","schema_definition":"type Query { aa: [Int]!, bb: [Int!] }"}} {"submissionId":"cmsvrqoez02tsg4p213ptohju","title":"Submission PTOHJU","payload":{"sample_query":"{ grid }","resolver_code":"Query: { grid: () => [[1,2],[3,4]] }","expected_response":"{\"data\":{\"grid\":[[1,2],[3,4]]}}","schema_definition":"type Query { grid: [[Int!]!]! }"}} {"submissionId":"cmsvrqoez02ttg4p29tzq8bfk","title":"Submission ZQ8BFK","payload":{"sample_query":"{ ragged }","resolver_code":"Query: { ragged: () => [[1,null],[null]] }","expected_response":"{\"data\":{\"ragged\":[[1,null],[null]]}}","schema_definition":"type Query { ragged: [[Int]!]! }"}} {"submissionId":"cmsvrqoez02tug4p28la5kz4a","title":"Submission A5KZ4A","payload":{"sample_query":"{ empties }","resolver_code":"Query: { empties: () => [] }","expected_response":"{\"data\":{\"empties\":[]}}","schema_definition":"type Query { empties: [String!]! }"}} {"submissionId":"cmsvrqoez02tvg4p2dpquehc7","title":"Submission QUEHC7","payload":{"sample_query":"{ sq: pow(base: 3, exp: 2) cube: pow(base: 3, exp: 3) }","resolver_code":"Query: { pow: (_, {base, exp}) => Math.pow(base, exp) }","expected_response":"{\"data\":{\"sq\":9,\"cube\":27}}","schema_definition":"type Query { pow(base: Int!, exp: Int!): Int! }"}} {"submissionId":"cmsvrqoez02twg4p2hxwptnx8","title":"Submission WPTNX8","payload":{"sample_query":"{ once: repeat(text: \"ab\", times: 1) thrice: repeat(text: \"ab\", times: 3) }","resolver_code":"Query: { repeat: (_, {text, times}) => text.repeat(times) }","expected_response":"{\"data\":{\"once\":\"ab\",\"thrice\":\"ababab\"}}","schema_definition":"type Query { repeat(text: String!, times: Int!): String! }"}} {"submissionId":"cmsvrqoez02txg4p2walmb402","title":"Submission LMB402","payload":{"sample_query":"{ under: clamp(v: -5, lo: 0, hi: 10) over: clamp(v: 99, lo: 0, hi: 10) inside: clamp(v: 4, lo: 0, hi: 10) }","resolver_code":"Query: { clamp: (_, {v, lo, hi}) => Math.min(hi, Math.max(lo, v)) }","expected_response":"{\"data\":{\"under\":0,\"over\":10,\"inside\":4}}","schema_definition":"type Query { clamp(v: Int!, lo: Int!, hi: Int!): Int! }"}} {"submissionId":"cmsvrqoez02tyg4p25lme76tl","title":"Submission ME76TL","payload":{"sample_query":"{ omitted: describe explicitNull: describe(note: null) given: describe(note: \"hi\") }","resolver_code":"Query: { describe: (_, {note}) => note === undefined ? 'absent' : note === null ? 'explicit null' : 'value:' + note }","expected_response":"{\"data\":{\"omitted\":\"absent\",\"explicitNull\":\"explicit null\",\"given\":\"value:hi\"}}","schema_definition":"type Query { describe(note: String): String! }"}} {"submissionId":"cmsvrqoez02tzg4p2pu7kybde","title":"Submission 7KYBDE","payload":{"sample_query":"{ a: pick b: pick(n: null) c: pick(n: 0) }","resolver_code":"Query: { pick: (_, {n}) => String(n) }","expected_response":"{\"data\":{\"a\":\"undefined\",\"b\":\"null\",\"c\":\"0\"}}","schema_definition":"type Query { pick(n: Int): String! }"}} {"submissionId":"cmsvrqoez02u0g4p2r3redorg","title":"Submission REDORG","payload":{"sample_query":"{ names(cs: [RED, BLUE, RED]) }","resolver_code":"Query: { names: (_, {cs}) => cs.map(c => c.toLowerCase()) }","expected_response":"{\"data\":{\"names\":[\"red\",\"blue\",\"red\"]}}","schema_definition":"enum Colour { RED BLUE }\ntype Query { names(cs: [Colour!]!): [String!]! }"}} {"submissionId":"cmsvrqoez02u1g4p2mczav424","title":"Submission ZAV424","payload":{"sample_query":"{ metric: grams(w: {amount: 2, unit: KG}) imperial: grams(w: {amount: 2, unit: LB}) }","resolver_code":"Query: { grams: (_, {w}) => w.unit === 'KG' ? w.amount * 1000 : Math.round(w.amount * 453.592) }","expected_response":"{\"data\":{\"metric\":2000,\"imperial\":907}}","schema_definition":"enum Unit { KG LB }\ninput Weight { amount: Int!, unit: Unit! }\ntype Query { grams(w: Weight!): Int! }"}} {"submissionId":"cmsvrqoez02u3g4p28fncpp7w","title":"Submission NCPP7W","payload":{"sample_query":"{ area(b: {tl: {x: 0, y: 0}, br: {x: 3, y: 4}}) }","resolver_code":"Query: { area: (_, {b}) => Math.abs((b.br.x - b.tl.x) * (b.br.y - b.tl.y)) }","expected_response":"{\"data\":{\"area\":12}}","schema_definition":"input Point { x: Int!, y: Int! }\ninput Box { tl: Point!, br: Point! }\ntype Query { area(b: Box!): Int! }"}} {"submissionId":"cmsvrqoez02u5g4p2m65sgfid","title":"Submission 5SGFID","payload":{"sample_query":"{ dflt: plan(c: {label: \"a\"}) set: plan(c: {label: \"b\", retries: 7}) }","resolver_code":"Query: { plan: (_, {c}) => c.label + ' x' + c.retries }","expected_response":"{\"data\":{\"dflt\":\"a x3\",\"set\":\"b x7\"}}","schema_definition":"input Cfg { retries: Int = 3, label: String! }\ntype Query { plan(c: Cfg!): String! }"}} {"submissionId":"cmsvrqoez02u7g4p2iahit7qv","title":"Submission HIT7QV","payload":{"sample_query":"{ good bad }","resolver_code":"Query: { good: () => 1, bad: () => { throw new Error('bad failed'); } }","expected_response":"{\"errors\":[{\"message\":\"bad failed\"}],\"data\":null}","schema_definition":"type Query { good: Int!, bad: Int! }"}} {"submissionId":"cmsvrqoez02u8g4p2bo3jp3ak","title":"Submission 3JP3AK","payload":{"sample_query":"{ one two three }","resolver_code":"Query: { one: () => 'a', two: () => { throw new Error('two broke'); }, three: () => 'c' }","expected_response":"{\"errors\":[{\"message\":\"two broke\"}],\"data\":null}","schema_definition":"type Query { one: String!, two: String!, three: String! }"}} {"submissionId":"cmsvrqoez02u9g4p2qnfnhfj2","title":"Submission FNHFJ2","payload":{"sample_query":"{ left { inner } right { inner } }","resolver_code":"Query: { left: () => ({inner: 1}), right: () => ({}) }","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Wrap.inner.\"}],\"data\":null}","schema_definition":"type Wrap { inner: Int! }\ntype Query { left: Wrap!, right: Wrap! }"}} {"submissionId":"cmsvrqoez02uag4p2vpuzp97u","title":"Submission UZP97U","payload":{"sample_query":"{ rect { w h area perimeter } }","resolver_code":"Query: { rect: () => ({w: 3, h: 5}) },\nRect: { area: (r) => r.w * r.h, perimeter: (r) => 2 * (r.w + r.h) }","expected_response":"{\"data\":{\"rect\":{\"w\":3,\"h\":5,\"area\":15,\"perimeter\":16}}}","schema_definition":"type Rect { w: Int!, h: Int!, area: Int!, perimeter: Int! }\ntype Query { rect: Rect! }"}} {"submissionId":"cmsvrqoez02ubg4p2xf4yzc4z","title":"Submission 4YZC4Z","payload":{"sample_query":"{ person { full initials } }","resolver_code":"Query: { person: () => ({first: 'ada', last: 'lovelace'}) },\nPerson: { full: (p) => p.first + ' ' + p.last, initials: (p) => (p.first[0] + p.last[0]).toUpperCase() }","expected_response":"{\"data\":{\"person\":{\"full\":\"ada lovelace\",\"initials\":\"AL\"}}}","schema_definition":"type Person { first: String!, last: String!, full: String!, initials: String! }\ntype Query { person: Person! }"}} {"submissionId":"cmsvrqoez02ucg4p2pj27es37","title":"Submission 27ES37","payload":{"sample_query":"{ files { bytes human } }","resolver_code":"Query: { files: () => [{bytes: 512}, {bytes: 2048}, {bytes: 1048576}] },\nFile2: { human: (f) => f.bytes >= 1048576 ? (f.bytes / 1048576) + 'MB' : f.bytes >= 1024 ? (f.bytes / 1024) + 'KB' : f.bytes + 'B' }","expected_response":"{\"data\":{\"files\":[{\"bytes\":512,\"human\":\"512B\"},{\"bytes\":2048,\"human\":\"2KB\"},{\"bytes\":1048576,\"human\":\"1MB\"}]}}","schema_definition":"type File2 { bytes: Int!, human: String! }\ntype Query { files: [File2!]! }"}} {"submissionId":"cmsvrqoez02udg4p2591jfuqr","title":"Submission 1JFUQR","payload":{"sample_query":"{ scores { raw banded } }","resolver_code":"Query: { scores: () => [{raw: 95}, {raw: 71}, {raw: 40}] },\nScore: { banded: (s) => s.raw >= 90 ? 'A' : s.raw >= 70 ? 'B' : 'F' }","expected_response":"{\"data\":{\"scores\":[{\"raw\":95,\"banded\":\"A\"},{\"raw\":71,\"banded\":\"B\"},{\"raw\":40,\"banded\":\"F\"}]}}","schema_definition":"type Score { raw: Int!, banded: String! }\ntype Query { scores: [Score!]! }"}} {"submissionId":"cmsvrqoez02ueg4p27b56utvj","title":"Submission 56UTVJ","payload":{"sample_query":"{ root2 { name child { name child { name } } } }","resolver_code":"Query: { root2: () => ({name: 'a', child: {name: 'b', child: null}}) }","expected_response":"{\"data\":{\"root2\":{\"name\":\"a\",\"child\":{\"name\":\"b\",\"child\":null}}}}","schema_definition":"type Dir { name: String!, child: Dir }\ntype Query { root2: Dir! }"}} {"submissionId":"cmsvrqoez02ufg4p238qolt45","title":"Submission QOLT45","payload":{"sample_query":"{ tree { label subs { label subs { label } } } }","resolver_code":"Query: { tree: () => ({label: 'top', subs: [{label: 'l', subs: []}, {label: 'r', subs: [{label: 'rr', subs: []}]}]}) }","expected_response":"{\"data\":{\"tree\":{\"label\":\"top\",\"subs\":[{\"label\":\"l\",\"subs\":[]},{\"label\":\"r\",\"subs\":[{\"label\":\"rr\"}]}]}}}","schema_definition":"type Cat2 { label: String!, subs: [Cat2!]! }\ntype Query { tree: Cat2! }"}} {"submissionId":"cmsvrqoez02ugg4p2ca4diggp","title":"Submission 4DIGGP","payload":{"sample_query":"mutation { shift(m: {dx: 2, dy: -3}) { x y } }","resolver_code":"Query: { _q: () => null },\nMutation: { shift: (_, {m}) => ({x: m.dx, y: m.dy}) }","expected_response":"{\"data\":{\"shift\":{\"x\":2,\"y\":-3}}}","schema_definition":"input Move { dx: Int!, dy: Int! }\ntype Pos { x: Int!, y: Int! }\ntype Mutation { shift(m: Move!): Pos! }\ntype Query { _q: String }"}} {"submissionId":"cmsvrqoez02uhg4p2l50tv9jd","title":"Submission 0TV9JD","payload":{"sample_query":"mutation { send(payload: [\"a\",\"b\",\"c\"]) { received } }","resolver_code":"Query: { _q: () => null },\nMutation: { send: (_, {payload}) => ({received: payload.length}) }","expected_response":"{\"data\":{\"send\":{\"received\":3}}}","schema_definition":"type Ack { received: Int! }\ntype Mutation { send(payload: [String!]!): Ack! }\ntype Query { _q: String }"}} {"submissionId":"cmsvrqoez02uig4p2ln9d4k5m","title":"Submission 9D4K5M","payload":{"sample_query":"mutation { login(c: {user: \"ada\", pass: \"short\"}) { token } }","resolver_code":"Query: { _q: () => null },\nMutation: { login: (_, {c}) => { if (c.pass.length < 8) throw new Error('password too short'); return {token: 't-' + c.user}; } }","expected_response":"{\"errors\":[{\"message\":\"password too short\"}],\"data\":null}","schema_definition":"input Cred { user: String!, pass: String! }\ntype Session { token: String! }\ntype Mutation { login(c: Cred!): Session! }\ntype Query { _q: String }"}} {"submissionId":"cmsvrqoez02ujg4p29vsrfh8m","title":"Submission SRFH8M","payload":{"sample_query":"mutation { a: bump { value } b: bump(by: 10) { value } }","resolver_code":"Query: { _q: () => null },\nMutation: { bump: (_, {by}) => ({value: by}) }","expected_response":"{\"data\":{\"a\":{\"value\":1},\"b\":{\"value\":10}}}","schema_definition":"type Counter2 { value: Int! }\ntype Mutation { bump(by: Int = 1): Counter2! }\ntype Query { _q: String }"}} {"submissionId":"cmsvrqoez02ukg4p24156l7tx","title":"Submission 56L7TX","payload":{"sample_query":"{ n(unexpectedArg: 1) }","resolver_code":"Query: { n: () => 1 }","expected_response":"{\"errors\":[{\"message\":\"Unknown argument \\\"unexpectedArg\\\" on field \\\"Query.n\\\".\"}]}","schema_definition":"type Query { n: Int! }"}} {"submissionId":"cmsvrqoez02ulg4p293kyxs83","title":"Submission KYXS83","payload":{"sample_query":"query Broken { s","resolver_code":"Query: { s: () => 'x' }","expected_response":"{\"errors\":[{\"message\":\"Syntax Error: Expected Name, found .\"}]}","schema_definition":"type Query { s: String! }"}} {"submissionId":"cmsvrqoez02umg4p295qt0x3i","title":"Submission QT0X3I","payload":{"sample_query":"{ obj { a } obj { b } }","resolver_code":"Query: { obj: () => ({a: 1}) }","expected_response":"{\"errors\":[{\"message\":\"Cannot query field \\\"b\\\" on type \\\"Obj2\\\". Did you mean \\\"a\\\"?\"}]}","schema_definition":"type Obj2 { a: Int! }\ntype Query { obj: Obj2! }"}} {"submissionId":"cmsvrqoez02uog4p2uzc9estk","title":"Submission C9ESTK","payload":{"sample_query":"{ ...NoSuchFragment }","resolver_code":"Query: { x: () => 1 }","expected_response":"{\"errors\":[{\"message\":\"Unknown fragment \\\"NoSuchFragment\\\".\"}]}","schema_definition":"type Query { x: Int! }"}} {"submissionId":"cmsvrqoez02upg4p2qzqqy26h","title":"Submission QQY26H","payload":{"sample_query":"{ zero neg big }","resolver_code":"Query: { zero: () => 0, neg: () => -2147483648, big: () => 2147483647 }","expected_response":"{\"data\":{\"zero\":0,\"neg\":-2147483648,\"big\":2147483647}}","schema_definition":"type Query { zero: Int!, neg: Int!, big: Int! }"}} {"submissionId":"cmsvrqof002uqg4p2tx71dcun","title":"Submission 71DCUN","payload":{"sample_query":"{ over }","resolver_code":"Query: { over: () => 2147483648 }","expected_response":"{\"errors\":[{\"message\":\"Int cannot represent non 32-bit signed integer value: 2147483648\"}],\"data\":null}","schema_definition":"type Query { over: Int! }"}} {"submissionId":"cmsvrqof002urg4p2qsrlqf3i","title":"Submission RLQF3I","payload":{"sample_query":"{ emptyStr spaces }","resolver_code":"Query: { emptyStr: () => '', spaces: () => ' ' }","expected_response":"{\"data\":{\"emptyStr\":\"\",\"spaces\":\" \"}}","schema_definition":"type Query { emptyStr: String!, spaces: String! }"}} {"submissionId":"cmsvrqof002usg4p29nyk4bsk","title":"Submission YK4BSK","payload":{"sample_query":"{ unicode }","resolver_code":"Query: { unicode: () => 'caf\\u00e9 \\u2014 na\\u00efve' }","expected_response":"{\"data\":{\"unicode\":\"café — naïve\"}}","schema_definition":"type Query { unicode: String! }"}} {"submissionId":"cmsvrqof002utg4p2g5xp8ad4","title":"Submission XP8AD4","payload":{"sample_query":"{ quoted }","resolver_code":"Query: { quoted: () => 'he said \\\"hi\\\" and left' }","expected_response":"{\"data\":{\"quoted\":\"he said \\\"hi\\\" and left\"}}","schema_definition":"type Query { quoted: String! }"}} {"submissionId":"cmsvrqof002uug4p2bhemgja3","title":"Submission EMGJA3","payload":{"sample_query":"{ __type(name: \"Beta\") { name kind } }","resolver_code":"Query: { beta: () => ({b: 'x'}) }","expected_response":"{\"data\":{\"__type\":{\"name\":\"Beta\",\"kind\":\"OBJECT\"}}}","schema_definition":"type Beta { b: String! }\ntype Query { beta: Beta! }"}} {"submissionId":"cmsvrqof002uvg4p2ufkcx0j8","title":"Submission KCX0J8","payload":{"sample_query":"{ __schema { queryType { name } } }","resolver_code":"Query: { q: () => 1 }","expected_response":"{\"data\":{\"__schema\":{\"queryType\":{\"name\":\"Query\"}}}}","schema_definition":"type Query { q: Int! }"}} {"submissionId":"cmsvrqof002uwg4p26b7zmir7","title":"Submission 7ZMIR7","payload":{"sample_query":"{ gamma { __typename g } }","resolver_code":"Query: { gamma: () => ({g: 1}) }","expected_response":"{\"data\":{\"gamma\":{\"__typename\":\"Gamma\",\"g\":1}}}","schema_definition":"type Gamma { g: Int! }\ntype Query { gamma: Gamma! }"}} {"submissionId":"cmsvrqof002uxg4p2xdf4rug1","title":"Submission F4RUG1","payload":{"sample_query":"{ pair }","resolver_code":"Query: { pair: async () => { const a = await Promise.resolve(1); const b = await Promise.resolve(2); return [a, b]; } }","expected_response":"{\"data\":{\"pair\":[1,2]}}","schema_definition":"type Query { pair: [Int!]! }"}} {"submissionId":"cmsvrqof002uyg4p236vs2h1n","title":"Submission VS2H1N","payload":{"sample_query":"{ slow2 { a b } }","resolver_code":"Query: { slow2: () => ({}) },\nSlow: { a: async () => 1, b: async () => 2 }","expected_response":"{\"data\":{\"slow2\":{\"a\":1,\"b\":2}}}","schema_definition":"type Slow { a: Int!, b: Int! }\ntype Query { slow2: Slow! }"}} {"submissionId":"cmsvrqof002uzg4p2bl1vukyb","title":"Submission 1VUKYB","payload":{"sample_query":"{ rejected }","resolver_code":"Query: { rejected: () => Promise.reject(new Error('promise rejected')) }","expected_response":"{\"errors\":[{\"message\":\"promise rejected\"}],\"data\":null}","schema_definition":"type Query { rejected: Int! }"}} {"submissionId":"cmsvrqof002v0g4p231lns6l6","title":"Submission LNS6L6","payload":{"sample_query":"{ shelf { all: titles withD: titles(contains: \"d\") } }","resolver_code":"Query: { shelf: () => ({books: ['dune', 'ubik', 'dhalgren']}) },\nShelf: { titles: (s, {contains}) => contains ? s.books.filter(b => b.includes(contains)) : s.books }","expected_response":"{\"data\":{\"shelf\":{\"all\":[\"dune\",\"ubik\",\"dhalgren\"],\"withD\":[\"dune\",\"dhalgren\"]}}}","schema_definition":"type Shelf { books: [String!]!, titles(contains: String): [String!]! }\ntype Query { shelf: Shelf! }"}} {"submissionId":"cmsvrqof002v1g4p2qro60z4g","title":"Submission O60Z4G","payload":{"sample_query":"{ log { level(min: 2) } }","resolver_code":"Query: { log: () => ({lines: ['a', 'bb', 'ccc']}) },\nLog2: { level: (l, {min}) => l.lines.filter(x => x.length >= min) }","expected_response":"{\"data\":{\"log\":{\"level\":[\"bb\",\"ccc\"]}}}","schema_definition":"type Log2 { lines: [String!]!, level(min: Int!): [String!]! }\ntype Query { log: Log2! }"}} {"submissionId":"cmsvtru0h0028uvp257iaoued","title":"Submission IAOUED","payload":{"sample_query":"{ books { title year } book(title: \"Dune\") { author } }","resolver_code":"Query: {\n books: () => [\n { title: \"Dune\", author: \"Frank Herbert\", year: 1965 },\n { title: \"Neuromancer\", author: \"William Gibson\", year: 1984 }\n ],\n book: (_, {title}) => [\n { title: \"Dune\", author: \"Frank Herbert\", year: 1965 },\n { title: \"Neuromancer\", author: \"William Gibson\", year: 1984 }\n ].find(b => b.title === title)\n}","expected_response":"{\"data\":{\"books\":[{\"title\":\"Dune\",\"year\":1965},{\"title\":\"Neuromancer\",\"year\":1984}],\"book\":{\"author\":\"Frank Herbert\"}}}","schema_definition":"type Book { title: String!, author: String!, year: Int! }\ntype Query { books: [Book!]!, book(title: String!): Book }"}} {"submissionId":"cmsvtru0h002auvp2q6iu0xnd","title":"Submission IU0XND","payload":{"sample_query":"{ book(id: \"b1\") { title authorId } }","resolver_code":"Query: {\n book: (_, {id}) => [\n { id: \"b1\", title: \"Dune\", authorId: \"a1\" },\n { id: \"b2\", title: \"Neuromancer\", authorId: \"a2\" }\n ].find(b => b.id === id)\n}","expected_response":"{\"data\":{\"book\":{\"title\":\"Dune\",\"authorId\":\"a1\"}}}","schema_definition":"type Book { id: ID!, title: String!, authorId: ID! }\ntype Query { book(id: ID!): Book }"}} {"submissionId":"cmsvtru0h002buvp2ligoegud","title":"Submission GOEGUD","payload":{"sample_query":"{ productsInStock { name price } }","resolver_code":"Query: {\n productsInStock: () => [\n { id: \"1\", name: \"Widget\", inStock: true, price: 9.99 },\n { id: \"2\", name: \"Gadget\", inStock: false, price: 19.99 },\n { id: \"3\", name: \"Gizmo\", inStock: true, price: 14.5 }\n ].filter(p => p.inStock)\n}","expected_response":"{\"data\":{\"productsInStock\":[{\"name\":\"Widget\",\"price\":9.99},{\"name\":\"Gizmo\",\"price\":14.5}]}}","schema_definition":"type Product { id: ID!, name: String!, inStock: Boolean!, price: Float! }\ntype Query { productsInStock: [Product!]! }"}} {"submissionId":"cmsvtru0h002duvp2zqck5z2w","title":"Submission CK5Z2W","payload":{"sample_query":"{ post(id: \"p1\") { title comments { text } } }","resolver_code":"Query: {\n post: (_, {id}) => [\n { id: \"p1\", title: \"Hello World\" },\n { id: \"p2\", title: \"Second Post\" }\n ].find(p => p.id === id)\n},\nPost: {\n comments: (post) => [\n { id: \"c1\", text: \"Nice post!\", postId: \"p1\" },\n { id: \"c2\", text: \"Thanks for sharing\", postId: \"p1\" },\n { id: \"c3\", text: \"Interesting\", postId: \"p2\" }\n ].filter(c => c.postId === post.id)\n}","expected_response":"{\"data\":{\"post\":{\"title\":\"Hello World\",\"comments\":[{\"text\":\"Nice post!\"},{\"text\":\"Thanks for sharing\"}]}}}","schema_definition":"type Comment { id: ID!, text: String!, postId: ID! }\ntype Post { id: ID!, title: String!, comments: [Comment!]! }\ntype Query { post(id: ID!): Post }"}} {"submissionId":"cmsvtru0h002euvp2craob9y3","title":"Submission AOB9Y3","payload":{"sample_query":"{ userExists(email: \"missing@example.com\") }","resolver_code":"Query: {\n userExists: (_, {email}) => [\n \"alice@example.com\", \"bob@example.com\"\n ].includes(email)\n}","expected_response":"{\"data\":{\"userExists\":false}}","schema_definition":"type Query { userExists(email: String!): Boolean! }"}} {"submissionId":"cmsvtru0h002fuvp29mhhgo9k","title":"Submission HHGO9K","payload":{"sample_query":"{ validateAge(age: -5) }","resolver_code":"Query: {\n validateAge: (_, {age}) => {\n if (age < 0) throw new Error('age cannot be negative');\n if (age < 18) return 'minor';\n if (age < 65) return 'adult';\n return 'senior';\n }\n}","expected_response":"{\"errors\":[{\"message\":\"age cannot be negative\",\"locations\":[{\"line\":1,\"column\":3}],\"path\":[\"validateAge\"]}],\"data\":null}","schema_definition":"type Query { validateAge(age: Int!): String! }"}} {"submissionId":"cmsvtru0h002guvp2mqzucirl","title":"Submission ZUCIRL","payload":{"sample_query":"{ directReports(managerId: \"m1\") { name } }","resolver_code":"Query: {\n directReports: (_, {managerId}) => [\n { id: \"e1\", name: \"Alice\", managerId: \"m1\" },\n { id: \"e2\", name: \"Bob\", managerId: \"m1\" },\n { id: \"e3\", name: \"Carol\", managerId: \"m2\" }\n ].filter(e => e.managerId === managerId)\n}","expected_response":"{\"data\":{\"directReports\":[{\"name\":\"Alice\"},{\"name\":\"Bob\"}]}}","schema_definition":"type Employee { id: ID!, name: String!, managerId: ID }\ntype Query { directReports(managerId: ID!): [Employee!]! }"}} {"submissionId":"cmsvtru0h002huvp201t3vx20","title":"Submission T3VX20","payload":{"sample_query":"{ wordCount(text: \"the quick brown fox jumps\") }","resolver_code":"Query: {\n wordCount: (_, {text}) => text.trim().split(/\\s+/).filter(w => w.length > 0).length\n}","expected_response":"{\"data\":{\"wordCount\":5}}","schema_definition":"type Query { wordCount(text: String!): Int! }"}} {"submissionId":"cmsvtru0h002iuvp2o089yngd","title":"Submission 89YNGD","payload":{"sample_query":"{ ordersAboveThreshold(threshold: 100) { id total } }","resolver_code":"Query: {\n ordersAboveThreshold: (_, {threshold}) => [\n { id: \"o1\", total: 45.0 },\n { id: \"o2\", total: 150.0 },\n { id: \"o3\", total: 210.5 }\n ].filter(o => o.total > threshold)\n}","expected_response":"{\"data\":{\"ordersAboveThreshold\":[{\"id\":\"o2\",\"total\":150},{\"id\":\"o3\",\"total\":210.5}]}}","schema_definition":"type Order { id: ID!, total: Float! }\ntype Query { ordersAboveThreshold(threshold: Float!): [Order!]! }"}} {"submissionId":"cmsvtru0h002juvp2h29vqkcg","title":"Submission 9VQKCG","payload":{"sample_query":"{ reverseString(s: \"graphql\") }","resolver_code":"Query: {\n reverseString: (_, {s}) => s.split('').reverse().join('')\n}","expected_response":"{\"data\":{\"reverseString\":\"lqhparg\"}}","schema_definition":"type Query { reverseString(s: String!): String! }"}} {"submissionId":"cmsvtru0h002kuvp2jdwnwbcx","title":"Submission WNWBCX","payload":{"sample_query":"{ largestTeam { name memberCount } }","resolver_code":"Query: {\n largestTeam: () => {\n const teams = [\n { id: \"t1\", name: \"Alpha\", memberCount: 5 },\n { id: \"t2\", name: \"Beta\", memberCount: 12 },\n { id: \"t3\", name: \"Gamma\", memberCount: 8 }\n ];\n return teams.reduce((a, b) => (b.memberCount > a.memberCount ? b : a), teams[0]);\n }\n}","expected_response":"{\"data\":{\"largestTeam\":{\"name\":\"Beta\",\"memberCount\":12}}}","schema_definition":"type Team { id: ID!, name: String!, memberCount: Int! }\ntype Query { largestTeam: Team }"}} {"submissionId":"cmsvtru0h002luvp29a17iyx7","title":"Submission 17IYX7","payload":{"sample_query":"{ parseIntSafe(input: \"not-a-number\") }","resolver_code":"Query: {\n parseIntSafe: (_, {input}) => {\n const n = Number(input);\n if (Number.isNaN(n)) return null;\n return Math.trunc(n);\n }\n}","expected_response":"{\"data\":{\"parseIntSafe\":null}}","schema_definition":"type Query { parseIntSafe(input: String!): Int }"}} {"submissionId":"cmsvtru0h002muvp2e30tnf1t","title":"Submission 0TNF1T","payload":{"sample_query":"{ matrixTrace(size: 4) }","resolver_code":"Query: {\n matrixTrace: (_, {size}) => {\n let sum = 0;\n for (let i = 0; i < size; i++) { sum += i * size + i; }\n return sum;\n }\n}","expected_response":"{\"data\":{\"matrixTrace\":30}}","schema_definition":"type Query { matrixTrace(size: Int!): Int! }"}} {"submissionId":"cmsvtru0h002nuvp2co883s3a","title":"Submission 883S3A","payload":{"sample_query":"{ winningOption }","resolver_code":"Query: {\n winningOption: () => {\n const votes = [\n { option: \"A\", count: 12 },\n { option: \"B\", count: 30 },\n { option: \"C\", count: 7 }\n ];\n return votes.reduce((a, b) => (b.count > a.count ? b : a)).option;\n }\n}","expected_response":"{\"data\":{\"winningOption\":\"B\"}}","schema_definition":"type Query { winningOption: String! }"}} {"submissionId":"cmsvtru0h002ouvp2bxizop09","title":"Submission IZOP09","payload":{"sample_query":"{ isPalindrome(s: \"A man a plan a canal Panama\") }","resolver_code":"Query: {\n isPalindrome: (_, {s}) => {\n const clean = s.toLowerCase().replace(/[^a-z0-9]/g, '');\n return clean === clean.split('').reverse().join('');\n }\n}","expected_response":"{\"data\":{\"isPalindrome\":true}}","schema_definition":"type Query { isPalindrome(s: String!): Boolean! }"}} {"submissionId":"cmsvtru0h002puvp2g55gs8ly","title":"Submission 5GS8LY","payload":{"sample_query":"{ findRecord(id: \"nonexistent\") }","resolver_code":"Query: {\n findRecord: (_, {id}) => {\n const records = [\n { id: \"r1\", value: \"first\" },\n { id: \"r2\", value: \"second\" }\n ];\n const record = records.find(r => r.id === id);\n if (!record) throw new Error('record not found');\n return record.value;\n }\n}","expected_response":"{\"errors\":[{\"message\":\"record not found\",\"locations\":[{\"line\":1,\"column\":3}],\"path\":[\"findRecord\"]}],\"data\":null}","schema_definition":"type Query { findRecord(id: ID!): String! }"}} {"submissionId":"cmsvtru0h002quvp2ou2auy6l","title":"Submission 2AUY6L","payload":{"sample_query":"{ sumEvenNumbers(upTo: 20) }","resolver_code":"Query: {\n sumEvenNumbers: (_, {upTo}) => {\n let total = 0;\n for (let i = 2; i <= upTo; i += 2) { total += i; }\n return total;\n }\n}","expected_response":"{\"data\":{\"sumEvenNumbers\":110}}","schema_definition":"type Query { sumEvenNumbers(upTo: Int!): Int! }"}} {"submissionId":"cmsvtru0h002ruvp2zgmk6m8z","title":"Submission MK6M8Z","payload":{"sample_query":"{ mergeArrays(a: [3, 1, 2], b: [2, 4, 1]) }","resolver_code":"Query: {\n mergeArrays: (_, {a, b}) => [...new Set([...a, ...b])].sort((x, y) => x - y)\n}","expected_response":"{\"data\":{\"mergeArrays\":[1,2,3,4]}}","schema_definition":"type Query { mergeArrays(a: [Int!]!, b: [Int!]!): [Int!]! }"}} {"submissionId":"cmsw3ccd7005juvp2uh2ty2l7","title":"Submission 2TY2L7","payload":{"sample_query":"{\n library {\n __typename\n ...NodeBits\n ... on Asset { size: bytes }\n ... on Photo { width }\n ... on Clip { seconds }\n }\n byteTotal\n}\nfragment NodeBits on Node { id }","resolver_code":"Query: {\n library: () => [\n { __typename: \"Photo\", id: \"p-1\", bytes: 2048, width: 1600 },\n { __typename: \"Clip\", id: \"c-1\", bytes: 8192, seconds: 30 },\n { __typename: \"Photo\", id: \"p-2\", bytes: 512, width: 800 }\n ],\n byteTotal: () => [2048, 8192, 512].reduce((a, b) => a + b, 0)\n}","expected_response":"{\"data\": {\"library\": [{\"__typename\": \"Photo\", \"id\": \"p-1\", \"size\": 2048, \"width\": 1600}, {\"__typename\": \"Clip\", \"id\": \"c-1\", \"size\": 8192, \"seconds\": 30}, {\"__typename\": \"Photo\", \"id\": \"p-2\", \"size\": 512, \"width\": 800}], \"byteTotal\": 10752}}","schema_definition":"interface Node { id: ID! }\ninterface Asset implements Node { id: ID! bytes: Int! }\ntype Photo implements Asset & Node { id: ID! bytes: Int! width: Int! }\ntype Clip implements Asset & Node { id: ID! bytes: Int! seconds: Int! }\ntype Query { library: [Asset!]! byteTotal: Int! }"}} {"submissionId":"cmsw3ccd7005kuvp2o3en9qdq","title":"Submission EN9QDQ","payload":{"sample_query":"{ ingest(doc: {name: \"sensor-1\", readings: [1, 2, 3], meta: {unit: \"C\", scale: 0.5}}) { accepted keys echo } }","resolver_code":"Query: {\n ingest: (_parent, args) => {\n const keys = Object.keys(args.doc).sort();\n return {\n accepted: keys.length > 0 && !args.strict,\n keys: keys,\n echo: { fields: keys.length, nested: args.doc.meta, strict: args.strict }\n };\n }\n}","expected_response":"{\"data\": {\"ingest\": {\"accepted\": true, \"keys\": [\"meta\", \"name\", \"readings\"], \"echo\": {\"fields\": 3, \"nested\": {\"unit\": \"C\", \"scale\": 0.5}, \"strict\": false}}}}","schema_definition":"scalar Payload\ntype Ingest { accepted: Boolean! keys: [String!]! echo: Payload! }\ntype Query { ingest(doc: Payload!, strict: Boolean = false): Ingest! }"}} {"submissionId":"cmsw3ccd7005luvp2axnnw1s1","title":"Submission NNW1S1","payload":{"sample_query":"{ alarms { code level } }","resolver_code":"Query: {\n alarms: () => [\n { code: \"PSU-1\", level: \"LOW\" },\n { code: \"FAN-3\", level: \"HIGH\" },\n { code: \"TMP-9\", level: \"CRITICAL\" }\n ]\n}","expected_response":"{\"errors\": [{\"message\": \"Enum \\\"Severity\\\" cannot represent value: \\\"CRITICAL\\\"\"}]}","schema_definition":"enum Severity { LOW MEDIUM HIGH }\ntype Alarm { code: String! level: Severity! }\ntype Query { alarms: [Alarm!]! }"}} {"submissionId":"cmsw3ccd7005muvp208t326qp","title":"Submission T326QP","payload":{"sample_query":"{ report { name sections { title words } } }","resolver_code":"Query: {\n report: () => ({\n name: \"Q3 rollup\",\n sections: [\n { title: \"Intro\", words: 120 },\n { title: null, words: 340 },\n { title: \"Outlook\", words: 90 }\n ]\n })\n}","expected_response":"{\"errors\": [{\"message\": \"Cannot return null for non-nullable field Section.title.\"}]}","schema_definition":"type Section { title: String! words: Int! }\ntype Report { name: String! sections: [Section!]! }\ntype Query { report: Report! }"}} {"submissionId":"cmsw3ccd7005nuvp2dltn0127","title":"Submission TN0127","payload":{"sample_query":"mutation { first: bump { value step } big: bump(by: 5) { value step } wipe: reset { value step } last: bump(by: 2) { value step } }","resolver_code":"Query: { tally: () => ({ name: \"hits\", value: 0, step: 0 }) },\nMutation: (function () {\n let value = 0;\n let step = 0;\n return {\n bump: (_parent, args) => { value += args.by; step += 1; return { name: \"hits\", value: value, step: step }; },\n reset: () => { value = 0; step += 1; return { name: \"hits\", value: value, step: step }; }\n };\n})()","expected_response":"{\"data\": {\"first\": {\"value\": 1, \"step\": 1}, \"big\": {\"value\": 6, \"step\": 2}, \"wipe\": {\"value\": 0, \"step\": 3}, \"last\": {\"value\": 2, \"step\": 4}}}","schema_definition":"type Tally { name: String! value: Int! step: Int! }\ntype Query { tally: Tally! }\ntype Mutation { bump(by: Int! = 1): Tally! reset: Tally! }"}} {"submissionId":"cmsw3ccd7005ouvp23hex84vj","title":"Submission EX84VJ","payload":{"sample_query":"{ deck { __typename ... on Article { headline } ... on Video { minutes } } }","resolver_code":"Query: {\n deck: () => [\n { __typename: \"Article\", headline: \"Ballast water rules\" },\n { __typename: \"Podcast\", minutes: 42 }\n ]\n}","expected_response":"{\"errors\": [{\"message\": \"Abstract type \\\"Card\\\" was resolved to a type \\\"Podcast\\\" that does not exist inside the schema.\"}]}","schema_definition":"type Article { headline: String! }\ntype Video { minutes: Int! }\nunion Card = Article | Video\ntype Query { deck: [Card!]! }"}} {"submissionId":"cmsw3ccd7005puvp2xabwhdd2","title":"Submission BWHDD2","payload":{"sample_query":"{\n notes {\n id\n body @highlight(colour: \"cyan\")\n ...Flags @audit\n hidden: body @include(if: false)\n }\n}\nfragment Flags on Note { pinned @audit }","resolver_code":"Query: {\n notes: () => [\n { id: \"n-1\", body: \"check ballast pump\", pinned: true },\n { id: \"n-2\", body: \"reorder gaskets\", pinned: false }\n ]\n}","expected_response":"{\"data\": {\"notes\": [{\"id\": \"n-1\", \"body\": \"check ballast pump\", \"pinned\": true}, {\"id\": \"n-2\", \"body\": \"reorder gaskets\", \"pinned\": false}]}}","schema_definition":"directive @highlight(colour: String! = \"yellow\") on FIELD\ndirective @audit on FIELD | FRAGMENT_SPREAD\ntype Note { id: ID! body: String! pinned: Boolean! }\ntype Query { notes: [Note!]! }"}} {"submissionId":"cmsw3ccd7005quvp2eth9o02v","title":"Submission H9O02V","payload":{"sample_query":"{\n tenant(slug: \"acme\") {\n slug\n open: projects(status: OPEN) { key busy: buckets(minItems: 2) { name items } total }\n every: projects { key status total }\n }\n missing: tenant(slug: \"nobody\") { slug }\n}","resolver_code":"Query: {\n tenant: (_parent, args) => {\n const all = {\n \"acme\": [\n { key: \"PUMP\", status: \"OPEN\", buckets: [{ name: \"todo\", items: 4 }, { name: \"doing\", items: 1 }] },\n { key: \"HULL\", status: \"CLOSED\", buckets: [{ name: \"todo\", items: 0 }, { name: \"done\", items: 9 }] },\n { key: \"NAV\", status: \"OPEN\", buckets: [{ name: \"todo\", items: 7 }] }\n ]\n };\n return all[args.slug] ? { slug: args.slug, projects: all[args.slug] } : null;\n }\n},\nTenant: {\n projects: (tenant, args) =>\n args.status == null ? tenant.projects : tenant.projects.filter((p) => p.status === args.status)\n},\nProject: {\n buckets: (project, args) => project.buckets.filter((b) => b.items >= args.minItems),\n total: (project) => project.buckets.reduce((sum, b) => sum + b.items, 0)\n}","expected_response":"{\"data\": {\"tenant\": {\"slug\": \"acme\", \"open\": [{\"key\": \"PUMP\", \"busy\": [{\"name\": \"todo\", \"items\": 4}], \"total\": 5}, {\"key\": \"NAV\", \"busy\": [{\"name\": \"todo\", \"items\": 7}], \"total\": 7}], \"every\": [{\"key\": \"PUMP\", \"status\": \"OPEN\", \"total\": 5}, {\"key\": \"HULL\", \"status\": \"CLOSED\", \"total\": 9}, {\"key\": \"NAV\", \"status\": \"OPEN\", \"total\": 7}]}, \"missing\": null}}","schema_definition":"enum Status { OPEN CLOSED }\ntype Bucket { name: String! items: Int! }\ntype Project { key: String! status: Status! buckets(minItems: Int = 0): [Bucket!]! total: Int! }\ntype Tenant { slug: String! projects(status: Status): [Project!]! }\ntype Query { tenant(slug: ID!): Tenant }"}} {"submissionId":"cmsw3ccd7005ruvp2pbdjnzqz","title":"Submission DJNZQZ","payload":{"sample_query":"{ search(tags: [\"hull\", null, \"keel\"]) { tag rank } }","resolver_code":"Query: {\n search: (_parent, args) =>\n args.tags.slice(0, args.limit).map((tag, i) => ({ tag: tag, rank: i + 1 }))\n}","expected_response":"{\"errors\": [{\"message\": \"Expected value of type \\\"String!\\\", found null.\"}]}","schema_definition":"type Hit { tag: String! rank: Int! }\ntype Query { search(tags: [String!]!, limit: Int = 5): [Hit!]! }"}} {"submissionId":"cmsw3ccd7005suvp2gfhsq5v3","title":"Submission HSQ5V3","payload":{"sample_query":"{ device { id label two: average three: average(window: 3) all: average(window: 4) readings } }","resolver_code":"Query: {\n device: () => ({\n id: \"dev-9\",\n readings: [3, 5, 8, 13],\n average: function (args) {\n const w = this.readings.slice(-args.window);\n return Math.round((w.reduce((a, b) => a + b, 0) / w.length) * 100) / 100;\n },\n label: function () { return \"device \" + this.id; }\n })\n}","expected_response":"{\"data\": {\"device\": {\"id\": \"dev-9\", \"label\": \"device dev-9\", \"two\": 10.5, \"three\": 8.67, \"all\": 7.25, \"readings\": [3, 5, 8, 13]}}}","schema_definition":"type Device { id: ID! readings: [Int!]! average(window: Int! = 2): Float! label: String! }\ntype Query { device: Device! }"}} {"submissionId":"cmsw3ccd7005tuvp2uaxgkn36","title":"Submission XGKN36","payload":{"sample_query":"{\n quote(shipments: [\n {carrier: \"ROAD\", lines: [{sku: \"BOLT\", qty: 4, weight: 0.25}, {sku: \"NUT\", weight: 0.05}]},\n {carrier: \"AIR\", unit: LB, lines: [{sku: \"CASE\", qty: 2, weight: 10}]}\n ]) {\n carrier unit pieces totalKg lines { sku qty weightKg }\n }\n}","resolver_code":"Query: {\n quote: (_parent, args) => args.shipments.map((s) => {\n const factor = s.unit === \"LB\" ? 0.45359237 : 1;\n const lines = s.lines.map((l) => ({\n sku: l.sku,\n qty: l.qty,\n weightKg: Math.round(l.weight * l.qty * factor * 1000) / 1000\n }));\n return {\n carrier: s.carrier,\n unit: s.unit,\n pieces: lines.reduce((n, l) => n + l.qty, 0),\n totalKg: Math.round(lines.reduce((n, l) => n + l.weightKg, 0) * 1000) / 1000,\n lines: lines\n };\n })\n}","expected_response":"{\"data\": {\"quote\": [{\"carrier\": \"ROAD\", \"unit\": \"KG\", \"pieces\": 5, \"totalKg\": 1.05, \"lines\": [{\"sku\": \"BOLT\", \"qty\": 4, \"weightKg\": 1}, {\"sku\": \"NUT\", \"qty\": 1, \"weightKg\": 0.05}]}, {\"carrier\": \"AIR\", \"unit\": \"LB\", \"pieces\": 2, \"totalKg\": 9.072, \"lines\": [{\"sku\": \"CASE\", \"qty\": 2, \"weightKg\": 9.072}]}]}}","schema_definition":"enum Unit { KG LB }\ninput LineInput { sku: String! qty: Int! = 1 weight: Float! }\ninput ShipmentInput { carrier: String! unit: Unit! = KG lines: [LineInput!]! }\ntype LineSummary { sku: String! qty: Int! weightKg: Float! }\ntype Quote { carrier: String! unit: Unit! pieces: Int! totalKg: Float! lines: [LineSummary!]! }\ntype Query { quote(shipments: [ShipmentInput!]!): [Quote!]! }"}} {"submissionId":"cmsw3ccd7005uuvp2eff4x1b8","title":"Submission F4X1B8","payload":{"sample_query":"{\n facilities {\n __typename\n ... on Berth { code metres: lengthM }\n ... on Crane { code reachM }\n ... on Silo { code tonnes }\n }\n}","resolver_code":"Query: {\n facilities: () => [\n { __typename: \"Berth\", code: \"B-1\", lengthM: 240.5 },\n { __typename: \"Crane\", code: \"C-7\", reachM: 48 },\n { __typename: \"Berth\", code: \"B-2\", lengthM: 180 }\n ]\n}","expected_response":"{\"data\": {\"facilities\": [{\"__typename\": \"Berth\", \"code\": \"B-1\", \"metres\": 240.5}, {\"__typename\": \"Crane\", \"code\": \"C-7\", \"reachM\": 48}, {\"__typename\": \"Berth\", \"code\": \"B-2\", \"metres\": 180}]}}","schema_definition":"type Berth { code: String! lengthM: Float! }\ntype Crane { code: String! reachM: Float! }\ntype Silo { code: String! tonnes: Int! }\nunion Facility = Berth | Crane | Silo\ntype Query { facilities: [Facility!]! }"}} {"submissionId":"cmsw3ccd7005vuvp2z0h8xtnv","title":"Submission H8XTNV","payload":{"sample_query":"{\n fallback: lookup(where: {term: \"a\"}) { term size sort rows }\n partial: lookup(where: {term: \"o\", page: {size: 2}}) { term size sort rows }\n explicit: lookup(where: {term: \"e\", page: {size: 5, sort: ASC}}) { term size sort rows }\n}","resolver_code":"Query: {\n lookup: (_parent, args) => {\n const corpus = [\"alpha\", \"bravo\", \"charlie\", \"delta\", \"echo\", \"foxtrot\"];\n const page = args.where.page;\n const hits = corpus.filter((w) => w.indexOf(args.where.term) >= 0);\n const ordered = page.sort === \"DESC\" ? hits.slice().reverse() : hits.slice();\n return { term: args.where.term, size: page.size, sort: page.sort, rows: ordered.slice(0, page.size) };\n }\n}","expected_response":"{\"data\": {\"fallback\": {\"term\": \"a\", \"size\": 3, \"sort\": \"DESC\", \"rows\": [\"delta\", \"charlie\", \"bravo\"]}, \"partial\": {\"term\": \"o\", \"size\": 2, \"sort\": \"ASC\", \"rows\": [\"bravo\", \"echo\"]}, \"explicit\": {\"term\": \"e\", \"size\": 5, \"sort\": \"ASC\", \"rows\": [\"charlie\", \"delta\", \"echo\"]}}}","schema_definition":"enum Sort { ASC DESC }\ninput Page { size: Int! = 10 sort: Sort! = ASC }\ninput Lookup { term: String! page: Page = {size: 3, sort: DESC} }\ntype Slice { term: String! size: Int! sort: Sort! rows: [String!]! }\ntype Query { lookup(where: Lookup!): Slice! }"}} {"submissionId":"cmsw3ccd7005wuvp24u7myf20","title":"Submission 7MYF20","payload":{"sample_query":"{ member(by: {slug: \"ada\", email: \"ada@example.org\"}) { id slug email } }","resolver_code":"Query: {\n member: (_parent, args) => {\n const set = Object.keys(args.by).filter((k) => args.by[k] != null);\n if (set.length !== 1) {\n throw new Error(\"Selector requires exactly one key, received \" + set.length + \": \" + set.sort().join(\",\"));\n }\n const rows = [{ id: \"1\", slug: \"ada\", email: \"ada@example.org\" }];\n const hit = rows.find((r) => r[set[0]] === args.by[set[0]]);\n if (!hit) { throw new Error(\"no member for \" + set[0]); }\n return hit;\n }\n}","expected_response":"{\"errors\": [{\"message\": \"Selector requires exactly one key, received 2: email,slug\"}]}","schema_definition":"input Selector { id: ID slug: String email: String }\ntype Member { id: ID! slug: String! email: String! }\ntype Query { member(by: Selector!): Member! }"}} {"submissionId":"cmsw3ccd7005xuvp268bdaqtw","title":"Submission BDAQTW","payload":{"sample_query":"{\n root {\n ...Bits\n children { ...Bits children { ...Bits children { ...Bits } } }\n }\n}\nfragment Bits on Node { name path depth leafCount }","resolver_code":"Query: {\n root: () => ({\n name: \"catalogue\", parent: null,\n children: [\n { name: \"tools\", children: [\n { name: \"hand\", children: [] },\n { name: \"power\", children: [{ name: \"cordless\", children: [] }] }\n ] },\n { name: \"fasteners\", children: [{ name: \"bolts\", children: [] }] }\n ]\n })\n},\nNode: {\n path: (node) => {\n const walk = (n) => (n.parent ? walk(n.parent) + \"/\" + n.name : n.name);\n return walk(node);\n },\n depth: (node) => { let d = 0; let n = node; while (n.parent) { d += 1; n = n.parent; } return d; },\n leafCount: (node) => {\n const count = (n) => (n.children.length === 0 ? 1 : n.children.reduce((s, c) => s + count(c), 0));\n return count(node);\n },\n children: (node) => node.children.map((c) => Object.assign({}, c, { parent: node }))\n}","expected_response":"{\"data\": {\"root\": {\"name\": \"catalogue\", \"path\": \"catalogue\", \"depth\": 0, \"leafCount\": 3, \"children\": [{\"name\": \"tools\", \"path\": \"catalogue/tools\", \"depth\": 1, \"leafCount\": 2, \"children\": [{\"name\": \"hand\", \"path\": \"catalogue/tools/hand\", \"depth\": 2, \"leafCount\": 1, \"children\": []}, {\"name\": \"power\", \"path\": \"catalogue/tools/power\", \"depth\": 2, \"leafCount\": 1, \"children\": [{\"name\": \"cordless\", \"path\": \"catalogue/tools/power/cordless\", \"depth\": 3, \"leafCount\": 1}]}]}, {\"name\": \"fasteners\", \"path\": \"catalogue/fasteners\", \"depth\": 1, \"leafCount\": 1, \"children\": [{\"name\": \"bolts\", \"path\": \"catalogue/fasteners/bolts\", \"depth\": 2, \"leafCount\": 1, \"children\": []}]}]}}}","schema_definition":"type Node { name: String! path: String! depth: Int! leafCount: Int! children: [Node!]! }\ntype Query { root: Node! }"}} {"submissionId":"cmsw3ccd7005yuvp248pr96bl","title":"Submission PR96BL","payload":{"sample_query":"{ core ledger { opening movements closing } }","resolver_code":"Query: {\n core: () => \"base\",\n ledger: () => ({ opening: 100, movements: [-30, 12, 45, -7] })\n},\nLedger: {\n closing: (ledger) => ledger.movements.reduce((a, b) => a + b, ledger.opening)\n}","expected_response":"{\"data\": {\"core\": \"base\", \"ledger\": {\"opening\": 100, \"movements\": [-30, 12, 45, -7], \"closing\": 120}}}","schema_definition":"type Query { core: String! }\nextend type Query { ledger: Ledger! }\ntype Ledger { opening: Int! }\nextend type Ledger { movements: [Int!]! closing: Int! }"}} {"submissionId":"cmsw3ccd7005zuvp2n7unoiwo","title":"Submission UNOIWO","payload":{"sample_query":"{\n fleet {\n __typename code capacity\n pct: utilisation\n exact: utilisation(rounded: false)\n ... on Truck { axles }\n ... on Barge { draftM }\n }\n}","resolver_code":"Query: {\n fleet: () => {\n class Carrier {\n constructor(code, capacity, load) { this.code = code; this.capacity = capacity; this.load = load; }\n utilisation(args) {\n const raw = (this.load / this.capacity) * 100;\n return args.rounded ? Math.round(raw) : Math.round(raw * 100) / 100;\n }\n }\n class Truck extends Carrier {\n constructor(code, capacity, load, axles) { super(code, capacity, load); this.axles = axles; }\n get __typename() { return \"Truck\"; }\n }\n class Barge extends Carrier {\n constructor(code, capacity, load, draftM) { super(code, capacity, load); this.draftM = draftM; }\n get __typename() { return \"Barge\"; }\n }\n return [new Truck(\"T-11\", 24000, 18000, 3), new Barge(\"B-4\", 900000, 615000, 2.8)];\n }\n}","expected_response":"{\"data\": {\"fleet\": [{\"__typename\": \"Truck\", \"code\": \"T-11\", \"capacity\": 24000, \"pct\": 75, \"exact\": 75, \"axles\": 3}, {\"__typename\": \"Barge\", \"code\": \"B-4\", \"capacity\": 900000, \"pct\": 68, \"exact\": 68.33, \"draftM\": 2.8}]}}","schema_definition":"interface Unit { code: String! capacity: Int! utilisation(rounded: Boolean! = true): Float! }\ntype Truck implements Unit { code: String! capacity: Int! utilisation(rounded: Boolean! = true): Float! axles: Int! }\ntype Barge implements Unit { code: String! capacity: Int! utilisation(rounded: Boolean! = true): Float! draftM: Float! }\ntype Query { fleet: [Unit!]! }"}} {"submissionId":"cmsw3ccd70060uvp2vfahc2wy","title":"Submission AHC2WY","payload":{"sample_query":"{\n fallback: histogram { level count }\n widened: histogram(levels: [DEBUG, INFO, WARN, ERROR]) { level count }\n single: histogram(levels: INFO, minCount: 20) { level count }\n}","resolver_code":"Query: {\n histogram: (_parent, args) => {\n const counts = { DEBUG: 0, INFO: 12, WARN: 3, ERROR: 5 };\n return args.levels\n .map((l) => ({ level: l, count: counts[l] }))\n .filter((b) => b.count >= args.minCount);\n }\n}","expected_response":"{\"data\": {\"fallback\": [{\"level\": \"WARN\", \"count\": 3}, {\"level\": \"ERROR\", \"count\": 5}], \"widened\": [{\"level\": \"INFO\", \"count\": 12}, {\"level\": \"WARN\", \"count\": 3}, {\"level\": \"ERROR\", \"count\": 5}], \"single\": []}}","schema_definition":"enum Level { DEBUG INFO WARN ERROR }\ntype Bucket { level: Level! count: Int! }\ntype Query { histogram(levels: [Level!] = [WARN, ERROR], minCount: Int = 1): [Bucket!]! }"}} {"submissionId":"cmsw3ccd70061uvp2imo8ey9d","title":"Submission O8EY9D","payload":{"sample_query":"{\n sydOre: rows(where: {all: [{field: \"port\", equals: \"SYD\"}, {field: \"cargo\", equals: \"ore\"}]}) { id port cargo }\n notGrain: rows(where: {not: {field: \"cargo\", equals: \"grain\"}}) { id cargo }\n either: matched(where: {any: [{field: \"port\", equals: \"MEL\"}, {field: \"port\", equals: \"BNE\"}]})\n nested: matched(where: {all: [{any: [{field: \"port\", equals: \"SYD\"}, {field: \"port\", equals: \"BNE\"}]}, {not: {field: \"cargo\", equals: \"ore\"}}]})\n}","resolver_code":"Query: {\n rows: (_parent, args) => {\n const data = [\n { id: \"1\", port: \"SYD\", cargo: \"grain\" },\n { id: \"2\", port: \"MEL\", cargo: \"ore\" },\n { id: \"3\", port: \"SYD\", cargo: \"ore\" },\n { id: \"4\", port: \"BNE\", cargo: \"grain\" }\n ];\n const test = (row, e) => {\n if (e.all) { return e.all.every((sub) => test(row, sub)); }\n if (e.any) { return e.any.some((sub) => test(row, sub)); }\n if (e.not) { return !test(row, e.not); }\n return row[e.field] === e.equals;\n };\n return data.filter((row) => test(row, args.where));\n },\n matched: (_parent, args) => {\n const data = [\n { id: \"1\", port: \"SYD\", cargo: \"grain\" },\n { id: \"2\", port: \"MEL\", cargo: \"ore\" },\n { id: \"3\", port: \"SYD\", cargo: \"ore\" },\n { id: \"4\", port: \"BNE\", cargo: \"grain\" }\n ];\n const test = (row, e) => {\n if (e.all) { return e.all.every((sub) => test(row, sub)); }\n if (e.any) { return e.any.some((sub) => test(row, sub)); }\n if (e.not) { return !test(row, e.not); }\n return row[e.field] === e.equals;\n };\n return data.filter((row) => test(row, args.where)).length;\n }\n}","expected_response":"{\"data\": {\"sydOre\": [{\"id\": \"3\", \"port\": \"SYD\", \"cargo\": \"ore\"}], \"notGrain\": [{\"id\": \"2\", \"cargo\": \"ore\"}, {\"id\": \"3\", \"cargo\": \"ore\"}], \"either\": 2, \"nested\": 2}}","schema_definition":"input Expr { all: [Expr!] any: [Expr!] not: Expr field: String equals: String }\ntype Row { id: ID! port: String! cargo: String! }\ntype Query { rows(where: Expr!): [Row!]! matched(where: Expr!): Int! }"}} {"submissionId":"cmsw3ccd70062uvp2gtm6eys2","title":"Submission M6EYS2","payload":{"sample_query":"{ gauges { name zero blank off missing note samples } }","resolver_code":"Query: {\n gauges: () => [\n { name: \"a\", zero: 0, blank: \"\", off: false, missing: null, note: undefined, samples: [0, null, 2] },\n { name: \"b\", zero: 7, blank: \"x\", off: true, missing: \"here\", samples: [] }\n ]\n},\nGauge: {\n note: (gauge) => (gauge.name === \"b\" ? \"\" : gauge.note)\n}","expected_response":"{\"data\": {\"gauges\": [{\"name\": \"a\", \"zero\": 0, \"blank\": \"\", \"off\": false, \"missing\": null, \"note\": null, \"samples\": [0, null, 2]}, {\"name\": \"b\", \"zero\": 7, \"blank\": \"x\", \"off\": true, \"missing\": \"here\", \"note\": \"\", \"samples\": []}]}}","schema_definition":"type Gauge { name: String! zero: Int! blank: String! off: Boolean! missing: String note: String samples: [Int]! }\ntype Query { gauges: [Gauge!]! }"}} {"submissionId":"cmswrp3kd006tuvp22uyis43b","title":"Submission YIS43B","payload":{"sample_query":"{ lowStock(threshold: 5) { name stock discountedPrice(pct: 10) } }","resolver_code":"Query: {\n lowStock: (_, { threshold }) => {\n const products = [\n { id: \"p1\", name: \"Widget\", price: 9.99, stock: 3 },\n { id: \"p2\", name: \"Gadget\", price: 19.99, stock: 50 },\n { id: \"p3\", name: \"Gizmo\", price: 5.5, stock: 1 }\n ];\n return products.filter(p => p.stock <= threshold);\n }\n},\nProduct: {\n discountedPrice: (product, { pct }) => Math.round(product.price * (1 - pct / 100) * 100) / 100\n}","expected_response":"{\"data\": {\"lowStock\": [{\"name\": \"Widget\", \"stock\": 3, \"discountedPrice\": 8.99}, {\"name\": \"Gizmo\", \"stock\": 1, \"discountedPrice\": 4.95}]}}","schema_definition":"type Product {\n id: ID!\n name: String!\n price: Float!\n stock: Int!\n discountedPrice(pct: Float!): Float!\n}\ntype Query {\n lowStock(threshold: Int!): [Product!]!\n}"}} {"submissionId":"cmswrp3kd006uuvp2ik4565is","title":"Submission 4565IS","payload":{"sample_query":"{ category(id: \"1\") { name children { name children { name } } } }","resolver_code":"Query: {\n category: (_, { id }) => {\n const all = [\n { id: \"1\", name: \"Electronics\", parentId: null },\n { id: \"2\", name: \"Phones\", parentId: \"1\" },\n { id: \"3\", name: \"Laptops\", parentId: \"1\" },\n { id: \"4\", name: \"Gaming Laptops\", parentId: \"3\" }\n ];\n return all.find(c => c.id === id) || null;\n }\n},\nCategory: {\n children: (cat) => {\n const all = [\n { id: \"1\", name: \"Electronics\", parentId: null },\n { id: \"2\", name: \"Phones\", parentId: \"1\" },\n { id: \"3\", name: \"Laptops\", parentId: \"1\" },\n { id: \"4\", name: \"Gaming Laptops\", parentId: \"3\" }\n ];\n return all.filter(c => c.parentId === cat.id);\n }\n}","expected_response":"{\"data\": {\"category\": {\"name\": \"Electronics\", \"children\": [{\"name\": \"Phones\", \"children\": []}, {\"name\": \"Laptops\", \"children\": [{\"name\": \"Gaming Laptops\"}]}]}}}","schema_definition":"type Category {\n id: ID!\n name: String!\n children: [Category!]!\n}\ntype Query {\n category(id: ID!): Category\n}"}} {"submissionId":"cmswrp3kd006vuvp2bvnul580","title":"Submission NUL580","payload":{"sample_query":"mutation { increment(name: \"visits\", amount: 7) { name value } }","resolver_code":"Query: { _empty: () => null },\nMutation: {\n increment: (_, { name, amount }) => {\n if (amount <= 0) {\n throw new Error(\"amount must be positive\");\n }\n const counters = { visits: 10, clicks: 5 };\n const current = counters[name];\n if (current === undefined) {\n throw new Error(\"unknown counter: \" + name);\n }\n return { name, value: current + amount };\n }\n}","expected_response":"{\"data\": {\"increment\": {\"name\": \"visits\", \"value\": 17}}}","schema_definition":"type Counter {\n name: String!\n value: Int!\n}\ntype Mutation {\n increment(name: String!, amount: Int!): Counter!\n}\ntype Query {\n _empty: String\n}"}} {"submissionId":"cmswrp3kd006xuvp2yhseeid5","title":"Submission SEEID5","payload":{"sample_query":"{ tickets { title priority } }","resolver_code":"Query: {\n tickets: (_, { minPriority }) => {\n const order = { LOW: 0, MEDIUM: 1, HIGH: 2 };\n const all = [\n { id: \"t1\", title: \"Fix typo\", priority: \"LOW\" },\n { id: \"t2\", title: \"Server down\", priority: \"HIGH\" },\n { id: \"t3\", title: \"Update docs\", priority: \"MEDIUM\" }\n ];\n return all.filter(t => order[t.priority] >= order[minPriority]);\n }\n}","expected_response":"{\"data\": {\"tickets\": [{\"title\": \"Server down\", \"priority\": \"HIGH\"}, {\"title\": \"Update docs\", \"priority\": \"MEDIUM\"}]}}","schema_definition":"enum Priority { LOW MEDIUM HIGH }\ntype Ticket {\n id: ID!\n title: String!\n priority: Priority!\n}\ntype Query {\n tickets(minPriority: Priority = MEDIUM): [Ticket!]!\n}"}} {"submissionId":"cmswrp3kd0073uvp2mcobr9oq","title":"Submission OBR9OQ","payload":{"sample_query":"{ user { id profile { bio } } }","resolver_code":"Query: {\n user: () => ({ id: \"u1\" })\n},\nUser: {\n profile: () => { throw new Error(\"profile service unavailable\"); }\n}","expected_response":"{\"errors\": [{\"message\": \"profile service unavailable\"}]}","schema_definition":"type Profile {\n bio: String!\n}\ntype User {\n id: ID!\n profile: Profile!\n}\ntype Query {\n user: User!\n}"}} {"submissionId":"cmswrp3kd0079uvp2v3sxs81r","title":"Submission SXS81R","payload":{"sample_query":"{ invoice { subtotal withTax: total(includeTax: true) noTax: total(includeTax: false) } }","resolver_code":"Query: {\n invoice: () => ({ id: \"inv1\", subtotal: 100.0 })\n},\nInvoice: {\n total: (inv, { includeTax }) => includeTax ? Math.round(inv.subtotal * 1.08 * 100) / 100 : inv.subtotal\n}","expected_response":"{\"data\": {\"invoice\": {\"subtotal\": 100, \"withTax\": 108, \"noTax\": 100}}}","schema_definition":"type Invoice {\n id: ID!\n subtotal: Float!\n total(includeTax: Boolean!): Float!\n}\ntype Query {\n invoice: Invoice!\n}"}} {"submissionId":"cmswrp3kd007cuvp21qeozbcd","title":"Submission EOZBCD","payload":{"sample_query":"mutation { completeTodo(id: \"2\") { id done } }","resolver_code":"Query: { _empty: () => null },\nMutation: {\n completeTodo: (_, { id }) => {\n const todos = [\n { id: \"1\", text: \"Buy milk\", done: false },\n { id: \"2\", text: \"Walk dog\", done: false },\n { id: \"3\", text: \"Write report\", done: true }\n ];\n const target = todos.find(t => t.id === id);\n if (!target) {\n throw new Error(\"todo not found: \" + id);\n }\n target.done = true;\n return todos;\n }\n}","expected_response":"{\"data\": {\"completeTodo\": [{\"id\": \"1\", \"done\": false}, {\"id\": \"2\", \"done\": true}, {\"id\": \"3\", \"done\": true}]}}","schema_definition":"type Todo {\n id: ID!\n text: String!\n done: Boolean!\n}\ntype Mutation {\n completeTodo(id: ID!): [Todo!]!\n}\ntype Query { _empty: String }"}} {"submissionId":"cmswrp3ke007huvp2m4vog058","title":"Submission VOG058","payload":{"sample_query":"{ company { name department(name: \"Engineering\") { name manager { name } } } }","resolver_code":"Query: {\n company: () => ({ name: \"Acme Corp\" })\n},\nCompany: {\n department: (_, { name }) => {\n const departments = {\n Engineering: { name: \"Engineering\", managerName: \"Priya\" },\n Sales: { name: \"Sales\", managerName: \"Tom\" }\n };\n return departments[name] || null;\n }\n},\nDepartment: {\n manager: (dept) => ({ name: dept.managerName })\n}","expected_response":"{\"data\": {\"company\": {\"name\": \"Acme Corp\", \"department\": {\"name\": \"Engineering\", \"manager\": {\"name\": \"Priya\"}}}}}","schema_definition":"type Manager {\n name: String!\n}\ntype Department {\n name: String!\n manager: Manager!\n}\ntype Company {\n name: String!\n department(name: String!): Department\n}\ntype Query {\n company: Company!\n}"}} {"submissionId":"cmsx3es7n003cx3p2536ndmyi","title":"Submission 6NDMYI","payload":{"sample_query":"query {\n order(id: \"1\") {\n status\n total\n items {\n quantity\n subtotal\n product { name price }\n }\n }\n}","resolver_code":"Query: {\n order: (_, { id }) => {\n const orders = {\n \"1\": { id: \"1\", status: \"SHIPPED\", items: [ { productId: \"p1\", quantity: 2 }, { productId: \"p2\", quantity: 1 } ] }\n };\n return orders[id] || null;\n },\n products: (_, { category }) => {\n const products = [\n { id: \"p1\", name: \"Widget\", price: 9.99, category: \"tools\" },\n { id: \"p2\", name: \"Gadget\", price: 19.99, category: \"electronics\" },\n { id: \"p3\", name: \"Gizmo\", price: 14.5, category: \"tools\" }\n ];\n return category ? products.filter(p => p.category === category) : products;\n }\n},\nOrder: {\n items: (order) => {\n const products = {\n p1: { id: \"p1\", name: \"Widget\", price: 9.99, category: \"tools\" },\n p2: { id: \"p2\", name: \"Gadget\", price: 19.99, category: \"electronics\" }\n };\n return order.items.map(i => ({ product: products[i.productId], quantity: i.quantity, subtotal: products[i.productId].price * i.quantity }));\n },\n total: (order) => {\n const products = {\n p1: { id: \"p1\", name: \"Widget\", price: 9.99, category: \"tools\" },\n p2: { id: \"p2\", name: \"Gadget\", price: 19.99, category: \"electronics\" }\n };\n return order.items.reduce((sum, i) => sum + products[i.productId].price * i.quantity, 0);\n }\n}","expected_response":"{\"data\":{\"order\":{\"status\":\"SHIPPED\",\"total\":39.97,\"items\":[{\"quantity\":2,\"subtotal\":19.98,\"product\":{\"name\":\"Widget\",\"price\":9.99}},{\"quantity\":1,\"subtotal\":19.99,\"product\":{\"name\":\"Gadget\",\"price\":19.99}}]}}}","schema_definition":"enum OrderStatus { PENDING SHIPPED DELIVERED CANCELLED }\n\ntype Product {\n id: ID!\n name: String!\n price: Float!\n category: String!\n}\n\ntype OrderItem {\n product: Product!\n quantity: Int!\n subtotal: Float!\n}\n\ntype Order {\n id: ID!\n status: OrderStatus!\n items: [OrderItem!]!\n total: Float!\n}\n\ntype Query {\n order(id: ID!): Order\n products(category: String): [Product!]!\n}"}} {"submissionId":"cmsx3es7n003ex3p2rp34g1ed","title":"Submission 34G1ED","payload":{"sample_query":"query {\n players(minWins: 5) {\n name\n wins\n losses\n winRate\n }\n}","resolver_code":"Query: {\n players: (_, { minWins }) => {\n const players = [\n { id: \"1\", name: \"Nova\", wins: 10, losses: 2 },\n { id: \"2\", name: \"Blaze\", wins: 3, losses: 7 },\n { id: \"3\", name: \"Echo\", wins: 15, losses: 5 }\n ];\n return (minWins != null ? players.filter(p => p.wins >= minWins) : players);\n },\n player: (_, { id }) => {\n const players = [\n { id: \"1\", name: \"Nova\", wins: 10, losses: 2 },\n { id: \"2\", name: \"Blaze\", wins: 3, losses: 7 },\n { id: \"3\", name: \"Echo\", wins: 15, losses: 5 }\n ];\n return players.find(p => p.id === id) || null;\n }\n},\nPlayer: {\n winRate: (player) => {\n const total = player.wins + player.losses;\n return total === 0 ? 0 : Math.round((player.wins / total) * 1000) / 1000;\n }\n}","expected_response":"{\"data\":{\"players\":[{\"name\":\"Nova\",\"wins\":10,\"losses\":2,\"winRate\":0.833},{\"name\":\"Echo\",\"wins\":15,\"losses\":5,\"winRate\":0.75}]}}","schema_definition":"type Player {\n id: ID!\n name: String!\n wins: Int!\n losses: Int!\n winRate: Float!\n}\n\ntype Query {\n players(minWins: Int): [Player!]!\n player(id: ID!): Player\n}"}} {"submissionId":"cmsx3es7n003fx3p27f978aar","title":"Submission 978AAR","payload":{"sample_query":"mutation {\n withdraw(accountId: \"a1\", amount: 500) {\n balance\n }\n}","resolver_code":"Query: {\n account: (_, { id }) => {\n const accounts = { a1: { id: \"a1\", owner: \"Alice\", balance: 100, transactions: [ { id: \"t1\", type: \"DEPOSIT\", amount: 100 } ] } };\n return accounts[id] || null;\n }\n},\nMutation: {\n withdraw: (_, { accountId, amount }) => {\n const accounts = { a1: { id: \"a1\", owner: \"Alice\", balance: 100, transactions: [ { id: \"t1\", type: \"DEPOSIT\", amount: 100 } ] } };\n const acc = accounts[accountId];\n if (!acc) throw new Error(\"Account not found\");\n if (amount > acc.balance) throw new Error(\"Insufficient funds\");\n acc.balance -= amount;\n acc.transactions.push({ id: \"t2\", type: \"WITHDRAWAL\", amount });\n return acc;\n }\n},\nAccount: {\n transactions: (acc) => acc.transactions\n}","expected_response":"{\"errors\":[{\"message\":\"Insufficient funds\"}],\"data\":null}","schema_definition":"enum TransactionType { DEPOSIT WITHDRAWAL }\n\ntype Transaction {\n id: ID!\n type: TransactionType!\n amount: Float!\n}\n\ntype Account {\n id: ID!\n owner: String!\n balance: Float!\n transactions: [Transaction!]!\n}\n\ntype Query {\n account(id: ID!): Account\n}\n\ntype Mutation {\n withdraw(accountId: ID!, amount: Float!): Account!\n}"}} {"submissionId":"cmsx3es7n003gx3p21oqtjjmb","title":"Submission QTJJMB","payload":{"sample_query":"query {\n appointment(id: \"9\") {\n date\n patient { name }\n }\n}","resolver_code":"Query: {\n appointmentsByStatus: (_, { status }) => {\n const appts = [\n { id: \"1\", status: \"SCHEDULED\", doctorId: \"d1\", patientId: \"p1\", date: \"2026-08-20\" },\n { id: \"2\", status: \"COMPLETED\", doctorId: \"d2\", patientId: \"p2\", date: \"2026-08-01\" },\n { id: \"3\", status: \"SCHEDULED\", doctorId: \"d1\", patientId: \"p3\", date: \"2026-08-22\" }\n ];\n return appts.filter(a => a.status === status);\n },\n appointment: (_, { id }) => {\n const appts = [\n { id: \"1\", status: \"SCHEDULED\", doctorId: \"d1\", patientId: \"p1\", date: \"2026-08-20\" },\n { id: \"9\", status: \"SCHEDULED\", doctorId: \"d1\", patientId: \"missing\", date: \"2026-08-25\" }\n ];\n return appts.find(a => a.id === id) || null;\n }\n},\nAppointment: {\n doctor: (appt) => {\n const doctors = { d1: { id: \"d1\", name: \"Dr. Lee\", specialty: \"Cardiology\" }, d2: { id: \"d2\", name: \"Dr. Patel\", specialty: \"Dermatology\" } };\n return doctors[appt.doctorId] || null;\n },\n patient: (appt) => {\n const patients = { p1: { id: \"p1\", name: \"John\" }, p2: { id: \"p2\", name: \"Maria\" }, p3: { id: \"p3\", name: \"Sam\" } };\n return patients[appt.patientId] || null;\n }\n}","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Appointment.patient.\"}],\"data\":{\"appointment\":null}}","schema_definition":"enum AppointmentStatus { SCHEDULED COMPLETED CANCELLED }\n\ntype Patient {\n id: ID!\n name: String!\n}\n\ntype Doctor {\n id: ID!\n name: String!\n specialty: String!\n}\n\ntype Appointment {\n id: ID!\n status: AppointmentStatus!\n doctor: Doctor!\n patient: Patient!\n date: String!\n}\n\ntype Query {\n appointmentsByStatus(status: AppointmentStatus!): [Appointment!]!\n appointment(id: ID!): Appointment\n}"}} {"submissionId":"cmsx3es7n003hx3p2akoig43e","title":"Submission OIG43E","payload":{"sample_query":"query {\n shipments(status: IN_TRANSIT) {\n id\n totalWeight\n estimatedDays\n packages { description weightKg }\n }\n}","resolver_code":"Query: {\n shipments: (_, { status }) => {\n const shipments = [\n { id: \"s1\", status: \"IN_TRANSIT\", distanceKm: 1200, packageIds: [\"pk1\",\"pk2\"] },\n { id: \"s2\", status: \"DELIVERED\", distanceKm: 300, packageIds: [\"pk3\"] },\n { id: \"s3\", status: \"PENDING\", distanceKm: 4500, packageIds: [\"pk1\"] }\n ];\n return status ? shipments.filter(s => s.status === status) : shipments;\n }\n},\nShipment: {\n packages: (shipment) => {\n const packages = { pk1: { id: \"pk1\", weightKg: 5.5, description: \"Books\" }, pk2: { id: \"pk2\", weightKg: 2.1, description: \"Electronics\" }, pk3: { id: \"pk3\", weightKg: 10, description: \"Furniture\" } };\n return shipment.packageIds.map(id => packages[id]);\n },\n totalWeight: (shipment) => {\n const packages = { pk1: { id: \"pk1\", weightKg: 5.5, description: \"Books\" }, pk2: { id: \"pk2\", weightKg: 2.1, description: \"Electronics\" }, pk3: { id: \"pk3\", weightKg: 10, description: \"Furniture\" } };\n return shipment.packageIds.reduce((s, id) => s + packages[id].weightKg, 0);\n },\n estimatedDays: (shipment) => Math.ceil(shipment.distanceKm / 500)\n}","expected_response":"{\"data\":{\"shipments\":[{\"id\":\"s1\",\"totalWeight\":7.6,\"estimatedDays\":3,\"packages\":[{\"description\":\"Books\",\"weightKg\":5.5},{\"description\":\"Electronics\",\"weightKg\":2.1}]}]}}","schema_definition":"enum ShipmentStatus { PENDING IN_TRANSIT DELIVERED }\n\ntype Package {\n id: ID!\n weightKg: Float!\n description: String!\n}\n\ntype Shipment {\n id: ID!\n status: ShipmentStatus!\n packages: [Package!]!\n totalWeight: Float!\n estimatedDays: Int!\n}\n\ntype Query {\n shipments(status: ShipmentStatus): [Shipment!]!\n}"}} {"submissionId":"cmsx3es7n003ix3p2y8n7285k","title":"Submission N7285K","payload":{"sample_query":"query {\n listings(minPrice: 300000, type: HOUSE) {\n id\n price\n agent { name }\n }\n}","resolver_code":"Query: {\n listings: (_, { minPrice, maxPrice, type }) => {\n const listings = [\n { id: \"l1\", type: \"HOUSE\", price: 450000, agentId: \"a1\" },\n { id: \"l2\", type: \"APARTMENT\", price: 220000, agentId: \"a2\" },\n { id: \"l3\", type: \"CONDO\", price: 310000, agentId: \"a1\" },\n { id: \"l4\", type: \"HOUSE\", price: 610000, agentId: \"a2\" }\n ];\n return listings.filter(l =>\n (minPrice == null || l.price >= minPrice) &&\n (maxPrice == null || l.price <= maxPrice) &&\n (type == null || l.type === type)\n );\n }\n},\nListing: {\n agent: (listing) => {\n const agents = { a1: { id: \"a1\", name: \"Rita\" }, a2: { id: \"a2\", name: \"Sam\" } };\n return agents[listing.agentId];\n }\n}","expected_response":"{\"data\":{\"listings\":[{\"id\":\"l1\",\"price\":450000,\"agent\":{\"name\":\"Rita\"}},{\"id\":\"l4\",\"price\":610000,\"agent\":{\"name\":\"Sam\"}}]}}","schema_definition":"enum PropertyType { HOUSE APARTMENT CONDO }\n\ntype Agent { id: ID! name: String! }\n\ntype Listing {\n id: ID!\n type: PropertyType!\n price: Float!\n agent: Agent!\n}\n\ntype Query {\n listings(minPrice: Float, maxPrice: Float, type: PropertyType): [Listing!]!\n}"}} {"submissionId":"cmsx3es7n003jx3p2tsm0zu3w","title":"Submission M0ZU3W","payload":{"sample_query":"query {\n student(id: \"st1\") {\n name\n gpa\n enrollments {\n grade\n course { title credits }\n }\n }\n}","resolver_code":"Query: {\n student: (_, { id }) => {\n const students = {\n st1: { id: \"st1\", name: \"Dana\", enrollments: [ { courseId: \"c1\", grade: 3.7 }, { courseId: \"c2\", grade: 4.0 } ] }\n };\n return students[id] || null;\n }\n},\nStudent: {\n enrollments: (student) => {\n const courses = { c1: { id: \"c1\", title: \"Algorithms\", credits: 4 }, c2: { id: \"c2\", title: \"Databases\", credits: 3 } };\n return student.enrollments.map(e => ({ course: courses[e.courseId], grade: e.grade }));\n },\n gpa: (student) => {\n const courses = { c1: { id: \"c1\", title: \"Algorithms\", credits: 4 }, c2: { id: \"c2\", title: \"Databases\", credits: 3 } };\n const totalCredits = student.enrollments.reduce((s,e)=> s+courses[e.courseId].credits, 0);\n const points = student.enrollments.reduce((s,e)=> s + e.grade*courses[e.courseId].credits, 0);\n return Math.round((points/totalCredits)*100)/100;\n }\n}","expected_response":"{\"data\":{\"student\":{\"name\":\"Dana\",\"gpa\":3.83,\"enrollments\":[{\"grade\":3.7,\"course\":{\"title\":\"Algorithms\",\"credits\":4}},{\"grade\":4,\"course\":{\"title\":\"Databases\",\"credits\":3}}]}}}","schema_definition":"type Course { id: ID! title: String! credits: Int! }\n\ntype Enrollment {\n course: Course!\n grade: Float!\n}\n\ntype Student {\n id: ID!\n name: String!\n enrollments: [Enrollment!]!\n gpa: Float!\n}\n\ntype Query {\n student(id: ID!): Student\n}"}} {"submissionId":"cmsx3es7n003kx3p21sh85ghw","title":"Submission H85GHW","payload":{"sample_query":"query {\n devices(status: ONLINE) {\n id\n averageReading\n readings { value }\n }\n}","resolver_code":"Query: {\n devices: (_, { status }) => {\n const devices = [\n { id: \"d1\", status: \"ONLINE\", readingValues: [22.5, 23.1, 21.9] },\n { id: \"d2\", status: \"OFFLINE\", readingValues: [] },\n { id: \"d3\", status: \"ONLINE\", readingValues: [30.0, 29.5] }\n ];\n return status ? devices.filter(d => d.status === status) : devices;\n }\n},\nDevice: {\n readings: (device) => device.readingValues.map((v, idx) => ({ id: device.id + \"-r\" + idx, value: v })),\n averageReading: (device) => {\n if (device.readingValues.length === 0) return 0;\n const sum = device.readingValues.reduce((a,b)=>a+b,0);\n return Math.round((sum/device.readingValues.length)*100)/100;\n }\n}","expected_response":"{\"data\":{\"devices\":[{\"id\":\"d1\",\"averageReading\":22.5,\"readings\":[{\"value\":22.5},{\"value\":23.1},{\"value\":21.9}]},{\"id\":\"d3\",\"averageReading\":29.75,\"readings\":[{\"value\":30},{\"value\":29.5}]}]}}","schema_definition":"enum DeviceStatus { ONLINE OFFLINE MAINTENANCE }\n\ntype Reading { id: ID! value: Float! }\n\ntype Device {\n id: ID!\n status: DeviceStatus!\n readings: [Reading!]!\n averageReading: Float!\n}\n\ntype Query {\n devices(status: DeviceStatus): [Device!]!\n}"}} {"submissionId":"cmsx3es7n003mx3p233rrpirv","title":"Submission RRPIRV","payload":{"sample_query":"query {\n loan(id: \"ln2\") {\n dueDate\n book { title }\n }\n}","resolver_code":"Query: {\n loan: (_, { id }) => {\n const loans = [\n { id: \"ln1\", bookId: \"b1\", dueDate: \"2026-09-01\" },\n { id: \"ln2\", bookId: \"missing\", dueDate: \"2026-09-05\" }\n ];\n return loans.find(l => l.id === id) || null;\n }\n},\nLoan: {\n book: (loan) => {\n const books = { b1: { id: \"b1\", title: \"The Hobbit\", authorId: \"au1\" } };\n return books[loan.bookId] || null;\n }\n},\nBook: {\n author: (book) => {\n const authors = { au1: { id: \"au1\", name: \"J.R.R. Tolkien\" } };\n return authors[book.authorId];\n }\n}","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Loan.book.\"}],\"data\":{\"loan\":null}}","schema_definition":"type Author { id: ID! name: String! }\ntype Book { id: ID! title: String! author: Author! }\ntype Loan { id: ID! book: Book! dueDate: String! }\n\ntype Query {\n loan(id: ID!): Loan\n}"}} {"submissionId":"cmsx3es7o003nx3p2lne995zr","title":"Submission E995ZR","payload":{"sample_query":"query {\n order(id: \"o1\") {\n subtotal\n tax\n total\n lines {\n qty\n lineTotal\n item { name }\n }\n }\n}","resolver_code":"Query: {\n order: (_, { id }) => {\n const orders = { o1: { id: \"o1\", lines: [ { itemId: \"mi1\", qty: 2 }, { itemId: \"mi2\", qty: 1 } ] } };\n return orders[id] || null;\n }\n},\nDinerOrder: {\n lines: (order) => {\n const menu = { mi1: { id: \"mi1\", name: \"Burger\", price: 8.5 }, mi2: { id: \"mi2\", name: \"Fries\", price: 3.5 } };\n return order.lines.map(l => ({ item: menu[l.itemId], qty: l.qty, lineTotal: menu[l.itemId].price * l.qty }));\n },\n subtotal: (order) => {\n const menu = { mi1: { id: \"mi1\", name: \"Burger\", price: 8.5 }, mi2: { id: \"mi2\", name: \"Fries\", price: 3.5 } };\n return order.lines.reduce((s,l)=> s + menu[l.itemId].price*l.qty, 0);\n },\n tax: (order) => {\n const menu = { mi1: { id: \"mi1\", name: \"Burger\", price: 8.5 }, mi2: { id: \"mi2\", name: \"Fries\", price: 3.5 } };\n const subtotal = order.lines.reduce((s,l)=> s + menu[l.itemId].price*l.qty, 0);\n return Math.round(subtotal*0.08*100)/100;\n },\n total: (order) => {\n const menu = { mi1: { id: \"mi1\", name: \"Burger\", price: 8.5 }, mi2: { id: \"mi2\", name: \"Fries\", price: 3.5 } };\n const subtotal = order.lines.reduce((s,l)=> s + menu[l.itemId].price*l.qty, 0);\n const tax = Math.round(subtotal*0.08*100)/100;\n return Math.round((subtotal+tax)*100)/100;\n }\n}","expected_response":"{\"data\":{\"order\":{\"subtotal\":20.5,\"tax\":1.64,\"total\":22.14,\"lines\":[{\"qty\":2,\"lineTotal\":17,\"item\":{\"name\":\"Burger\"}},{\"qty\":1,\"lineTotal\":3.5,\"item\":{\"name\":\"Fries\"}}]}}}","schema_definition":"type MenuItem { id: ID! name: String! price: Float! }\ntype OrderLine { item: MenuItem! qty: Int! lineTotal: Float! }\ntype DinerOrder {\n id: ID!\n lines: [OrderLine!]!\n subtotal: Float!\n tax: Float!\n total: Float!\n}\n\ntype Query {\n order(id: ID!): DinerOrder\n}"}} {"submissionId":"cmsx3es7o003ox3p212449iqn","title":"Submission 449IQN","payload":{"sample_query":"query {\n booking(id: \"bk1\") {\n seatClass\n price\n flight { code }\n }\n}","resolver_code":"Query: {\n booking: (_, { id }) => {\n const bookings = { bk1: { id: \"bk1\", flightId: \"fl1\", seatClass: \"BUSINESS\" } };\n return bookings[id] || null;\n }\n},\nBooking: {\n flight: (b) => {\n const flights = { fl1: { id: \"fl1\", code: \"AB123\", basePrice: 200 } };\n return flights[b.flightId];\n },\n price: (b) => {\n const flights = { fl1: { id: \"fl1\", code: \"AB123\", basePrice: 200 } };\n const multipliers = { ECONOMY: 1, BUSINESS: 2.5, FIRST: 4 };\n return flights[b.flightId].basePrice * multipliers[b.seatClass];\n }\n}","expected_response":"{\"data\":{\"booking\":{\"seatClass\":\"BUSINESS\",\"price\":500,\"flight\":{\"code\":\"AB123\"}}}}","schema_definition":"enum SeatClass { ECONOMY BUSINESS FIRST }\ntype Flight { id: ID! code: String! basePrice: Float! }\ntype Booking {\n id: ID!\n flight: Flight!\n seatClass: SeatClass!\n price: Float!\n}\n\ntype Query {\n booking(id: ID!): Booking\n}"}} {"submissionId":"cmsx3es7o003px3p2ux94mvuc","title":"Submission 94MVUC","payload":{"sample_query":"query {\n jobs(remote: true) {\n title\n level\n company { name }\n }\n}","resolver_code":"Query: {\n jobs: (_, { remote, level }) => {\n const jobs = [\n { id: \"j1\", title: \"Backend Engineer\", remote: true, level: \"SENIOR\", companyId: \"c1\" },\n { id: \"j2\", title: \"Frontend Intern\", remote: false, level: \"JUNIOR\", companyId: \"c2\" },\n { id: \"j3\", title: \"SRE\", remote: true, level: \"MID\", companyId: \"c1\" }\n ];\n return jobs.filter(j => (remote == null || j.remote === remote) && (level == null || j.level === level));\n }\n},\nJobPosting: {\n company: (job) => {\n const companies = { c1: { id: \"c1\", name: \"Nimbus\" }, c2: { id: \"c2\", name: \"Acme\" } };\n return companies[job.companyId];\n }\n}","expected_response":"{\"data\":{\"jobs\":[{\"title\":\"Backend Engineer\",\"level\":\"SENIOR\",\"company\":{\"name\":\"Nimbus\"}},{\"title\":\"SRE\",\"level\":\"MID\",\"company\":{\"name\":\"Nimbus\"}}]}}","schema_definition":"enum ExperienceLevel { JUNIOR MID SENIOR }\ntype Company { id: ID! name: String! }\ntype JobPosting {\n id: ID!\n title: String!\n remote: Boolean!\n level: ExperienceLevel!\n company: Company!\n}\n\ntype Query {\n jobs(remote: Boolean, level: ExperienceLevel): [JobPosting!]!\n}"}} {"submissionId":"cmsx3es7o003qx3p2qh0glkce","title":"Submission 0GLKCE","payload":{"sample_query":"query {\n workout(id: \"w1\") {\n totalCalories\n entries {\n minutes\n caloriesBurned\n exercise { name }\n }\n }\n}","resolver_code":"Query: {\n workout: (_, { id }) => {\n const workouts = { w1: { id: \"w1\", entries: [ { exerciseId: \"e1\", minutes: 30 }, { exerciseId: \"e2\", minutes: 20 } ] } };\n return workouts[id] || null;\n }\n},\nWorkout: {\n entries: (w) => {\n const exercises = { e1: { id: \"e1\", name: \"Running\", caloriesPerMin: 10 }, e2: { id: \"e2\", name: \"Cycling\", caloriesPerMin: 8 } };\n return w.entries.map(e => ({ exercise: exercises[e.exerciseId], minutes: e.minutes, caloriesBurned: exercises[e.exerciseId].caloriesPerMin * e.minutes }));\n },\n totalCalories: (w) => {\n const exercises = { e1: { id: \"e1\", name: \"Running\", caloriesPerMin: 10 }, e2: { id: \"e2\", name: \"Cycling\", caloriesPerMin: 8 } };\n return w.entries.reduce((s,e)=> s + exercises[e.exerciseId].caloriesPerMin*e.minutes, 0);\n }\n}","expected_response":"{\"data\":{\"workout\":{\"totalCalories\":460,\"entries\":[{\"minutes\":30,\"caloriesBurned\":300,\"exercise\":{\"name\":\"Running\"}},{\"minutes\":20,\"caloriesBurned\":160,\"exercise\":{\"name\":\"Cycling\"}}]}}}","schema_definition":"type Exercise { id: ID! name: String! caloriesPerMin: Float! }\ntype WorkoutEntry { exercise: Exercise! minutes: Int! caloriesBurned: Float! }\ntype Workout {\n id: ID!\n entries: [WorkoutEntry!]!\n totalCalories: Float!\n}\n\ntype Query {\n workout(id: ID!): Workout\n}"}} {"submissionId":"cmsx3es7o003rx3p28ytiydyk","title":"Submission TIYDYK","payload":{"sample_query":"query {\n city(id: \"c1\") {\n avgTemp\n alertLevel\n forecasts { day tempC }\n }\n}","resolver_code":"Query: {\n city: (_, { id }) => {\n const cities = { c1: { id: \"c1\", name: \"Riverdale\", temps: [ { day: \"Mon\", tempC: 22 }, { day: \"Tue\", tempC: 38 }, { day: \"Wed\", tempC: 25 } ] } };\n return cities[id] || null;\n }\n},\nCity: {\n forecasts: (city) => city.temps,\n avgTemp: (city) => Math.round((city.temps.reduce((s,t)=>s+t.tempC,0)/city.temps.length)*100)/100,\n alertLevel: (city) => {\n const max = Math.max(...city.temps.map(t => t.tempC));\n if (max >= 35) return \"WARNING\";\n if (max >= 30) return \"WATCH\";\n return \"NONE\";\n }\n}","expected_response":"{\"data\":{\"city\":{\"avgTemp\":28.33,\"alertLevel\":\"WARNING\",\"forecasts\":[{\"day\":\"Mon\",\"tempC\":22},{\"day\":\"Tue\",\"tempC\":38},{\"day\":\"Wed\",\"tempC\":25}]}}}","schema_definition":"enum AlertLevel { NONE WATCH WARNING }\ntype Forecast { day: String! tempC: Float! }\ntype City {\n id: ID!\n name: String!\n forecasts: [Forecast!]!\n avgTemp: Float!\n alertLevel: AlertLevel!\n}\n\ntype Query {\n city(id: ID!): City\n}"}} {"submissionId":"cmsx3es7o003sx3p2cqwsczzv","title":"Submission WSCZZV","payload":{"sample_query":"mutation {\n makePayment(loanId: \"ln1\", amount: 2000) {\n remainingBalance\n }\n}","resolver_code":"Query: {\n loan: (_, { id }) => {\n const loans = { ln1: { id: \"ln1\", principal: 1000, paid: 200 } };\n return loans[id] || null;\n }\n},\nMutation: {\n makePayment: (_, { loanId, amount }) => {\n const loans = { ln1: { id: \"ln1\", principal: 1000, paid: 200 } };\n const loan = loans[loanId];\n if (!loan) throw new Error(\"Loan not found\");\n if (amount <= 0) throw new Error(\"Payment amount must be positive\");\n if (amount > (loan.principal - loan.paid)) throw new Error(\"Payment exceeds remaining balance\");\n loan.paid += amount;\n return loan;\n }\n},\nLoan: {\n remainingBalance: (loan) => loan.principal - loan.paid\n}","expected_response":"{\"errors\":[{\"message\":\"Payment exceeds remaining balance\"}],\"data\":null}","schema_definition":"type Loan { id: ID! principal: Float! paid: Float! remainingBalance: Float! }\n\ntype Query {\n loan(id: ID!): Loan\n}\n\ntype Mutation {\n makePayment(loanId: ID!, amount: Float!): Loan!\n}"}} {"submissionId":"cmsx3es7o003ux3p2nmdkkq3p","title":"Submission DKKQ3P","payload":{"sample_query":"query {\n pets(status: AVAILABLE) {\n name\n shelter { name }\n }\n}","resolver_code":"Query: {\n pets: (_, { status }) => {\n const pets = [\n { id: \"p1\", name: \"Rex\", status: \"AVAILABLE\", shelterId: \"s1\" },\n { id: \"p2\", name: \"Milo\", status: \"ADOPTED\", shelterId: \"s2\" },\n { id: \"p3\", name: \"Luna\", status: \"AVAILABLE\", shelterId: \"s1\" }\n ];\n return status ? pets.filter(p => p.status === status) : pets;\n }\n},\nPet: {\n shelter: (pet) => {\n const shelters = { s1: { id: \"s1\", name: \"Happy Paws\" }, s2: { id: \"s2\", name: \"Second Chance\" } };\n return shelters[pet.shelterId];\n }\n}","expected_response":"{\"data\":{\"pets\":[{\"name\":\"Rex\",\"shelter\":{\"name\":\"Happy Paws\"}},{\"name\":\"Luna\",\"shelter\":{\"name\":\"Happy Paws\"}}]}}","schema_definition":"enum PetStatus { AVAILABLE PENDING ADOPTED }\ntype Shelter { id: ID! name: String! }\ntype Pet {\n id: ID!\n name: String!\n status: PetStatus!\n shelter: Shelter!\n}\n\ntype Query {\n pets(status: PetStatus): [Pet!]!\n}"}} {"submissionId":"cmsx3es7o003vx3p24cmfjznp","title":"Submission MFJZNP","payload":{"sample_query":"query {\n rental(id: \"r1\") {\n days\n cost\n vehicle { make }\n }\n}","resolver_code":"Query: {\n rental: (_, { id }) => {\n const rentals = { r1: { id: \"r1\", vehicleId: \"v1\", days: 5 } };\n return rentals[id] || null;\n }\n},\nRental: {\n vehicle: (r) => {\n const vehicles = { v1: { id: \"v1\", make: \"Toyota Corolla\", dailyRate: 45 } };\n return vehicles[r.vehicleId];\n },\n cost: (r) => {\n const vehicles = { v1: { id: \"v1\", make: \"Toyota Corolla\", dailyRate: 45 } };\n return vehicles[r.vehicleId].dailyRate * r.days;\n }\n}","expected_response":"{\"data\":{\"rental\":{\"days\":5,\"cost\":225,\"vehicle\":{\"make\":\"Toyota Corolla\"}}}}","schema_definition":"type Vehicle { id: ID! make: String! dailyRate: Float! }\ntype Rental {\n id: ID!\n vehicle: Vehicle!\n days: Int!\n cost: Float!\n}\n\ntype Query {\n rental(id: ID!): Rental\n}"}} {"submissionId":"cmsx3es7o003wx3p2qg1kjgfy","title":"Submission 1KJGFY","payload":{"sample_query":"query {\n reservation(id: \"res2\") {\n nights\n room { type }\n }\n}","resolver_code":"Query: {\n reservation: (_, { id }) => {\n const reservations = [\n { id: \"res1\", roomId: \"rm1\", nights: 3 },\n { id: \"res2\", roomId: \"rmX\", nights: 2 }\n ];\n return reservations.find(r => r.id === id) || null;\n }\n},\nReservation: {\n room: (res) => {\n const rooms = { rm1: { id: \"rm1\", type: \"DELUXE\", rate: 150 } };\n return rooms[res.roomId] || null;\n },\n totalCost: (res) => {\n const rooms = { rm1: { id: \"rm1\", type: \"DELUXE\", rate: 150 } };\n const room = rooms[res.roomId];\n if (!room) throw new Error(\"Room not found for reservation\");\n return room.rate * res.nights;\n }\n}","expected_response":"{\"errors\":[{\"message\":\"Cannot return null for non-nullable field Reservation.room.\"}],\"data\":{\"reservation\":null}}","schema_definition":"enum RoomType { STANDARD DELUXE SUITE }\ntype Room { id: ID! type: RoomType! rate: Float! }\ntype Reservation {\n id: ID!\n room: Room!\n nights: Int!\n totalCost: Float!\n}\n\ntype Query {\n reservation(id: ID!): Reservation\n}"}} {"submissionId":"cmsx3es7o003xx3p2efh9gji1","title":"Submission H9GJI1","payload":{"sample_query":"query {\n policy(id: \"pol1\") {\n holder\n totalApproved\n claims { status amount }\n }\n}","resolver_code":"Query: {\n policy: (_, { id }) => {\n const policies = { pol1: { id: \"pol1\", holder: \"Grace\", claimData: [ { id: \"cl1\", status: \"APPROVED\", amount: 500 }, { id: \"cl2\", status: \"DENIED\", amount: 1200 }, { id: \"cl3\", status: \"APPROVED\", amount: 300 } ] } };\n return policies[id] || null;\n }\n},\nPolicy: {\n claims: (policy) => policy.claimData,\n totalApproved: (policy) => policy.claimData.filter(c => c.status === \"APPROVED\").reduce((s,c)=>s+c.amount,0)\n}","expected_response":"{\"data\":{\"policy\":{\"holder\":\"Grace\",\"totalApproved\":800,\"claims\":[{\"status\":\"APPROVED\",\"amount\":500},{\"status\":\"DENIED\",\"amount\":1200},{\"status\":\"APPROVED\",\"amount\":300}]}}}","schema_definition":"enum ClaimStatus { FILED UNDER_REVIEW APPROVED DENIED }\ntype Claim { id: ID! status: ClaimStatus! amount: Float! }\ntype Policy {\n id: ID!\n holder: String!\n claims: [Claim!]!\n totalApproved: Float!\n}\n\ntype Query {\n policy(id: ID!): Policy\n}"}} {"submissionId":"cmsx3es7o003yx3p2ll41is47","title":"Submission 41IS47","payload":{"sample_query":"query {\n standings {\n name\n points\n }\n}","resolver_code":"Query: {\n standings: () => {\n const teams = [\n { id: \"tm1\", name: \"Falcons\", wins: 5, draws: 2, losses: 1 },\n { id: \"tm2\", name: \"Wolves\", wins: 3, draws: 3, losses: 2 },\n { id: \"tm3\", name: \"Sharks\", wins: 6, draws: 0, losses: 2 }\n ];\n return teams.slice().sort((a,b) => (b.wins*3+b.draws) - (a.wins*3+a.draws));\n }\n},\nTeam: {\n points: (team) => team.wins * 3 + team.draws\n}","expected_response":"{\"data\":{\"standings\":[{\"name\":\"Sharks\",\"points\":18},{\"name\":\"Falcons\",\"points\":17},{\"name\":\"Wolves\",\"points\":12}]}}","schema_definition":"type Team {\n id: ID!\n name: String!\n wins: Int!\n draws: Int!\n losses: Int!\n points: Int!\n}\n\ntype Query {\n standings: [Team!]!\n}"}} {"submissionId":"cmsx3es7o003zx3p20d4mzxnp","title":"Submission 4MZXNP","payload":{"sample_query":"query {\n recipes(cuisine: ITALIAN) {\n title\n totalCalories\n ingredients { name }\n }\n}","resolver_code":"Query: {\n recipes: (_, { cuisine }) => {\n const recipes = [\n { id: \"r1\", title: \"Margherita Pizza\", cuisine: \"ITALIAN\", ingredientData: [ { name: \"Dough\", calories: 300 }, { name: \"Cheese\", calories: 250 } ] },\n { id: \"r2\", title: \"Tacos\", cuisine: \"MEXICAN\", ingredientData: [ { name: \"Tortilla\", calories: 150 }, { name: \"Beef\", calories: 280 } ] },\n { id: \"r3\", title: \"Lasagna\", cuisine: \"ITALIAN\", ingredientData: [ { name: \"Pasta\", calories: 350 }, { name: \"Sauce\", calories: 180 } ] }\n ];\n return cuisine ? recipes.filter(r => r.cuisine === cuisine) : recipes;\n }\n},\nRecipe: {\n ingredients: (recipe) => recipe.ingredientData,\n totalCalories: (recipe) => recipe.ingredientData.reduce((s,i)=>s+i.calories,0)\n}","expected_response":"{\"data\":{\"recipes\":[{\"title\":\"Margherita Pizza\",\"totalCalories\":550,\"ingredients\":[{\"name\":\"Dough\"},{\"name\":\"Cheese\"}]},{\"title\":\"Lasagna\",\"totalCalories\":530,\"ingredients\":[{\"name\":\"Pasta\"},{\"name\":\"Sauce\"}]}]}}","schema_definition":"enum Cuisine { ITALIAN MEXICAN INDIAN }\ntype Ingredient { name: String! calories: Int! }\ntype Recipe {\n id: ID!\n title: String!\n cuisine: Cuisine!\n ingredients: [Ingredient!]!\n totalCalories: Int!\n}\n\ntype Query {\n recipes(cuisine: Cuisine): [Recipe!]!\n}"}} {"submissionId":"cmsx3es7o0040x3p2m0cc5n27","title":"Submission CC5N27","payload":{"sample_query":"mutation {\n moveItem(itemId: \"it1\", toBinId: \"bin1\", quantity: 20) {\n currentLoad\n }\n}","resolver_code":"Query: {\n bin: (_, { id }) => {\n const bins = { bin1: { id: \"bin1\", capacity: 100, currentLoad: 90 } };\n return bins[id] || null;\n }\n},\nMutation: {\n moveItem: (_, { itemId, toBinId, quantity }) => {\n const bins = { bin1: { id: \"bin1\", capacity: 100, currentLoad: 90 } };\n const items = { it1: { id: \"it1\", name: \"Pallet\", quantity: 50 } };\n const bin = bins[toBinId];\n if (!bin) throw new Error(\"Destination bin not found\");\n const item = items[itemId];\n if (!item) throw new Error(\"Item not found\");\n if (bin.currentLoad + quantity > bin.capacity) throw new Error(\"Bin capacity exceeded\");\n bin.currentLoad += quantity;\n return bin;\n }\n},\nBin: {\n currentLoad: (bin) => bin.currentLoad\n}","expected_response":"{\"errors\":[{\"message\":\"Bin capacity exceeded\"}],\"data\":null}","schema_definition":"type Bin { id: ID! capacity: Int! currentLoad: Int! }\ntype Item { id: ID! name: String! quantity: Int! }\n\ntype Query {\n bin(id: ID!): Bin\n}\n\ntype Mutation {\n moveItem(itemId: ID!, toBinId: ID!, quantity: Int!): Bin!\n}"}} {"submissionId":"cmsx3es7o0041x3p24dk0o9to","title":"Submission K0O9TO","payload":{"sample_query":"query {\n event(id: \"ev1\") {\n name\n availableTickets\n status\n venue { name }\n }\n}","resolver_code":"Query: {\n event: (_, { id }) => {\n const events = { ev1: { id: \"ev1\", name: \"Indie Fest\", capacity: 200, sold: 180, venueId: \"v1\" } };\n return events[id] || null;\n }\n},\nEvent: {\n venue: (e) => {\n const venues = { v1: { id: \"v1\", name: \"Downtown Hall\" } };\n return venues[e.venueId];\n },\n availableTickets: (e) => e.capacity - e.sold,\n status: (e) => (e.capacity - e.sold <= 0 ? \"SOLD_OUT\" : \"AVAILABLE\")\n}","expected_response":"{\"data\":{\"event\":{\"name\":\"Indie Fest\",\"availableTickets\":20,\"status\":\"AVAILABLE\",\"venue\":{\"name\":\"Downtown Hall\"}}}}","schema_definition":"enum TicketStatus { AVAILABLE SOLD_OUT }\ntype Venue { id: ID! name: String! }\ntype Event {\n id: ID!\n name: String!\n capacity: Int!\n sold: Int!\n availableTickets: Int!\n status: TicketStatus!\n venue: Venue!\n}\n\ntype Query {\n event(id: ID!): Event\n}"}} {"submissionId":"cmsx3es7o0042x3p2h2lrllw2","title":"Submission LRLLW2","payload":{"sample_query":"query {\n deals(stage: NEGOTIATION) {\n value\n probability\n weightedValue\n contact { name }\n }\n}","resolver_code":"Query: {\n deals: (_, { stage }) => {\n const deals = [\n { id: \"d1\", stage: \"NEGOTIATION\", value: 10000, probability: 0.6, contactId: \"ct1\" },\n { id: \"d2\", stage: \"PROSPECT\", value: 5000, probability: 0.2, contactId: \"ct2\" },\n { id: \"d3\", stage: \"NEGOTIATION\", value: 20000, probability: 0.75, contactId: \"ct1\" }\n ];\n return stage ? deals.filter(d => d.stage === stage) : deals;\n }\n},\nDeal: {\n contact: (deal) => {\n const contacts = { ct1: { id: \"ct1\", name: \"Priya\" }, ct2: { id: \"ct2\", name: \"Omar\" } };\n return contacts[deal.contactId];\n },\n weightedValue: (deal) => Math.round(deal.value * deal.probability * 100) / 100\n}","expected_response":"{\"data\":{\"deals\":[{\"value\":10000,\"probability\":0.6,\"weightedValue\":6000,\"contact\":{\"name\":\"Priya\"}},{\"value\":20000,\"probability\":0.75,\"weightedValue\":15000,\"contact\":{\"name\":\"Priya\"}}]}}","schema_definition":"enum DealStage { PROSPECT NEGOTIATION CLOSED_WON CLOSED_LOST }\ntype Contact { id: ID! name: String! }\ntype Deal {\n id: ID!\n stage: DealStage!\n value: Float!\n probability: Float!\n weightedValue: Float!\n contact: Contact!\n}\n\ntype Query {\n deals(stage: DealStage): [Deal!]!\n}"}} {"submissionId":"cmsx3es7o0043x3p2v3xwze95","title":"Submission XWZE95","payload":{"sample_query":"query {\n invoice(id: \"inv1\") {\n daysUsed\n proratedCharge\n plan { tier monthlyPrice }\n }\n}","resolver_code":"Query: {\n invoice: (_, { id }) => {\n const invoices = { inv1: { id: \"inv1\", planId: \"pl2\", daysUsed: 10 } };\n return invoices[id] || null;\n }\n},\nInvoice: {\n plan: (inv) => {\n const plans = { pl2: { id: \"pl2\", tier: \"PRO\", monthlyPrice: 60 } };\n return plans[inv.planId];\n },\n proratedCharge: (inv) => {\n const plans = { pl2: { id: \"pl2\", tier: \"PRO\", monthlyPrice: 60 } };\n const plan = plans[inv.planId];\n return Math.round((plan.monthlyPrice / 30) * inv.daysUsed * 100) / 100;\n }\n}","expected_response":"{\"data\":{\"invoice\":{\"daysUsed\":10,\"proratedCharge\":20,\"plan\":{\"tier\":\"PRO\",\"monthlyPrice\":60}}}}","schema_definition":"enum PlanTier { BASIC PRO ENTERPRISE }\ntype Plan { id: ID! tier: PlanTier! monthlyPrice: Float! }\ntype Invoice {\n id: ID!\n plan: Plan!\n daysUsed: Int!\n proratedCharge: Float!\n}\n\ntype Query {\n invoice(id: ID!): Invoice\n}"}} {"submissionId":"cmsx3es7o0044x3p21p8p7fa5","title":"Submission 8P7FA5","payload":{"sample_query":"query {\n poll(id: \"pl1\") {\n totalVotes\n options { label votes percentage }\n }\n}","resolver_code":"Query: {\n poll: (_, { id }) => {\n const polls = { pl1: { id: \"pl1\", question: \"Best season?\", optionData: [ { id: \"o1\", label: \"Summer\", votes: 30 }, { id: \"o2\", label: \"Winter\", votes: 10 }, { id: \"o3\", label: \"Fall\", votes: 20 } ] } };\n return polls[id] || null;\n }\n},\nPoll: {\n options: (poll) => {\n const total = poll.optionData.reduce((s,o)=>s+o.votes,0);\n return poll.optionData.map(o => ({ id: o.id, label: o.label, votes: o.votes, percentage: total === 0 ? 0 : Math.round((o.votes/total)*10000)/100 }));\n },\n totalVotes: (poll) => poll.optionData.reduce((s,o)=>s+o.votes,0)\n}","expected_response":"{\"data\":{\"poll\":{\"totalVotes\":60,\"options\":[{\"label\":\"Summer\",\"votes\":30,\"percentage\":50},{\"label\":\"Winter\",\"votes\":10,\"percentage\":16.67},{\"label\":\"Fall\",\"votes\":20,\"percentage\":33.33}]}}}","schema_definition":"type Option { id: ID! label: String! votes: Int! percentage: Float! }\ntype Poll {\n id: ID!\n question: String!\n options: [Option!]!\n totalVotes: Int!\n}\n\ntype Query {\n poll(id: ID!): Poll\n}"}} {"submissionId":"cmsx3es7o0045x3p2d2at8rgp","title":"Submission AT8RGP","payload":{"sample_query":"query {\n channel(id: \"ch1\") {\n name\n messageCount\n messages {\n text\n sender { username }\n }\n }\n}","resolver_code":"Query: {\n channel: (_, { id }) => {\n const channels = { ch1: { id: \"ch1\", name: \"general\", messageData: [ { id: \"m1\", text: \"Hello!\", senderId: \"u1\" }, { id: \"m2\", text: \"Hey there\", senderId: \"u2\" } ] } };\n return channels[id] || null;\n }\n},\nChannel: {\n messages: (channel) => channel.messageData,\n messageCount: (channel) => channel.messageData.length\n},\nMessage: {\n sender: (msg) => {\n const users = { u1: { id: \"u1\", username: \"alice_w\" }, u2: { id: \"u2\", username: \"bob_t\" } };\n return users[msg.senderId];\n }\n}","expected_response":"{\"data\":{\"channel\":{\"name\":\"general\",\"messageCount\":2,\"messages\":[{\"text\":\"Hello!\",\"sender\":{\"username\":\"alice_w\"}},{\"text\":\"Hey there\",\"sender\":{\"username\":\"bob_t\"}}]}}}","schema_definition":"interface Node { id: ID! }\ntype User implements Node { id: ID! username: String! }\ntype Message implements Node {\n id: ID!\n text: String!\n sender: User!\n}\ntype Channel {\n id: ID!\n name: String!\n messages: [Message!]!\n messageCount: Int!\n}\n\ntype Query {\n channel(id: ID!): Channel\n}"}} {"submissionId":"cmsx3es7o0046x3p2e8p8j8h6","title":"Submission P8J8H6","payload":{"sample_query":"query {\n purchaseOrders(status: SHIPPED) {\n quantity\n unitCost\n totalCost\n supplier { name }\n }\n}","resolver_code":"Query: {\n purchaseOrders: (_, { status }) => {\n const pos = [\n { id: \"po1\", status: \"SHIPPED\", supplierId: \"sp1\", quantity: 100, unitCost: 2.5 },\n { id: \"po2\", status: \"ORDERED\", supplierId: \"sp2\", quantity: 50, unitCost: 5 },\n { id: \"po3\", status: \"SHIPPED\", supplierId: \"sp1\", quantity: 200, unitCost: 1.2 }\n ];\n return status ? pos.filter(p => p.status === status) : pos;\n }\n},\nPurchaseOrder: {\n supplier: (po) => {\n const suppliers = { sp1: { id: \"sp1\", name: \"Acme Supplies\" }, sp2: { id: \"sp2\", name: \"Global Parts\" } };\n return suppliers[po.supplierId];\n },\n totalCost: (po) => Math.round(po.quantity * po.unitCost * 100) / 100\n}","expected_response":"{\"data\":{\"purchaseOrders\":[{\"quantity\":100,\"unitCost\":2.5,\"totalCost\":250,\"supplier\":{\"name\":\"Acme Supplies\"}},{\"quantity\":200,\"unitCost\":1.2,\"totalCost\":240,\"supplier\":{\"name\":\"Acme Supplies\"}}]}}","schema_definition":"enum SupplyStatus { ORDERED SHIPPED RECEIVED }\ntype Supplier { id: ID! name: String! }\ntype PurchaseOrder {\n id: ID!\n status: SupplyStatus!\n supplier: Supplier!\n quantity: Int!\n unitCost: Float!\n totalCost: Float!\n}\n\ntype Query {\n purchaseOrders(status: SupplyStatus): [PurchaseOrder!]!\n}"}} {"submissionId":"cmsx3es7o0047x3p2c5428h4m","title":"Submission 428H4M","payload":{"sample_query":"query {\n researcher(id: \"rs1\") {\n name\n hIndex\n publications { title citations }\n }\n}","resolver_code":"Query: {\n researcher: (_, { id }) => {\n const researchers = { rs1: { id: \"rs1\", name: \"Dr. Chen\", pubData: [ { id: \"pub1\", title: \"Paper A\", citations: 15 }, { id: \"pub2\", title: \"Paper B\", citations: 3 }, { id: \"pub3\", title: \"Paper C\", citations: 8 }, { id: \"pub4\", title: \"Paper D\", citations: 1 } ] } };\n return researchers[id] || null;\n }\n},\nResearcher: {\n publications: (r) => r.pubData,\n hIndex: (r) => {\n const sorted = r.pubData.map(p => p.citations).sort((a,b) => b-a);\n let h = 0;\n for (let i = 0; i < sorted.length; i++) {\n if (sorted[i] >= i + 1) h = i + 1;\n }\n return h;\n }\n}","expected_response":"{\"data\":{\"researcher\":{\"name\":\"Dr. Chen\",\"hIndex\":3,\"publications\":[{\"title\":\"Paper A\",\"citations\":15},{\"title\":\"Paper B\",\"citations\":3},{\"title\":\"Paper C\",\"citations\":8},{\"title\":\"Paper D\",\"citations\":1}]}}}","schema_definition":"type Publication { id: ID! title: String! citations: Int! }\ntype Researcher {\n id: ID!\n name: String!\n publications: [Publication!]!\n hIndex: Int!\n}\n\ntype Query {\n researcher(id: ID!): Researcher\n}"}} {"submissionId":"cmsx3es7o0048x3p2ygh3ml8o","title":"Submission H3ML8O","payload":{"sample_query":"mutation {\n reserveSpot(lotId: \"lot1\", spotId: \"sp1\") {\n availableSpots\n spots { id status }\n }\n}","resolver_code":"Query: {\n parkingLot: (_, { id }) => {\n const lots = { lot1: { id: \"lot1\", name: \"Main Garage\", spotData: [ { id: \"sp1\", status: \"FREE\" }, { id: \"sp2\", status: \"OCCUPIED\" }, { id: \"sp3\", status: \"FREE\" } ] } };\n return lots[id] || null;\n }\n},\nMutation: {\n reserveSpot: (_, { lotId, spotId }) => {\n const lots = { lot1: { id: \"lot1\", name: \"Main Garage\", spotData: [ { id: \"sp1\", status: \"FREE\" }, { id: \"sp2\", status: \"OCCUPIED\" }, { id: \"sp3\", status: \"FREE\" } ] } };\n const lot = lots[lotId];\n if (!lot) throw new Error(\"Lot not found\");\n const spot = lot.spotData.find(s => s.id === spotId);\n if (!spot) throw new Error(\"Spot not found\");\n if (spot.status !== \"FREE\") throw new Error(\"Spot is not available\");\n spot.status = \"RESERVED\";\n return lot;\n }\n},\nParkingLot: {\n spots: (lot) => lot.spotData,\n availableSpots: (lot) => lot.spotData.filter(s => s.status === \"FREE\").length\n}","expected_response":"{\"data\":{\"reserveSpot\":{\"availableSpots\":1,\"spots\":[{\"id\":\"sp1\",\"status\":\"RESERVED\"},{\"id\":\"sp2\",\"status\":\"OCCUPIED\"},{\"id\":\"sp3\",\"status\":\"FREE\"}]}}}","schema_definition":"enum SpotStatus { FREE OCCUPIED RESERVED }\ntype Spot { id: ID! status: SpotStatus! }\ntype ParkingLot {\n id: ID!\n name: String!\n spots: [Spot!]!\n availableSpots: Int!\n}\n\ntype Query {\n parkingLot(id: ID!): ParkingLot\n}\n\ntype Mutation {\n reserveSpot(lotId: ID!, spotId: ID!): ParkingLot!\n}"}} {"submissionId":"cmsx3es7o0049x3p2keayx8pt","title":"Submission AYX8PT","payload":{"sample_query":"query {\n plant(id: \"pp1\") {\n name\n efficiency\n readings { hour outputMw }\n }\n}","resolver_code":"Query: {\n plant: (_, { id }) => {\n const plants = { pp1: { id: \"pp1\", name: \"Solar One\", capacityMw: 500, readingData: [ { hour: 8, outputMw: 300 }, { hour: 12, outputMw: 480 }, { hour: 16, outputMw: 350 } ] } };\n return plants[id] || null;\n }\n},\nPowerPlant: {\n readings: (p) => p.readingData,\n efficiency: (p) => {\n const avgOutput = p.readingData.reduce((s,r)=>s+r.outputMw,0) / p.readingData.length;\n return Math.round((avgOutput / p.capacityMw) * 10000) / 100;\n }\n}","expected_response":"{\"data\":{\"plant\":{\"name\":\"Solar One\",\"efficiency\":75.33,\"readings\":[{\"hour\":8,\"outputMw\":300},{\"hour\":12,\"outputMw\":480},{\"hour\":16,\"outputMw\":350}]}}}","schema_definition":"type Reading { hour: Int! outputMw: Float! }\ntype PowerPlant {\n id: ID!\n name: String!\n capacityMw: Float!\n readings: [Reading!]!\n efficiency: Float!\n}\n\ntype Query {\n plant(id: ID!): PowerPlant\n}"}} {"submissionId":"cmsx7cmeh001lkup2ls6y6gce","title":"Submission 6Y6GCE","payload":{"sample_query":"{ inbox { id ... on Email { subject } ... on SMS { phone } } }","resolver_code":"Query: { inbox: () => [{id:'1',subject:'Hi',__typename:'Email'},{id:'2',phone:'555',__typename:'SMS'}] }","expected_response":"{\"data\":{\"inbox\":[{\"id\":\"1\",\"subject\":\"Hi\"},{\"id\":\"2\",\"phone\":\"555\"}]}}","schema_definition":"interface Notification { id: ID! }\ntype Email implements Notification { id: ID!, subject: String! }\ntype SMS implements Notification { id: ID!, phone: String! }\ntype Query { inbox: [Notification!]! }"}} {"submissionId":"cmsx7cmeh001mkup2km7656mt","title":"Submission 7656MT","payload":{"sample_query":"{ search(q: \"d\") { ... on Book { title } ... on Author { name } } }","resolver_code":"Query: { search: (_, {q}) => [{title:'Dune',__typename:'Book'},{name:'Herbert',__typename:'Author'}] }","expected_response":"{\"data\":{\"search\":[{\"title\":\"Dune\"},{\"name\":\"Herbert\"}]}}","schema_definition":"type Book { title: String! }\ntype Author { name: String! }\nunion Result = Book | Author\ntype Query { search(q: String!): [Result!]! }"}} {"submissionId":"cmsx7cmeh001rkup24v7xuus2","title":"Submission 7XUUS2","payload":{"sample_query":"{ shapes { area ... on Circle { radius } ... on Square { side } } }","resolver_code":"Query: { shapes: () => [{area:12.56,radius:2,__typename:'Circle'},{area:9,side:3,__typename:'Square'}] }","expected_response":"{\"data\":{\"shapes\":[{\"area\":12.56,\"radius\":2},{\"area\":9,\"side\":3}]}}","schema_definition":"interface Shape { area: Float! }\ntype Circle implements Shape { area: Float!, radius: Float! }\ntype Square implements Shape { area: Float!, side: Float! }\ntype Query { shapes: [Shape!]! }"}} {"submissionId":"cmsx7cmeh002akup2c3znlyt3","title":"Submission ZNLYT3","payload":{"sample_query":"{ pets { name ... on Dog { breed } ... on Cat { indoor } } }","resolver_code":"Query: { pets: () => [{name:'Rex',breed:'Lab',__typename:'Dog'},{name:'Mia',indoor:true,__typename:'Cat'}] }","expected_response":"{\"data\":{\"pets\":[{\"name\":\"Rex\",\"breed\":\"Lab\"},{\"name\":\"Mia\",\"indoor\":true}]}}","schema_definition":"interface Animal { name: String! }\ntype Dog implements Animal { name: String!, breed: String! }\ntype Cat implements Animal { name: String!, indoor: Boolean! }\ntype Query { pets: [Animal!]! }"}} {"submissionId":"cmsx7cmeh002ekup204k59boa","title":"Submission K59BOA","payload":{"sample_query":"{ feed { __typename ... on Vid { secs } ... on Img { url } } }","resolver_code":"Query: { feed: () => [{url:'a.png',__typename:'Img'},{url:'b.mp4',secs:30,__typename:'Vid'}] }","expected_response":"{\"data\":{\"feed\":[{\"__typename\":\"Img\",\"url\":\"a.png\"},{\"__typename\":\"Vid\",\"secs\":30}]}}","schema_definition":"type Img { url: String! }\ntype Vid { url: String!, secs: Int! }\nunion Media = Img | Vid\ntype Query { feed: [Media!]! }"}} {"submissionId":"cmsxlj7v900jekup2y6hms18p","title":"Submission HMS18P","payload":{"sample_query":"{ trimmedSummary(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 3, limit: 2) { values metric label flags } }","resolver_code":"Query: { trimmedSummary: (_, {values, threshold, limit}) => { const s=[...values].sort((a,b)=>a-b), k=Math.min(limit,Math.floor((s.length-1)/2)), kept=s.slice(k,s.length-k); return {values:kept,metric:kept.reduce((a,b)=>a+b,0)/kept.length,label:'trimmed-mean',flags:s.filter(x=>Math.abs(x-threshold)>threshold).map(String)}; } }","expected_response":"{\"data\":{\"trimmedSummary\":{\"values\":[7,8,9,10,18,20],\"metric\":12,\"label\":\"trimmed-mean\",\"flags\":[\"-5\",\"7\",\"8\",\"9\",\"10\",\"18\",\"20\",\"25\",\"32\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { trimmedSummary(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jfkup263kz1sgo","title":"Submission KZ1SGO","payload":{"sample_query":"{ winsorizedSpread(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 4, limit: 3) { values metric label flags } }","resolver_code":"Query: { winsorizedSpread: (_, {values, threshold, limit}) => { const s=[...values].sort((a,b)=>a-b),k=Math.min(limit,s.length-1),lo=s[k],hi=s[s.length-1-k],w=s.map(x=>Math.max(lo,Math.min(hi,x))); return {values:w,metric:Math.max(...w)-Math.min(...w),label:'winsorized-range',flags:w.map((x,i)=>x!==s[i]?'clamped-'+i:null).filter(Boolean)}; } }","expected_response":"{\"data\":{\"winsorizedSpread\":{\"values\":[9,9,9,9,10,11,16,16,16,16],\"metric\":7,\"label\":\"winsorized-range\",\"flags\":[\"clamped-0\",\"clamped-1\",\"clamped-2\",\"clamped-7\",\"clamped-8\",\"clamped-9\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { winsorizedSpread(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jgkup2qxr1jlx3","title":"Submission R1JLX3","payload":{"sample_query":"{ rollingSpikeScan(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 5, limit: 4) { values metric label flags } }","resolver_code":"Query: { rollingSpikeScan: (_, {values, threshold, limit}) => { const out=[],flags=[]; for(let i=limit;ia+b,0)/limit;if(Math.abs(values[i]-base)>=threshold){out.push(values[i]);flags.push('index:'+i)}} return {values:out,metric:out.length,label:'rolling-spikes',flags}; } }","expected_response":"{\"data\":{\"rollingSpikeScan\":{\"values\":[17,3,27,29,4],\"metric\":5,\"label\":\"rolling-spikes\",\"flags\":[\"index:4\",\"index:5\",\"index:6\",\"index:8\",\"index:9\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { rollingSpikeScan(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jhkup2bpgkkdfx","title":"Submission GKKDFX","payload":{"sample_query":"{ longestQualifiedRun(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 6, limit: 5) { values metric label flags } }","resolver_code":"Query: { longestQualifiedRun: (_, {values, threshold, limit}) => { let best=[],cur=[]; for(const x of values){if(x>=threshold){cur.push(x);if(cur.length>best.length)best=[...cur]}else cur=[]} return {values:best.slice(0,limit),metric:best.length,label:'longest-run',flags:best.length>limit?['truncated']:[]}; } }","expected_response":"{\"data\":{\"longestQualifiedRun\":{\"values\":[16,6,18],\"metric\":3,\"label\":\"longest-run\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { longestQualifiedRun(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jikup2ybj59we7","title":"Submission J59WE7","payload":{"sample_query":"{ stableTopK(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 7, limit: 2) { values metric label flags } }","resolver_code":"Query: { stableTopK: (_, {values, threshold, limit}) => { const ranked=values.map((v,i)=>({v,i})).filter(x=>x.v>=threshold).sort((a,b)=>b.v-a.v||a.i-b.i).slice(0,limit);return {values:ranked.map(x=>x.v),metric:ranked.reduce((a,x)=>a+x.v,0),label:'stable-top-k',flags:ranked.map(x=>'source:'+x.i)}; } }","expected_response":"{\"data\":{\"stableTopK\":{\"values\":[31,24],\"metric\":55,\"label\":\"stable-top-k\",\"flags\":[\"source:8\",\"source:6\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { stableTopK(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jjkup254uuxxma","title":"Submission UUXXMA","payload":{"sample_query":"{ distinctFrequencyLeaders(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 8, limit: 3) { values metric label flags } }","resolver_code":"Query: { distinctFrequencyLeaders: (_, {values, threshold, limit}) => { const m=new Map();values.forEach((v,i)=>{const x=m.get(v)||{n:0,first:i};x.n++;m.set(v,x)});const r=[...m].filter(([v,x])=>x.n>=threshold).sort((a,b)=>b[1].n-a[1].n||a[1].first-b[1].first).slice(0,limit);return {values:r.map(x=>x[0]),metric:r.reduce((a,x)=>a+x[1].n,0),label:'frequency-leaders',flags:r.map(x=>'count:'+x[1].n)}; } }","expected_response":"{\"data\":{\"distinctFrequencyLeaders\":{\"values\":[],\"metric\":0,\"label\":\"frequency-leaders\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { distinctFrequencyLeaders(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jkkup2n3138iz4","title":"Submission 138IZ4","payload":{"sample_query":"{ boundedPairSums(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 9, limit: 4) { values metric label flags } }","resolver_code":"Query: { boundedPairSums: (_, {values, threshold, limit}) => { const pairs=[];for(let i=0;ia[0]-b[0]||a[1]-b[1]);return {values:pairs.slice(0,limit).flat(),metric:pairs.length,label:'pair-indexes',flags:pairs.length>limit?['more-matches']:[]}; } }","expected_response":"{\"data\":{\"boundedPairSums\":{\"values\":[],\"metric\":0,\"label\":\"pair-indexes\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { boundedPairSums(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jlkup2wknym3vd","title":"Submission NYM3VD","payload":{"sample_query":"{ maximumWindow(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 3, limit: 5) { values metric label flags } }","resolver_code":"Query: { maximumWindow: (_, {values, threshold, limit}) => { let best=null;for(let i=0;i+limit<=values.length;i++){const sum=values.slice(i,i+limit).reduce((a,b)=>a+b,0);if(sum>=threshold&&(!best||sum>best.sum))best={i,sum}}return {values:best?values.slice(best.i,best.i+limit):[],metric:best?best.sum:0,label:'maximum-window',flags:best?['start:'+best.i]:['no-window']}; } }","expected_response":"{\"data\":{\"maximumWindow\":{\"values\":[17,3,27,11,29],\"metric\":87,\"label\":\"maximum-window\",\"flags\":[\"start:4\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { maximumWindow(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jmkup2lyyppxft","title":"Submission YPPXFT","payload":{"sample_query":"{ minimumCoverPrefix(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 4, limit: 2) { values metric label flags } }","resolver_code":"Query: { minimumCoverPrefix: (_, {values, threshold, limit}) => { let sum=0,end=-1;for(let i=0;i=threshold){end=i;break}}return {values:end<0?[]:values.slice(0,end+1),metric:end<0?sum:end+1,label:'cover-prefix',flags:end<0?['threshold-unreached']:[]}; } }","expected_response":"{\"data\":{\"minimumCoverPrefix\":{\"values\":[13],\"metric\":1,\"label\":\"cover-prefix\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { minimumCoverPrefix(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7v900jnkup2pxou74x7","title":"Submission OU74X7","payload":{"sample_query":"{ alternatingExtrema(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 5, limit: 3) { values metric label flags } }","resolver_code":"Query: { alternatingExtrema: (_, {values, threshold, limit}) => { const r=[];for(let i=1;ivalues[i-1]&&values[i]>values[i+1],valley=values[i]=threshold)r.push(values[i])}return {values:r.slice(0,limit),metric:r.length,label:'alternating-extrema',flags:r.length>limit?['limited']:[]}; } }","expected_response":"{\"data\":{\"alternatingExtrema\":{\"values\":[-6,17,7],\"metric\":8,\"label\":\"alternating-extrema\",\"flags\":[\"limited\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { alternatingExtrema(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jokup2t1xyw53q","title":"Submission XYW53Q","payload":{"sample_query":"{ inversionPressure(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 6, limit: 4) { values metric label flags } }","resolver_code":"Query: { inversionPressure: (_, {values, threshold, limit}) => { let count=0;const idx=[];for(let i=0;i=threshold){count++;if(idx.lengthidx.length?['truncated-pairs']:[]}; } }","expected_response":"{\"data\":{\"inversionPressure\":{\"values\":[0,1,0,5],\"metric\":13,\"label\":\"inversion-pressure\",\"flags\":[\"truncated-pairs\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { inversionPressure(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jpkup2a5mrntod","title":"Submission MRNTOD","payload":{"sample_query":"{ circularJumpAudit(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 7, limit: 5) { values metric label flags } }","resolver_code":"Query: { circularJumpAudit: (_, {values, threshold, limit}) => { const jumps=values.map((v,i)=>Math.abs(values[(i+1)%values.length]-v));const ranked=jumps.map((v,i)=>({v,i})).filter(x=>x.v>=threshold).sort((a,b)=>b.v-a.v||a.i-b.i).slice(0,limit);return {values:ranked.map(x=>x.v),metric:Math.max(...jumps),label:'circular-jumps',flags:ranked.map(x=>'edge:'+x.i)}; } }","expected_response":"{\"data\":{\"circularJumpAudit\":{\"values\":[30,24,23,23,16],\"metric\":30,\"label\":\"circular-jumps\",\"flags\":[\"edge:8\",\"edge:5\",\"edge:1\",\"edge:7\",\"edge:6\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { circularJumpAudit(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jqkup2otgmkeh8","title":"Submission GMKEH8","payload":{"sample_query":"{ balancedPartitionPoint(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 8, limit: 2) { values metric label flags } }","resolver_code":"Query: { balancedPartitionPoint: (_, {values, threshold, limit}) => { let left=0,total=values.reduce((a,b)=>a+b,0),best=null;for(let i=0;ithreshold?['imbalanced']:[]}; } }","expected_response":"{\"data\":{\"balancedPartitionPoint\":{\"values\":[17,3],\"metric\":17,\"label\":\"balance-after:5\",\"flags\":[\"imbalanced\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { balancedPartitionPoint(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jrkup2tptdpsvs","title":"Submission TDPSVS","payload":{"sample_query":"{ thresholdCrossings(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 9, limit: 3) { values metric label flags } }","resolver_code":"Query: { thresholdCrossings: (_, {values, threshold, limit}) => { const out=[],flags=[];for(let i=1;i=threshold)||(values[i-1]>=threshold&&values[i]=threshold?'up:':'down:')+i)}}return {values:out.slice(0,limit),metric:out.length,label:'crossings',flags:flags.slice(0,limit)}; } }","expected_response":"{\"data\":{\"thresholdCrossings\":{\"values\":[-2,16,6],\"metric\":9,\"label\":\"crossings\",\"flags\":[\"down:1\",\"up:2\",\"down:3\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { thresholdCrossings(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jskup26cq4f4hz","title":"Submission Q4F4HZ","payload":{"sample_query":"{ robustOutliers(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 3, limit: 4) { values metric label flags } }","resolver_code":"Query: { robustOutliers: (_, {values, threshold, limit}) => { const s=[...values].sort((a,b)=>a-b),med=s[Math.floor(s.length/2)],dev=s.map(x=>Math.abs(x-med)).sort((a,b)=>a-b),mad=dev[Math.floor(dev.length/2)]||1,out=values.filter(x=>Math.abs(x-med)/mad>=threshold);return {values:out.slice(0,limit),metric:mad,label:'mad-outliers',flags:['median:'+med]}; } }","expected_response":"{\"data\":{\"robustOutliers\":{\"values\":[],\"metric\":8,\"label\":\"mad-outliers\",\"flags\":[\"median:14\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { robustOutliers(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jtkup20ni2ck8f","title":"Submission I2CK8F","payload":{"sample_query":"{ cappedCumulative(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 4, limit: 5) { values metric label flags } }","resolver_code":"Query: { cappedCumulative: (_, {values, threshold, limit}) => { let sum=0;const out=[],flags=[];for(let i=0;ithreshold){flags.push('skipped:'+i);continue}sum+=values[i];out.push(values[i])}return {values:out,metric:sum,label:'capped-cumulative',flags}; } }","expected_response":"{\"data\":{\"cappedCumulative\":{\"values\":[-5,8,1],\"metric\":4,\"label\":\"capped-cumulative\",\"flags\":[\"skipped:0\",\"skipped:2\",\"skipped:4\",\"skipped:6\",\"skipped:7\",\"skipped:8\",\"skipped:9\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { cappedCumulative(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jukup238k94k8x","title":"Submission K94K8X","payload":{"sample_query":"{ nearestThreshold(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 5, limit: 2) { values metric label flags } }","resolver_code":"Query: { nearestThreshold: (_, {values, threshold, limit}) => { const r=values.map((v,i)=>({v,i,d:Math.abs(v-threshold)})).sort((a,b)=>a.d-b.d||a.i-b.i).slice(0,limit);return {values:r.map(x=>x.v),metric:r.reduce((a,x)=>a+x.d,0),label:'nearest-threshold',flags:r.map(x=>'distance:'+x.d)}; } }","expected_response":"{\"data\":{\"nearestThreshold\":{\"values\":[3,2],\"metric\":5,\"label\":\"nearest-threshold\",\"flags\":[\"distance:2\",\"distance:3\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { nearestThreshold(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jvkup25b3ig3b3","title":"Submission 3IG3B3","payload":{"sample_query":"{ monotoneBreaks(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 6, limit: 3) { values metric label flags } }","resolver_code":"Query: { monotoneBreaks: (_, {values, threshold, limit}) => { const breaks=[];for(let i=1;i=threshold)breaks.push(i);return {values:breaks.slice(0,limit),metric:breaks.length,label:'monotone-breaks',flags:breaks.map(i=>'drop:'+ (values[i-1]-values[i])).slice(0,limit)}; } }","expected_response":"{\"data\":{\"monotoneBreaks\":{\"values\":[1,3,5],\"metric\":5,\"label\":\"monotone-breaks\",\"flags\":[\"drop:15\",\"drop:15\",\"drop:14\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { monotoneBreaks(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jwkup2hl7ytuxz","title":"Submission 7YTUXZ","payload":{"sample_query":"{ bucketOccupancy(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 7, limit: 4) { values metric label flags } }","resolver_code":"Query: { bucketOccupancy: (_, {values, threshold, limit}) => { const m=new Map();for(const v of values){const b=Math.floor(v/threshold)*threshold;m.set(b,(m.get(b)||0)+1)}const r=[...m].sort((a,b)=>b[1]-a[1]||a[0]-b[0]).slice(0,limit);return {values:r.map(x=>x[0]),metric:r.reduce((a,x)=>a+x[1],0),label:'bucket-starts',flags:r.map(x=>'size:'+x[1])}; } }","expected_response":"{\"data\":{\"bucketOccupancy\":{\"values\":[0,7,14,28],\"metric\":9,\"label\":\"bucket-starts\",\"flags\":[\"size:3\",\"size:2\",\"size:2\",\"size:2\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { bucketOccupancy(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jxkup2dgn7w330","title":"Submission N7W330","payload":{"sample_query":"{ deduplicatedDelta(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 8, limit: 5) { values metric label flags } }","resolver_code":"Query: { deduplicatedDelta: (_, {values, threshold, limit}) => { const seen=new Set(),u=[];for(const v of values)if(!seen.has(v)){seen.add(v);u.push(v)}const d=u.slice(1).map((v,i)=>v-u[i]).filter(x=>Math.abs(x)>=threshold);return {values:d.slice(0,limit),metric:u.length,label:'unique-deltas',flags:d.length>limit?['delta-limit']:[]}; } }","expected_response":"{\"data\":{\"deduplicatedDelta\":{\"values\":[-20,23,-10,12,-14],\"metric\":10,\"label\":\"unique-deltas\",\"flags\":[\"delta-limit\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { deduplicatedDelta(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jykup2yl8tq09r","title":"Submission 8TQ09R","payload":{"sample_query":"{ weightedTailRisk(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 9, limit: 2) { values metric label flags } }","resolver_code":"Query: { weightedTailRisk: (_, {values, threshold, limit}) => { const s=[...values].sort((a,b)=>b-a).slice(0,limit),excess=s.map(x=>Math.max(0,x-threshold));return {values:s,metric:excess.reduce((a,b)=>a+b,0),label:'tail-excess',flags:s.map((x,i)=>excess[i]>0?'breach:'+x:null).filter(Boolean)}; } }","expected_response":"{\"data\":{\"weightedTailRisk\":{\"values\":[32,25],\"metric\":39,\"label\":\"tail-excess\",\"flags\":[\"breach:32\",\"breach:25\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { weightedTailRisk(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00jzkup2ygciulcj","title":"Submission CIULCJ","payload":{"sample_query":"{ segmentVolatility(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 3, limit: 3) { values metric label flags } }","resolver_code":"Query: { segmentVolatility: (_, {values, threshold, limit}) => { const seg=[];for(let i=0;i1)seg.push(Math.max(...x)-Math.min(...x))}return {values:seg,metric:seg.filter(x=>x>=threshold).length,label:'segment-ranges',flags:seg.map((x,i)=>x>=threshold?'volatile:'+i:null).filter(Boolean)}; } }","expected_response":"{\"data\":{\"segmentVolatility\":{\"values\":[23,14,23],\"metric\":3,\"label\":\"segment-ranges\",\"flags\":[\"volatile:0\",\"volatile:1\",\"volatile:2\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { segmentVolatility(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k0kup2ucooxxaf","title":"Submission OOXXAF","payload":{"sample_query":"{ recoveryAfterDrop(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 4, limit: 4) { values metric label flags } }","resolver_code":"Query: { recoveryAfterDrop: (_, {values, threshold, limit}) => { let best=null;for(let i=1;i=threshold){for(let j=i+1;j=values[i-1]&&(!best||j-i { const runs=[];let start=0;for(let i=1;i<=values.length;i++)if(i===values.length||Math.abs(values[i]-values[i-1])>threshold){if(i-start>=limit)runs.push({start,len:i-start,val:values[start]});start=i}return {values:runs.map(x=>x.val),metric:runs.reduce((a,x)=>Math.max(a,x.len),0),label:'plateaus',flags:runs.map(x=>'start:'+x.start+',len:'+x.len)}; } }","expected_response":"{\"data\":{\"plateauDetector\":{\"values\":[],\"metric\":0,\"label\":\"plateaus\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { plateauDetector(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k2kup2ffewpzpd","title":"Submission EWPZPD","payload":{"sample_query":"{ positiveNegativeBalance(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 6, limit: 2) { values metric label flags } }","resolver_code":"Query: { positiveNegativeBalance: (_, {values, threshold, limit}) => { const pos=values.filter(x=>x>=threshold),neg=values.filter(x=>x<=-threshold),n=Math.min(limit,pos.length,neg.length);return {values:[...pos.slice(0,n),...neg.slice(0,n)],metric:pos.reduce((a,b)=>a+b,0)+neg.reduce((a,b)=>a+b,0),label:'signed-balance',flags:[n { const q=values.map(x=>Math.round(x/threshold)*threshold),changes=[];for(let i=1;ilimit?['truncated']:[]}; } }","expected_response":"{\"data\":{\"quantizedTransitions\":{\"values\":[-7,21,7],\"metric\":6,\"label\":\"quantized-transitions\",\"flags\":[\"truncated\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { quantizedTransitions(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k4kup2kqpljttl","title":"Submission PLJTTL","payload":{"sample_query":"{ localNeighborhoodSum(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 8, limit: 4) { values metric label flags } }","resolver_code":"Query: { localNeighborhoodSum: (_, {values, threshold, limit}) => { const scored=values.map((v,i)=>({i,sum:values.slice(Math.max(0,i-limit),Math.min(values.length,i+limit+1)).reduce((a,b)=>a+b,0)})).filter(x=>x.sum>=threshold).sort((a,b)=>b.sum-a.sum||a.i-b.i);return {values:scored.slice(0,limit).map(x=>values[x.i]),metric:scored.length,label:'neighborhood-centers',flags:scored.slice(0,limit).map(x=>'sum:'+x.sum)}; } }","expected_response":"{\"data\":{\"localNeighborhoodSum\":{\"values\":[16,26,2,10],\"metric\":10,\"label\":\"neighborhood-centers\",\"flags\":[\"sum:122\",\"sum:118\",\"sum:114\",\"sum:99\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { localNeighborhoodSum(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k5kup2o111mhiy","title":"Submission 11MHIY","payload":{"sample_query":"{ evenOddDivergence(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 9, limit: 5) { values metric label flags } }","resolver_code":"Query: { evenOddDivergence: (_, {values, threshold, limit}) => { const even=values.filter((_,i)=>i%2===0),odd=values.filter((_,i)=>i%2),a=even.reduce((x,y)=>x+y,0)/even.length,b=odd.reduce((x,y)=>x+y,0)/odd.length,d=Math.abs(a-b);return {values:(a>=b?even:odd).slice(0,limit),metric:d,label:a>=b?'even-dominant':'odd-dominant',flags:d>=threshold?['divergent']:[]}; } }","expected_response":"{\"data\":{\"evenOddDivergence\":{\"values\":[12,20,17,27,29],\"metric\":17,\"label\":\"even-dominant\",\"flags\":[\"divergent\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { evenOddDivergence(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k6kup269z3d39z","title":"Submission Z3D39Z","payload":{"sample_query":"{ rangeConstrainedSubsequence(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 3, limit: 2) { values metric label flags } }","resolver_code":"Query: { rangeConstrainedSubsequence: (_, {values, threshold, limit}) => { let best=[];for(let i=0;ithreshold)break;if(cur.length>best.length)best=[...cur]}}return {values:best.slice(0,limit),metric:best.length,label:'bounded-range-run',flags:best.length>limit?['truncated']:[]}; } }","expected_response":"{\"data\":{\"rangeConstrainedSubsequence\":{\"values\":[13],\"metric\":1,\"label\":\"bounded-range-run\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { rangeConstrainedSubsequence(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k7kup2i2u0y15o","title":"Submission U0Y15O","payload":{"sample_query":"{ changePointCandidate(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 4, limit: 3) { values metric label flags } }","resolver_code":"Query: { changePointCandidate: (_, {values, threshold, limit}) => { let best=null;for(let i=limit;i<=values.length-limit;i++){const l=values.slice(i-limit,i),r=values.slice(i,i+limit),d=Math.abs(l.reduce((a,b)=>a+b,0)/limit-r.reduce((a,b)=>a+b,0)/limit);if(!best||d>best.d)best={i,d}}return {values:best?values.slice(best.i-limit,best.i+limit):[],metric:best?best.d:0,label:'change-point',flags:best&&best.d>=threshold?['index:'+best.i]:['below-threshold']}; } }","expected_response":"{\"data\":{\"changePointCandidate\":{\"values\":[7,19,5,24,8,31],\"metric\":10.666666666666666,\"label\":\"change-point\",\"flags\":[\"index:6\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { changePointCandidate(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k8kup2m12l0xbt","title":"Submission 2L0XBT","payload":{"sample_query":"{ duplicateGapAudit(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 5, limit: 4) { values metric label flags } }","resolver_code":"Query: { duplicateGapAudit: (_, {values, threshold, limit}) => { const last=new Map(),gaps=[];values.forEach((v,i)=>{if(last.has(v)){const g=i-last.get(v);if(g>=threshold)gaps.push({v,g})}last.set(v,i)});gaps.sort((a,b)=>b.g-a.g||a.v-b.v);return {values:gaps.slice(0,limit).map(x=>x.v),metric:gaps.length,label:'duplicate-gaps',flags:gaps.slice(0,limit).map(x=>'gap:'+x.g)}; } }","expected_response":"{\"data\":{\"duplicateGapAudit\":{\"values\":[],\"metric\":0,\"label\":\"duplicate-gaps\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { duplicateGapAudit(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00k9kup2py1dctu5","title":"Submission 1DCTU5","payload":{"sample_query":"{ slopeReversalScore(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 6, limit: 5) { values metric label flags } }","resolver_code":"Query: { slopeReversalScore: (_, {values, threshold, limit}) => { const d=values.slice(1).map((v,i)=>v-values[i]),r=[];for(let i=1;i=threshold)r.push(i);return {values:r.slice(0,limit),metric:r.length,label:'slope-reversals',flags:r.map(i=>'at:'+i).slice(0,limit)}; } }","expected_response":"{\"data\":{\"slopeReversalScore\":{\"values\":[1,2,3,4,5],\"metric\":8,\"label\":\"slope-reversals\",\"flags\":[\"at:1\",\"at:2\",\"at:3\",\"at:4\",\"at:5\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { slopeReversalScore(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kakup2pkk5k35m","title":"Submission K5K35M","payload":{"sample_query":"{ modularResidueLeaders(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 7, limit: 2) { values metric label flags } }","resolver_code":"Query: { modularResidueLeaders: (_, {values, threshold, limit}) => { const m=new Map();for(const v of values){const r=((v%threshold)+threshold)%threshold;m.set(r,(m.get(r)||0)+1)}const a=[...m].sort((x,y)=>y[1]-x[1]||x[0]-y[0]).slice(0,limit);return {values:a.map(x=>x[0]),metric:a[0]?.[1]||0,label:'residue-leaders',flags:a.map(x=>'count:'+x[1])}; } }","expected_response":"{\"data\":{\"modularResidueLeaders\":{\"values\":[4,3],\"metric\":3,\"label\":\"residue-leaders\",\"flags\":[\"count:3\",\"count:2\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { modularResidueLeaders(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kbkup2txz8byo5","title":"Submission Z8BYO5","payload":{"sample_query":"{ prefixRecordHighs(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 8, limit: 3) { values metric label flags } }","resolver_code":"Query: { prefixRecordHighs: (_, {values, threshold, limit}) => { let high=-Infinity;const r=[];values.forEach((v,i)=>{if(v>high&&v-high>=threshold){r.push(v);high=v}else high=Math.max(high,v)});return {values:r.slice(0,limit),metric:high,label:'record-highs',flags:r.length>limit?['limited']:[]}; } }","expected_response":"{\"data\":{\"prefixRecordHighs\":{\"values\":[13,28],\"metric\":30,\"label\":\"record-highs\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { prefixRecordHighs(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kckup2104y9ltz","title":"Submission 4Y9LTZ","payload":{"sample_query":"{ suffixMinimumDrops(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 9, limit: 4) { values metric label flags } }","resolver_code":"Query: { suffixMinimumDrops: (_, {values, threshold, limit}) => { let low=Infinity;const r=[];for(let i=values.length-1;i>=0;i--){if(low-values[i]>=threshold)r.push(values[i]);low=Math.min(low,values[i])}r.reverse();return {values:r.slice(-limit),metric:low,label:'suffix-drop-candidates',flags:r.length>limit?['tail-selected']:[]}; } }","expected_response":"{\"data\":{\"suffixMinimumDrops\":{\"values\":[-6,6],\"metric\":-6,\"label\":\"suffix-drop-candidates\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { suffixMinimumDrops(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kdkup2afuqp478","title":"Submission UQP478","payload":{"sample_query":"{ centeredDeviationRank(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 3, limit: 5) { values metric label flags } }","resolver_code":"Query: { centeredDeviationRank: (_, {values, threshold, limit}) => { const mean=values.reduce((a,b)=>a+b,0)/values.length,r=values.map((v,i)=>({v,i,d:Math.abs(v-mean)})).filter(x=>x.d>=threshold).sort((a,b)=>b.d-a.d||a.i-b.i).slice(0,limit);return {values:r.map(x=>x.v),metric:mean,label:'deviation-rank',flags:r.map(x=>'index:'+x.i)}; } }","expected_response":"{\"data\":{\"centeredDeviationRank\":{\"values\":[32,-5,25,1,20],\"metric\":12.5,\"label\":\"deviation-rank\",\"flags\":[\"index:8\",\"index:1\",\"index:6\",\"index:5\",\"index:4\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { centeredDeviationRank(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kekup26rtnj1o2","title":"Submission TNJ1O2","payload":{"sample_query":"{ greedyCapacityPack(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 4, limit: 2) { values metric label flags } }","resolver_code":"Query: { greedyCapacityPack: (_, {values, threshold, limit}) => { const ranked=values.map((v,i)=>({v,i})).filter(x=>x.v>0).sort((a,b)=>a.v-b.v||a.i-b.i);let sum=0,p=[];for(const x of ranked)if(p.lengthx.v),metric:sum,label:'capacity-pack',flags:p.map(x=>'source:'+x.i)}; } }","expected_response":"{\"data\":{\"greedyCapacityPack\":{\"values\":[2],\"metric\":2,\"label\":\"capacity-pack\",\"flags\":[\"source:5\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { greedyCapacityPack(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kfkup2omi1160r","title":"Submission I1160R","payload":{"sample_query":"{ adjacentMergeBudget(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 5, limit: 3) { values metric label flags } }","resolver_code":"Query: { adjacentMergeBudget: (_, {values, threshold, limit}) => { let a=[...values],merges=0;while(a.length>limit){let best=0;for(let i=1;ix>threshold)?['budget-exceeded']:[]}; } }","expected_response":"{\"data\":{\"adjacentMergeBudget\":{\"values\":[54,38,33],\"metric\":7,\"label\":\"adjacent-merge\",\"flags\":[\"budget-exceeded\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { adjacentMergeBudget(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kgkup2y77edt1t","title":"Submission 7EDT1T","payload":{"sample_query":"{ dominantSignRuns(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 6, limit: 4) { values metric label flags } }","resolver_code":"Query: { dominantSignRuns: (_, {values, threshold, limit}) => { const runs=[];let cur=[];for(const v of values){if(!cur.length||Math.sign(v)===Math.sign(cur[0]))cur.push(v);else{runs.push(cur);cur=[v]}}runs.push(cur);runs.sort((a,b)=>b.length-a.length);const best=runs[0]||[];return {values:best.slice(0,limit),metric:best.reduce((a,b)=>a+b,0),label:'dominant-sign-run',flags:best.length>=threshold?['qualified']:[]}; } }","expected_response":"{\"data\":{\"dominantSignRuns\":{\"values\":[16,6,18,4],\"metric\":114,\"label\":\"dominant-sign-run\",\"flags\":[\"qualified\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { dominantSignRuns(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00khkup22qlrnbvs","title":"Submission LRNBVS","payload":{"sample_query":"{ thresholdBandTime(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 7, limit: 5) { values metric label flags } }","resolver_code":"Query: { thresholdBandTime: (_, {values, threshold, limit}) => { const inBand=values.map(v=>Math.abs(v-threshold)<=limit),runs=[];let n=0;for(const x of inBand){if(x)n++;else if(n){runs.push(n);n=0}}if(n)runs.push(n);return {values:runs,metric:inBand.filter(Boolean).length,label:'band-run-lengths',flags:runs.map((x,i)=>'run'+i+':'+x)}; } }","expected_response":"{\"data\":{\"thresholdBandTime\":{\"values\":[1,1,1,1],\"metric\":4,\"label\":\"band-run-lengths\",\"flags\":[\"run0:1\",\"run1:1\",\"run2:1\",\"run3:1\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { thresholdBandTime(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kikup2ydehjjun","title":"Submission EHJJUN","payload":{"sample_query":"{ medianSideQuota(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 8, limit: 2) { values metric label flags } }","resolver_code":"Query: { medianSideQuota: (_, {values, threshold, limit}) => { const s=[...values].sort((a,b)=>a-b),m=s[Math.floor(s.length/2)],lo=values.filter(x=>xx>m).slice(0,limit);return {values:[...lo,...hi],metric:m,label:'median-side-quota',flags:[Math.abs(lo.length-hi.length)>=threshold?'unbalanced':'balanced']}; } }","expected_response":"{\"data\":{\"medianSideQuota\":{\"values\":[-5,8,18,20],\"metric\":10,\"label\":\"median-side-quota\",\"flags\":[\"balanced\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { medianSideQuota(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kjkup2umoybzfk","title":"Submission OYBZFK","payload":{"sample_query":"{ exponentialSmoothAlerts(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 9, limit: 3) { values metric label flags } }","resolver_code":"Query: { exponentialSmoothAlerts: (_, {values, threshold, limit}) => { let smooth=values[0],alerts=[];const alpha=1/Math.max(2,limit);for(let i=1;i=threshold)alerts.push(values[i])}return {values:alerts,metric:Number(smooth.toFixed(3)),label:'ema-alerts',flags:alerts.map(String)}; } }","expected_response":"{\"data\":{\"exponentialSmoothAlerts\":{\"values\":[-4,19,2,26,33,3],\"metric\":14.085,\"label\":\"ema-alerts\",\"flags\":[\"-4\",\"19\",\"2\",\"26\",\"33\",\"3\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { exponentialSmoothAlerts(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kkkup2l5dt8m7c","title":"Submission DT8M7C","payload":{"sample_query":"{ lexicographicNumberOrder(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 3, limit: 4) { values metric label flags } }","resolver_code":"Query: { lexicographicNumberOrder: (_, {values, threshold, limit}) => { const r=values.filter(x=>Math.abs(x)>=threshold).map(String).sort().slice(0,limit);return {values:r.map(Number),metric:r.length,label:'lexicographic-numeric',flags:r.map((x,i)=>i&&x { const out=[];for(let i=1;ithreshold)out.push(values[i-1]+Math.sign(d)*threshold)}return {values:out,metric:out.length,label:'interpolation-points',flags:out.length===limit?['limit-reached']:[]}; } }","expected_response":"{\"data\":{\"boundedStepInterpolation\":{\"values\":[9,2,12,10,14],\"metric\":5,\"label\":\"interpolation-points\",\"flags\":[\"limit-reached\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { boundedStepInterpolation(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kmkup2heixpck8","title":"Submission IXPCK8","payload":{"sample_query":"{ symmetricPairDifference(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 5, limit: 2) { values metric label flags } }","resolver_code":"Query: { symmetricPairDifference: (_, {values, threshold, limit}) => { const r=[];for(let i=0;i=threshold)r.push(d)}return {values:r.slice(0,limit),metric:r.reduce((a,b)=>a+b,0),label:'symmetric-differences',flags:r.length>limit?['truncated']:[]}; } }","expected_response":"{\"data\":{\"symmetricPairDifference\":{\"values\":[8,37],\"metric\":85,\"label\":\"symmetric-differences\",\"flags\":[\"truncated\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { symmetricPairDifference(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00knkup2nmto7jxm","title":"Submission TO7JXM","payload":{"sample_query":"{ consecutiveValueChains(values: [10,-5,18,8,20,1,25,9,32,7], threshold: 6, limit: 3) { values metric label flags } }","resolver_code":"Query: { consecutiveValueChains: (_, {values, threshold, limit}) => { const set=new Set(values),starts=[...set].filter(x=>!set.has(x-1)),chains=starts.map(s=>{const a=[];while(set.has(s)){a.push(s);s++}return a}).filter(a=>a.length>=threshold).sort((a,b)=>b.length-a.length||a[0]-b[0]);const best=chains[0]||[];return {values:best.slice(0,limit),metric:best.length,label:'consecutive-chain',flags:chains.length>1?['multiple-chains']:[]}; } }","expected_response":"{\"data\":{\"consecutiveValueChains\":{\"values\":[],\"metric\":0,\"label\":\"consecutive-chain\",\"flags\":[]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { consecutiveValueChains(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kokup2n07iuy9u","title":"Submission 7IUY9U","payload":{"sample_query":"{ ratioBreachPairs(values: [11,-4,19,9,16,2,26,10,33,3], threshold: 7, limit: 4) { values metric label flags } }","resolver_code":"Query: { ratioBreachPairs: (_, {values, threshold, limit}) => { const r=[];for(let i=1;i=threshold)r.push(i)}return {values:r.slice(0,limit),metric:r.length,label:'ratio-breach-indexes',flags:r.map(i=>'ratio:'+(values[i]/values[i-1]).toFixed(2)).slice(0,limit)}; } }","expected_response":"{\"data\":{\"ratioBreachPairs\":{\"values\":[6],\"metric\":1,\"label\":\"ratio-breach-indexes\",\"flags\":[\"ratio:13.00\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { ratioBreachPairs(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kpkup22ve8b15k","title":"Submission E8B15K","payload":{"sample_query":"{ limitedReservoirMedian(values: [12,-3,20,5,17,3,27,11,29,4], threshold: 8, limit: 5) { values metric label flags } }","resolver_code":"Query: { limitedReservoirMedian: (_, {values, threshold, limit}) => { const sample=[];values.forEach((v,i)=>{if(sample.lengtha-b);return {values:s,metric:s[Math.floor(s.length/2)],label:'deterministic-reservoir',flags:['sample-size:'+s.length]}; } }","expected_response":"{\"data\":{\"limitedReservoirMedian\":{\"values\":[-3,3,12,20,27],\"metric\":12,\"label\":\"deterministic-reservoir\",\"flags\":[\"sample-size:5\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { limitedReservoirMedian(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00kqkup2a6iwdmq0","title":"Submission IWDMQ0","payload":{"sample_query":"{ thresholdConnectedComponents(values: [13,-2,16,6,18,4,28,7,30,5], threshold: 9, limit: 2) { values metric label flags } }","resolver_code":"Query: { thresholdConnectedComponents: (_, {values, threshold, limit}) => { const groups=[];let g=[values[0]];for(let i=1;ib.length-a.length);return {values:(groups[0]||[]).slice(0,limit),metric:groups.length,label:'adjacency-components',flags:groups.map(x=>'size:'+x.length)}; } }","expected_response":"{\"data\":{\"thresholdConnectedComponents\":{\"values\":[13],\"metric\":10,\"label\":\"adjacency-components\",\"flags\":[\"size:1\",\"size:1\",\"size:1\",\"size:1\",\"size:1\",\"size:1\",\"size:1\",\"size:1\",\"size:1\",\"size:1\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { thresholdConnectedComponents(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlj7va00krkup24gnq1rwx","title":"Submission NQ1RWX","payload":{"sample_query":"{ cumulativePeakDrawdown(values: [14,-6,17,7,19,5,24,8,31,6], threshold: 3, limit: 3) { values metric label flags } }","resolver_code":"Query: { cumulativePeakDrawdown: (_, {values, threshold, limit}) => { let peak=-Infinity,best={drop:0,from:0,to:0};values.forEach((v,i)=>{if(v>peak){peak=v;bestPeak=i}else if(peak-v>best.drop&&peak-v>=threshold)best={drop:peak-v,from:bestPeak,to:i}});return {values:best.drop?values.slice(best.from,Math.min(best.to+1,best.from+limit)):[],metric:best.drop,label:'peak-drawdown',flags:best.drop?['from:'+best.from,'to:'+best.to]:['none']}; } }","expected_response":"{\"data\":{\"cumulativePeakDrawdown\":{\"values\":[31,6],\"metric\":25,\"label\":\"peak-drawdown\",\"flags\":[\"from:8\",\"to:9\"]}}}","schema_definition":"type AnalyticsResult { values: [Int!]!, metric: Float!, label: String!, flags: [String!]! }\ntype Query { cumulativePeakDrawdown(values: [Int!]!, threshold: Int!, limit: Int!): AnalyticsResult! }"}} {"submissionId":"cmsxlwo3r00kskup2by8udqr9","title":"Submission 8UDQR9","payload":{"sample_query":"query Ranked0 { rankLoans(records: [{ id: \"A\", principal: 10, income: 1, latePayments: 2 },{ id: \"B\", principal: 17, income: 2, latePayments: 7 },{ id: \"C\", principal: 24, income: 3, latePayments: 12 },{ id: \"D\", principal: 31, income: 4, latePayments: 17 },{ id: \"E\", principal: 38, income: 5, latePayments: 5 }], min: 2, max: 12, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankLoans: (_, {records,min,max,limit}) => { const eligible=records.filter(({principal,income,latePayments})=>income>0 && principal/income<=max); const ranked=eligible.map(r=>{const {principal,income,latePayments}=r;return {...r,score:principal/income + latePayments*0.2,flagged:latePayments>=2}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankLoans\":{\"eligibleCount\":5,\"cutoffScore\":10.4,\"selected\":[{\"id\":\"D\",\"score\":11.15,\"flagged\":true,\"rank\":1},{\"id\":\"A\",\"score\":10.4,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input LoansRecord0Input { id: ID!, principal: Float!, income: Float!, latePayments: Float! }\ntype LoansRecord0Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype LoansRecord0Summary { selected: [LoansRecord0Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankLoans(records: [LoansRecord0Input!]!, min: Float!, max: Float!, limit: Int!): LoansRecord0Summary! }"}} {"submissionId":"cmsxlwo3r00ktkup24ebxqaiz","title":"Submission BXQAIZ","payload":{"sample_query":"query Ranked1 { prioritizeIncidents(records: [{ id: \"A\", affectedUsers: 12, errorRate: 2, ageMinutes: 5 },{ id: \"B\", affectedUsers: 19, errorRate: 3, ageMinutes: 10 },{ id: \"C\", affectedUsers: 26, errorRate: 4, ageMinutes: 15 },{ id: \"D\", affectedUsers: 33, errorRate: 5, ageMinutes: 3 },{ id: \"E\", affectedUsers: 40, errorRate: 6, ageMinutes: 8 }], min: 3, max: 13, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeIncidents: (_, {records,min,max,limit}) => { const eligible=records.filter(({affectedUsers,errorRate,ageMinutes})=>errorRate>=min && affectedUsers>0); const ranked=eligible.map(r=>{const {affectedUsers,errorRate,ageMinutes}=r;return {...r,score:affectedUsers*errorRate + ageMinutes,flagged:ageMinutes>60}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeIncidents\":{\"eligibleCount\":4,\"cutoffScore\":119,\"selected\":[{\"id\":\"E\",\"score\":248,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":168,\"flagged\":false,\"rank\":2},{\"id\":\"C\",\"score\":119,\"flagged\":false,\"rank\":3}]}}}","schema_definition":"input IncidentsRecord1Input { id: ID!, affectedUsers: Float!, errorRate: Float!, ageMinutes: Float! }\ntype IncidentsRecord1Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype IncidentsRecord1Summary { selected: [IncidentsRecord1Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeIncidents(records: [IncidentsRecord1Input!]!, min: Float!, max: Float!, limit: Int!): IncidentsRecord1Summary! }"}} {"submissionId":"cmsxlwo3r00kukup2xrmsq09v","title":"Submission MSQ09V","payload":{"sample_query":"query Ranked2 { selectSuppliers(records: [{ id: \"A\", unitCost: 14, defectRate: 3, leadDays: 8 },{ id: \"B\", unitCost: 21, defectRate: 4, leadDays: 13 },{ id: \"C\", unitCost: 28, defectRate: 5, leadDays: 18 },{ id: \"D\", unitCost: 35, defectRate: 6, leadDays: 6 },{ id: \"E\", unitCost: 42, defectRate: 7, leadDays: 11 }], min: 4, max: 14, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectSuppliers: (_, {records,min,max,limit}) => { const eligible=records.filter(({unitCost,defectRate,leadDays})=>defectRate<=max && leadDays<=80); const ranked=eligible.map(r=>{const {unitCost,defectRate,leadDays}=r;return {...r,score:unitCost*(1+defectRate)+leadDays,flagged:defectRate>0.05}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectSuppliers\":{\"eligibleCount\":5,\"cutoffScore\":118,\"selected\":[{\"id\":\"E\",\"score\":347,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":251,\"flagged\":true,\"rank\":2},{\"id\":\"C\",\"score\":186,\"flagged\":true,\"rank\":3},{\"id\":\"B\",\"score\":118,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input SuppliersRecord2Input { id: ID!, unitCost: Float!, defectRate: Float!, leadDays: Float! }\ntype SuppliersRecord2Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype SuppliersRecord2Summary { selected: [SuppliersRecord2Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectSuppliers(records: [SuppliersRecord2Input!]!, min: Float!, max: Float!, limit: Int!): SuppliersRecord2Summary! }"}} {"submissionId":"cmsxlwo3r00kvkup282w2h102","title":"Submission W2H102","payload":{"sample_query":"query Ranked3 { triagePatients(records: [{ id: \"A\", severity: 16, waitMinutes: 4, riskFactors: 11 },{ id: \"B\", severity: 23, waitMinutes: 5, riskFactors: 16 },{ id: \"C\", severity: 30, waitMinutes: 6, riskFactors: 4 },{ id: \"D\", severity: 37, waitMinutes: 7, riskFactors: 9 },{ id: \"E\", severity: 44, waitMinutes: 8, riskFactors: 14 }], min: 5, max: 15, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { triagePatients: (_, {records,min,max,limit}) => { const eligible=records.filter(({severity,waitMinutes,riskFactors})=>severity>=min && riskFactors<=max); const ranked=eligible.map(r=>{const {severity,waitMinutes,riskFactors}=r;return {...r,score:severity*10+waitMinutes+riskFactors*5,flagged:waitMinutes>45}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"triagePatients\":{\"eligibleCount\":4,\"cutoffScore\":422,\"selected\":[{\"id\":\"E\",\"score\":518,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":422,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input PatientsRecord3Input { id: ID!, severity: Float!, waitMinutes: Float!, riskFactors: Float! }\ntype PatientsRecord3Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype PatientsRecord3Summary { selected: [PatientsRecord3Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { triagePatients(records: [PatientsRecord3Input!]!, min: Float!, max: Float!, limit: Int!): PatientsRecord3Summary! }"}} {"submissionId":"cmsxlwo3r00kwkup2n49ficpx","title":"Submission 9FICPX","payload":{"sample_query":"query Ranked4 { scheduleJobs(records: [{ id: \"A\", cpuUnits: 18, memoryGb: 5, deadlineMinutes: 14 },{ id: \"B\", cpuUnits: 25, memoryGb: 6, deadlineMinutes: 2 },{ id: \"C\", cpuUnits: 32, memoryGb: 7, deadlineMinutes: 7 },{ id: \"D\", cpuUnits: 39, memoryGb: 8, deadlineMinutes: 12 },{ id: \"E\", cpuUnits: 46, memoryGb: 9, deadlineMinutes: 17 }], min: 2, max: 16, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { scheduleJobs: (_, {records,min,max,limit}) => { const eligible=records.filter(({cpuUnits,memoryGb,deadlineMinutes})=>cpuUnits<=max && memoryGb<=max); const ranked=eligible.map(r=>{const {cpuUnits,memoryGb,deadlineMinutes}=r;return {...r,score:deadlineMinutes-(cpuUnits+memoryGb),flagged:deadlineMinutes<30}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"scheduleJobs\":{\"eligibleCount\":0,\"cutoffScore\":null,\"selected\":[]}}}","schema_definition":"input JobsRecord4Input { id: ID!, cpuUnits: Float!, memoryGb: Float!, deadlineMinutes: Float! }\ntype JobsRecord4Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype JobsRecord4Summary { selected: [JobsRecord4Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { scheduleJobs(records: [JobsRecord4Input!]!, min: Float!, max: Float!, limit: Int!): JobsRecord4Summary! }"}} {"submissionId":"cmsxlwo3r00kxkup2waz1s3uq","title":"Submission Z1S3UQ","payload":{"sample_query":"query Ranked5 { scoreFraudCases(records: [{ id: \"A\", amount: 20, velocity: 6, distanceKm: 17 },{ id: \"B\", amount: 27, velocity: 7, distanceKm: 5 },{ id: \"C\", amount: 34, velocity: 8, distanceKm: 10 },{ id: \"D\", amount: 41, velocity: 9, distanceKm: 15 },{ id: \"E\", amount: 48, velocity: 1, distanceKm: 3 }], min: 3, max: 17, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { scoreFraudCases: (_, {records,min,max,limit}) => { const eligible=records.filter(({amount,velocity,distanceKm})=>velocity>=min && distanceKm<=max); const ranked=eligible.map(r=>{const {amount,velocity,distanceKm}=r;return {...r,score:amount*velocity+distanceKm,flagged:amount>500}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"scoreFraudCases\":{\"eligibleCount\":4,\"cutoffScore\":137,\"selected\":[{\"id\":\"D\",\"score\":384,\"flagged\":false,\"rank\":1},{\"id\":\"C\",\"score\":282,\"flagged\":false,\"rank\":2},{\"id\":\"B\",\"score\":194,\"flagged\":false,\"rank\":3},{\"id\":\"A\",\"score\":137,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input FraudCasesRecord5Input { id: ID!, amount: Float!, velocity: Float!, distanceKm: Float! }\ntype FraudCasesRecord5Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype FraudCasesRecord5Summary { selected: [FraudCasesRecord5Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { scoreFraudCases(records: [FraudCasesRecord5Input!]!, min: Float!, max: Float!, limit: Int!): FraudCasesRecord5Summary! }"}} {"submissionId":"cmsxlwo3r00kykup2qtahjgis","title":"Submission AHJGIS","payload":{"sample_query":"query Ranked6 { rankSearchResults(records: [{ id: \"A\", textScore: 22, freshness: 7, authority: 3 },{ id: \"B\", textScore: 29, freshness: 8, authority: 8 },{ id: \"C\", textScore: 36, freshness: 9, authority: 13 },{ id: \"D\", textScore: 43, freshness: 1, authority: 18 },{ id: \"E\", textScore: 50, freshness: 2, authority: 6 }], min: 4, max: 18, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankSearchResults: (_, {records,min,max,limit}) => { const eligible=records.filter(({textScore,freshness,authority})=>textScore>=min && authority<=max); const ranked=eligible.map(r=>{const {textScore,freshness,authority}=r;return {...r,score:textScore*authority+freshness,flagged:freshness<10}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankSearchResults\":{\"eligibleCount\":5,\"cutoffScore\":477,\"selected\":[{\"id\":\"D\",\"score\":775,\"flagged\":true,\"rank\":1},{\"id\":\"C\",\"score\":477,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input SearchResultsRecord6Input { id: ID!, textScore: Float!, freshness: Float!, authority: Float! }\ntype SearchResultsRecord6Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype SearchResultsRecord6Summary { selected: [SearchResultsRecord6Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankSearchResults(records: [SearchResultsRecord6Input!]!, min: Float!, max: Float!, limit: Int!): SearchResultsRecord6Summary! }"}} {"submissionId":"cmsxlwo3r00kzkup29s0v7jf3","title":"Submission 0V7JF3","payload":{"sample_query":"query Ranked7 { chooseWarehouses(records: [{ id: \"A\", distanceKm: 24, stockUnits: 8, handlingCost: 6 },{ id: \"B\", distanceKm: 31, stockUnits: 9, handlingCost: 11 },{ id: \"C\", distanceKm: 38, stockUnits: 1, handlingCost: 16 },{ id: \"D\", distanceKm: 45, stockUnits: 2, handlingCost: 4 },{ id: \"E\", distanceKm: 52, stockUnits: 3, handlingCost: 9 }], min: 5, max: 19, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseWarehouses: (_, {records,min,max,limit}) => { const eligible=records.filter(({distanceKm,stockUnits,handlingCost})=>stockUnits>=min && distanceKm<=max); const ranked=eligible.map(r=>{const {distanceKm,stockUnits,handlingCost}=r;return {...r,score:stockUnits-distanceKm-handlingCost,flagged:handlingCost>25}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseWarehouses\":{\"eligibleCount\":0,\"cutoffScore\":null,\"selected\":[]}}}","schema_definition":"input WarehousesRecord7Input { id: ID!, distanceKm: Float!, stockUnits: Float!, handlingCost: Float! }\ntype WarehousesRecord7Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype WarehousesRecord7Summary { selected: [WarehousesRecord7Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseWarehouses(records: [WarehousesRecord7Input!]!, min: Float!, max: Float!, limit: Int!): WarehousesRecord7Summary! }"}} {"submissionId":"cmsxlwo3r00l0kup2u9jylrog","title":"Submission JYLROG","payload":{"sample_query":"query Ranked8 { prioritizeRepairs(records: [{ id: \"A\", failureRisk: 26, repairCost: 9, downtimeHours: 9 },{ id: \"B\", failureRisk: 33, repairCost: 1, downtimeHours: 14 },{ id: \"C\", failureRisk: 40, repairCost: 2, downtimeHours: 2 },{ id: \"D\", failureRisk: 47, repairCost: 3, downtimeHours: 7 },{ id: \"E\", failureRisk: 54, repairCost: 4, downtimeHours: 12 }], min: 2, max: 12, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeRepairs: (_, {records,min,max,limit}) => { const eligible=records.filter(({failureRisk,repairCost,downtimeHours})=>failureRisk>=min && repairCost<=max); const ranked=eligible.map(r=>{const {failureRisk,repairCost,downtimeHours}=r;return {...r,score:failureRisk*downtimeHours-repairCost/100,flagged:downtimeHours>8}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeRepairs\":{\"eligibleCount\":5,\"cutoffScore\":233.91,\"selected\":[{\"id\":\"E\",\"score\":647.96,\"flagged\":true,\"rank\":1},{\"id\":\"B\",\"score\":461.99,\"flagged\":true,\"rank\":2},{\"id\":\"D\",\"score\":328.97,\"flagged\":false,\"rank\":3},{\"id\":\"A\",\"score\":233.91,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input RepairsRecord8Input { id: ID!, failureRisk: Float!, repairCost: Float!, downtimeHours: Float! }\ntype RepairsRecord8Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype RepairsRecord8Summary { selected: [RepairsRecord8Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeRepairs(records: [RepairsRecord8Input!]!, min: Float!, max: Float!, limit: Int!): RepairsRecord8Summary! }"}} {"submissionId":"cmsxlwo3r00l1kup2x0kcrd6i","title":"Submission KCRD6I","payload":{"sample_query":"query Ranked9 { selectAds(records: [{ id: \"A\", bid: 28, quality: 1, frequency: 12 },{ id: \"B\", bid: 35, quality: 2, frequency: 17 },{ id: \"C\", bid: 42, quality: 3, frequency: 5 },{ id: \"D\", bid: 49, quality: 4, frequency: 10 },{ id: \"E\", bid: 56, quality: 5, frequency: 15 }], min: 3, max: 13, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectAds: (_, {records,min,max,limit}) => { const eligible=records.filter(({bid,quality,frequency})=>quality>=min && frequency<=max); const ranked=eligible.map(r=>{const {bid,quality,frequency}=r;return {...r,score:bid*quality-frequency,flagged:frequency>=5}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectAds\":{\"eligibleCount\":2,\"cutoffScore\":121,\"selected\":[{\"id\":\"D\",\"score\":186,\"flagged\":true,\"rank\":1},{\"id\":\"C\",\"score\":121,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input AdsRecord9Input { id: ID!, bid: Float!, quality: Float!, frequency: Float! }\ntype AdsRecord9Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype AdsRecord9Summary { selected: [AdsRecord9Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectAds(records: [AdsRecord9Input!]!, min: Float!, max: Float!, limit: Int!): AdsRecord9Summary! }"}} {"submissionId":"cmsxlwo3r00l2kup2e70j913b","title":"Submission 0J913B","payload":{"sample_query":"query Ranked10 { rankScholarships(records: [{ id: \"A\", gpa: 30, needScore: 2, serviceHours: 15 },{ id: \"B\", gpa: 37, needScore: 3, serviceHours: 3 },{ id: \"C\", gpa: 44, needScore: 4, serviceHours: 8 },{ id: \"D\", gpa: 51, needScore: 5, serviceHours: 13 },{ id: \"E\", gpa: 58, needScore: 6, serviceHours: 18 }], min: 4, max: 14, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankScholarships: (_, {records,min,max,limit}) => { const eligible=records.filter(({gpa,needScore,serviceHours})=>gpa>=min && needScore<=max); const ranked=eligible.map(r=>{const {gpa,needScore,serviceHours}=r;return {...r,score:gpa*needScore+serviceHours/10,flagged:serviceHours<20}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankScholarships\":{\"eligibleCount\":5,\"cutoffScore\":176.8,\"selected\":[{\"id\":\"E\",\"score\":349.8,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":256.3,\"flagged\":true,\"rank\":2},{\"id\":\"C\",\"score\":176.8,\"flagged\":true,\"rank\":3}]}}}","schema_definition":"input ScholarshipsRecord10Input { id: ID!, gpa: Float!, needScore: Float!, serviceHours: Float! }\ntype ScholarshipsRecord10Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ScholarshipsRecord10Summary { selected: [ScholarshipsRecord10Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankScholarships(records: [ScholarshipsRecord10Input!]!, min: Float!, max: Float!, limit: Int!): ScholarshipsRecord10Summary! }"}} {"submissionId":"cmsxlwo3r00l3kup206wb4ams","title":"Submission WB4AMS","payload":{"sample_query":"query Ranked11 { routeShipments(records: [{ id: \"A\", weightKg: 32, distanceKm: 3, priority: 18 },{ id: \"B\", weightKg: 39, distanceKm: 4, priority: 6 },{ id: \"C\", weightKg: 46, distanceKm: 5, priority: 11 },{ id: \"D\", weightKg: 53, distanceKm: 6, priority: 16 },{ id: \"E\", weightKg: 60, distanceKm: 7, priority: 4 }], min: 5, max: 15, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { routeShipments: (_, {records,min,max,limit}) => { const eligible=records.filter(({weightKg,distanceKm,priority})=>weightKg<=max && priority>=min); const ranked=eligible.map(r=>{const {weightKg,distanceKm,priority}=r;return {...r,score:priority*100-distanceKm-weightKg,flagged:distanceKm>500}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"routeShipments\":{\"eligibleCount\":0,\"cutoffScore\":null,\"selected\":[]}}}","schema_definition":"input ShipmentsRecord11Input { id: ID!, weightKg: Float!, distanceKm: Float!, priority: Float! }\ntype ShipmentsRecord11Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ShipmentsRecord11Summary { selected: [ShipmentsRecord11Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { routeShipments(records: [ShipmentsRecord11Input!]!, min: Float!, max: Float!, limit: Int!): ShipmentsRecord11Summary! }"}} {"submissionId":"cmsxlwo3r00l4kup2gb68kwt1","title":"Submission 68KWT1","payload":{"sample_query":"query Ranked12 { allocateBeds(records: [{ id: \"A\", acuity: 34, isolationNeed: 4, transferHours: 4 },{ id: \"B\", acuity: 41, isolationNeed: 5, transferHours: 9 },{ id: \"C\", acuity: 48, isolationNeed: 6, transferHours: 14 },{ id: \"D\", acuity: 55, isolationNeed: 7, transferHours: 2 },{ id: \"E\", acuity: 62, isolationNeed: 8, transferHours: 7 }], min: 2, max: 16, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { allocateBeds: (_, {records,min,max,limit}) => { const eligible=records.filter(({acuity,isolationNeed,transferHours})=>acuity>=min && transferHours<=max); const ranked=eligible.map(r=>{const {acuity,isolationNeed,transferHours}=r;return {...r,score:acuity*20+isolationNeed*30-transferHours,flagged:isolationNeed>0}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"allocateBeds\":{\"eligibleCount\":5,\"cutoffScore\":1308,\"selected\":[{\"id\":\"E\",\"score\":1473,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":1308,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input BedsRecord12Input { id: ID!, acuity: Float!, isolationNeed: Float!, transferHours: Float! }\ntype BedsRecord12Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype BedsRecord12Summary { selected: [BedsRecord12Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { allocateBeds(records: [BedsRecord12Input!]!, min: Float!, max: Float!, limit: Int!): BedsRecord12Summary! }"}} {"submissionId":"cmsxlwo3r00l5kup2yokz0lpq","title":"Submission KZ0LPQ","payload":{"sample_query":"query Ranked13 { chooseExperiments(records: [{ id: \"A\", expectedLift: 36, sampleCost: 5, uncertainty: 7 },{ id: \"B\", expectedLift: 43, sampleCost: 6, uncertainty: 12 },{ id: \"C\", expectedLift: 50, sampleCost: 7, uncertainty: 17 },{ id: \"D\", expectedLift: 57, sampleCost: 8, uncertainty: 5 },{ id: \"E\", expectedLift: 64, sampleCost: 9, uncertainty: 10 }], min: 3, max: 17, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseExperiments: (_, {records,min,max,limit}) => { const eligible=records.filter(({expectedLift,sampleCost,uncertainty})=>expectedLift>=min && sampleCost<=max); const ranked=eligible.map(r=>{const {expectedLift,sampleCost,uncertainty}=r;return {...r,score:expectedLift-uncertainty-sampleCost/1000,flagged:uncertainty>0.2}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseExperiments\":{\"eligibleCount\":5,\"cutoffScore\":32.993,\"selected\":[{\"id\":\"E\",\"score\":53.991,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":51.992,\"flagged\":true,\"rank\":2},{\"id\":\"C\",\"score\":32.993,\"flagged\":true,\"rank\":3}]}}}","schema_definition":"input ExperimentsRecord13Input { id: ID!, expectedLift: Float!, sampleCost: Float!, uncertainty: Float! }\ntype ExperimentsRecord13Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ExperimentsRecord13Summary { selected: [ExperimentsRecord13Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseExperiments(records: [ExperimentsRecord13Input!]!, min: Float!, max: Float!, limit: Int!): ExperimentsRecord13Summary! }"}} {"submissionId":"cmsxlwo3r00l6kup2jmxtrera","title":"Submission XTRERA","payload":{"sample_query":"query Ranked14 { rankBackups(records: [{ id: \"A\", ageHours: 38, sizeGb: 6, restoreMinutes: 10 },{ id: \"B\", ageHours: 45, sizeGb: 7, restoreMinutes: 15 },{ id: \"C\", ageHours: 52, sizeGb: 8, restoreMinutes: 3 },{ id: \"D\", ageHours: 59, sizeGb: 9, restoreMinutes: 8 },{ id: \"E\", ageHours: 66, sizeGb: 1, restoreMinutes: 13 }], min: 4, max: 18, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankBackups: (_, {records,min,max,limit}) => { const eligible=records.filter(({ageHours,sizeGb,restoreMinutes})=>ageHours>=min && sizeGb<=max); const ranked=eligible.map(r=>{const {ageHours,sizeGb,restoreMinutes}=r;return {...r,score:ageHours-sizeGb/10-restoreMinutes/5,flagged:restoreMinutes>60}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankBackups\":{\"eligibleCount\":5,\"cutoffScore\":41.3,\"selected\":[{\"id\":\"E\",\"score\":63.3,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":56.5,\"flagged\":false,\"rank\":2},{\"id\":\"C\",\"score\":50.6,\"flagged\":false,\"rank\":3},{\"id\":\"B\",\"score\":41.3,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input BackupsRecord14Input { id: ID!, ageHours: Float!, sizeGb: Float!, restoreMinutes: Float! }\ntype BackupsRecord14Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype BackupsRecord14Summary { selected: [BackupsRecord14Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankBackups(records: [BackupsRecord14Input!]!, min: Float!, max: Float!, limit: Int!): BackupsRecord14Summary! }"}} {"submissionId":"cmsxlwo3r00l7kup2z3e4o4n2","title":"Submission E4O4N2","payload":{"sample_query":"query Ranked15 { selectModels(records: [{ id: \"A\", accuracy: 40, latencyMs: 7, memoryMb: 13 },{ id: \"B\", accuracy: 47, latencyMs: 8, memoryMb: 18 },{ id: \"C\", accuracy: 54, latencyMs: 9, memoryMb: 6 },{ id: \"D\", accuracy: 61, latencyMs: 1, memoryMb: 11 },{ id: \"E\", accuracy: 68, latencyMs: 2, memoryMb: 16 }], min: 5, max: 19, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectModels: (_, {records,min,max,limit}) => { const eligible=records.filter(({accuracy,latencyMs,memoryMb})=>accuracy>=min && latencyMs<=max); const ranked=eligible.map(r=>{const {accuracy,latencyMs,memoryMb}=r;return {...r,score:accuracy*100-latencyMs/10-memoryMb/100,flagged:memoryMb>1000}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectModels\":{\"eligibleCount\":5,\"cutoffScore\":6099.79,\"selected\":[{\"id\":\"E\",\"score\":6799.64,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":6099.79,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input ModelsRecord15Input { id: ID!, accuracy: Float!, latencyMs: Float!, memoryMb: Float! }\ntype ModelsRecord15Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ModelsRecord15Summary { selected: [ModelsRecord15Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectModels(records: [ModelsRecord15Input!]!, min: Float!, max: Float!, limit: Int!): ModelsRecord15Summary! }"}} {"submissionId":"cmsxlwo3r00l8kup2p6ua9azm","title":"Submission UA9AZM","payload":{"sample_query":"query Ranked16 { prioritizeInvoices(records: [{ id: \"A\", amount: 42, daysOverdue: 8, disputeRisk: 16 },{ id: \"B\", amount: 49, daysOverdue: 9, disputeRisk: 4 },{ id: \"C\", amount: 56, daysOverdue: 1, disputeRisk: 9 },{ id: \"D\", amount: 63, daysOverdue: 2, disputeRisk: 14 },{ id: \"E\", amount: 70, daysOverdue: 3, disputeRisk: 2 }], min: 2, max: 12, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeInvoices: (_, {records,min,max,limit}) => { const eligible=records.filter(({amount,daysOverdue,disputeRisk})=>daysOverdue>=min && disputeRisk<=max); const ranked=eligible.map(r=>{const {amount,daysOverdue,disputeRisk}=r;return {...r,score:amount*daysOverdue*(1-disputeRisk),flagged:amount>10000}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeInvoices\":{\"eligibleCount\":2,\"cutoffScore\":-1323,\"selected\":[{\"id\":\"E\",\"score\":-210,\"flagged\":false,\"rank\":1},{\"id\":\"B\",\"score\":-1323,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input InvoicesRecord16Input { id: ID!, amount: Float!, daysOverdue: Float!, disputeRisk: Float! }\ntype InvoicesRecord16Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype InvoicesRecord16Summary { selected: [InvoicesRecord16Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeInvoices(records: [InvoicesRecord16Input!]!, min: Float!, max: Float!, limit: Int!): InvoicesRecord16Summary! }"}} {"submissionId":"cmsxlwo3s00l9kup2gpwd7grd","title":"Submission WD7GRD","payload":{"sample_query":"query Ranked17 { rankFeatures(records: [{ id: \"A\", revenueImpact: 44, effortDays: 9, risk: 2 },{ id: \"B\", revenueImpact: 51, effortDays: 1, risk: 7 },{ id: \"C\", revenueImpact: 58, effortDays: 2, risk: 12 },{ id: \"D\", revenueImpact: 65, effortDays: 3, risk: 17 },{ id: \"E\", revenueImpact: 72, effortDays: 4, risk: 5 }], min: 3, max: 13, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankFeatures: (_, {records,min,max,limit}) => { const eligible=records.filter(({revenueImpact,effortDays,risk})=>revenueImpact>=min && effortDays<=max); const ranked=eligible.map(r=>{const {revenueImpact,effortDays,risk}=r;return {...r,score:revenueImpact/effortDays-risk,flagged:risk>0.5}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankFeatures\":{\"eligibleCount\":5,\"cutoffScore\":4.6667,\"selected\":[{\"id\":\"B\",\"score\":44,\"flagged\":true,\"rank\":1},{\"id\":\"C\",\"score\":17,\"flagged\":true,\"rank\":2},{\"id\":\"E\",\"score\":13,\"flagged\":true,\"rank\":3},{\"id\":\"D\",\"score\":4.6667,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input FeaturesRecord17Input { id: ID!, revenueImpact: Float!, effortDays: Float!, risk: Float! }\ntype FeaturesRecord17Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype FeaturesRecord17Summary { selected: [FeaturesRecord17Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankFeatures(records: [FeaturesRecord17Input!]!, min: Float!, max: Float!, limit: Int!): FeaturesRecord17Summary! }"}} {"submissionId":"cmsxlwo3s00lakup25kqzhxnk","title":"Submission QZHXNK","payload":{"sample_query":"query Ranked18 { selectCaches(records: [{ id: \"A\", hitRate: 46, memoryMb: 1, staleRate: 5 },{ id: \"B\", hitRate: 53, memoryMb: 2, staleRate: 10 },{ id: \"C\", hitRate: 60, memoryMb: 3, staleRate: 15 },{ id: \"D\", hitRate: 67, memoryMb: 4, staleRate: 3 },{ id: \"E\", hitRate: 74, memoryMb: 5, staleRate: 8 }], min: 4, max: 14, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectCaches: (_, {records,min,max,limit}) => { const eligible=records.filter(({hitRate,memoryMb,staleRate})=>hitRate>=min && memoryMb<=max); const ranked=eligible.map(r=>{const {hitRate,memoryMb,staleRate}=r;return {...r,score:hitRate-staleRate-memoryMb/10000,flagged:staleRate>0.1}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectCaches\":{\"eligibleCount\":5,\"cutoffScore\":63.9996,\"selected\":[{\"id\":\"E\",\"score\":65.9995,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":63.9996,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input CachesRecord18Input { id: ID!, hitRate: Float!, memoryMb: Float!, staleRate: Float! }\ntype CachesRecord18Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype CachesRecord18Summary { selected: [CachesRecord18Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectCaches(records: [CachesRecord18Input!]!, min: Float!, max: Float!, limit: Int!): CachesRecord18Summary! }"}} {"submissionId":"cmsxlwo3s00lbkup29u6a2njr","title":"Submission 6A2NJR","payload":{"sample_query":"query Ranked19 { chooseRoutes(records: [{ id: \"A\", travelMinutes: 48, tollCost: 2, reliability: 8 },{ id: \"B\", travelMinutes: 55, tollCost: 3, reliability: 13 },{ id: \"C\", travelMinutes: 62, tollCost: 4, reliability: 18 },{ id: \"D\", travelMinutes: 69, tollCost: 5, reliability: 6 },{ id: \"E\", travelMinutes: 76, tollCost: 6, reliability: 11 }], min: 5, max: 15, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseRoutes: (_, {records,min,max,limit}) => { const eligible=records.filter(({travelMinutes,tollCost,reliability})=>reliability>=min && travelMinutes<=max); const ranked=eligible.map(r=>{const {travelMinutes,tollCost,reliability}=r;return {...r,score:reliability*100-travelMinutes-tollCost,flagged:tollCost>20}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseRoutes\":{\"eligibleCount\":0,\"cutoffScore\":null,\"selected\":[]}}}","schema_definition":"input RoutesRecord19Input { id: ID!, travelMinutes: Float!, tollCost: Float!, reliability: Float! }\ntype RoutesRecord19Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype RoutesRecord19Summary { selected: [RoutesRecord19Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseRoutes(records: [RoutesRecord19Input!]!, min: Float!, max: Float!, limit: Int!): RoutesRecord19Summary! }"}} {"submissionId":"cmsxlwo3s00lckup2bt716dun","title":"Submission 716DUN","payload":{"sample_query":"query Ranked20 { rankCandidates(records: [{ id: \"A\", skillScore: 50, salaryK: 3, noticeDays: 11 },{ id: \"B\", skillScore: 57, salaryK: 4, noticeDays: 16 },{ id: \"C\", skillScore: 64, salaryK: 5, noticeDays: 4 },{ id: \"D\", skillScore: 71, salaryK: 6, noticeDays: 9 },{ id: \"E\", skillScore: 78, salaryK: 7, noticeDays: 14 }], min: 2, max: 16, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankCandidates: (_, {records,min,max,limit}) => { const eligible=records.filter(({skillScore,salaryK,noticeDays})=>skillScore>=min && salaryK<=max); const ranked=eligible.map(r=>{const {skillScore,salaryK,noticeDays}=r;return {...r,score:skillScore-salaryK/10-noticeDays/5,flagged:noticeDays>60}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankCandidates\":{\"eligibleCount\":5,\"cutoffScore\":53.4,\"selected\":[{\"id\":\"E\",\"score\":74.5,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":68.6,\"flagged\":false,\"rank\":2},{\"id\":\"C\",\"score\":62.7,\"flagged\":false,\"rank\":3},{\"id\":\"B\",\"score\":53.4,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input CandidatesRecord20Input { id: ID!, skillScore: Float!, salaryK: Float!, noticeDays: Float! }\ntype CandidatesRecord20Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype CandidatesRecord20Summary { selected: [CandidatesRecord20Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankCandidates(records: [CandidatesRecord20Input!]!, min: Float!, max: Float!, limit: Int!): CandidatesRecord20Summary! }"}} {"submissionId":"cmsxlwo3s00ldkup2jbcme10x","title":"Submission CME10X","payload":{"sample_query":"query Ranked21 { prioritizeLeaks(records: [{ id: \"A\", litersHour: 52, repairHours: 4, contaminationRisk: 14 },{ id: \"B\", litersHour: 59, repairHours: 5, contaminationRisk: 2 },{ id: \"C\", litersHour: 66, repairHours: 6, contaminationRisk: 7 },{ id: \"D\", litersHour: 73, repairHours: 7, contaminationRisk: 12 },{ id: \"E\", litersHour: 80, repairHours: 8, contaminationRisk: 17 }], min: 3, max: 17, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeLeaks: (_, {records,min,max,limit}) => { const eligible=records.filter(({litersHour,repairHours,contaminationRisk})=>litersHour>=min && repairHours<=max); const ranked=eligible.map(r=>{const {litersHour,repairHours,contaminationRisk}=r;return {...r,score:litersHour*contaminationRisk-repairHours,flagged:contaminationRisk>0.7}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeLeaks\":{\"eligibleCount\":5,\"cutoffScore\":869,\"selected\":[{\"id\":\"E\",\"score\":1352,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":869,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input LeaksRecord21Input { id: ID!, litersHour: Float!, repairHours: Float!, contaminationRisk: Float! }\ntype LeaksRecord21Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype LeaksRecord21Summary { selected: [LeaksRecord21Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeLeaks(records: [LeaksRecord21Input!]!, min: Float!, max: Float!, limit: Int!): LeaksRecord21Summary! }"}} {"submissionId":"cmsxlwo3s00lekup20v7mctom","title":"Submission 7MCTOM","payload":{"sample_query":"query Ranked22 { selectSensors(records: [{ id: \"A\", coverage: 54, batteryDays: 5, noise: 17 },{ id: \"B\", coverage: 61, batteryDays: 6, noise: 5 },{ id: \"C\", coverage: 68, batteryDays: 7, noise: 10 },{ id: \"D\", coverage: 75, batteryDays: 8, noise: 15 },{ id: \"E\", coverage: 82, batteryDays: 9, noise: 3 }], min: 4, max: 18, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectSensors: (_, {records,min,max,limit}) => { const eligible=records.filter(({coverage,batteryDays,noise})=>coverage>=min && noise<=max); const ranked=eligible.map(r=>{const {coverage,batteryDays,noise}=r;return {...r,score:coverage+batteryDays/100-noise,flagged:batteryDays<30}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectSensors\":{\"eligibleCount\":5,\"cutoffScore\":58.07,\"selected\":[{\"id\":\"E\",\"score\":79.09,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":60.08,\"flagged\":true,\"rank\":2},{\"id\":\"C\",\"score\":58.07,\"flagged\":true,\"rank\":3}]}}}","schema_definition":"input SensorsRecord22Input { id: ID!, coverage: Float!, batteryDays: Float!, noise: Float! }\ntype SensorsRecord22Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype SensorsRecord22Summary { selected: [SensorsRecord22Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectSensors(records: [SensorsRecord22Input!]!, min: Float!, max: Float!, limit: Int!): SensorsRecord22Summary! }"}} {"submissionId":"cmsxlwo3s00lfkup2f641b8s3","title":"Submission 41B8S3","payload":{"sample_query":"query Ranked23 { rankAppeals(records: [{ id: \"A\", impact: 56, confidence: 6, ageDays: 3 },{ id: \"B\", impact: 63, confidence: 7, ageDays: 8 },{ id: \"C\", impact: 70, confidence: 8, ageDays: 13 },{ id: \"D\", impact: 77, confidence: 9, ageDays: 18 },{ id: \"E\", impact: 84, confidence: 1, ageDays: 6 }], min: 5, max: 19, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankAppeals: (_, {records,min,max,limit}) => { const eligible=records.filter(({impact,confidence,ageDays})=>confidence>=min && ageDays<=max); const ranked=eligible.map(r=>{const {impact,confidence,ageDays}=r;return {...r,score:impact*confidence+ageDays,flagged:ageDays>20}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankAppeals\":{\"eligibleCount\":4,\"cutoffScore\":339,\"selected\":[{\"id\":\"D\",\"score\":711,\"flagged\":false,\"rank\":1},{\"id\":\"C\",\"score\":573,\"flagged\":false,\"rank\":2},{\"id\":\"B\",\"score\":449,\"flagged\":false,\"rank\":3},{\"id\":\"A\",\"score\":339,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input AppealsRecord23Input { id: ID!, impact: Float!, confidence: Float!, ageDays: Float! }\ntype AppealsRecord23Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype AppealsRecord23Summary { selected: [AppealsRecord23Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankAppeals(records: [AppealsRecord23Input!]!, min: Float!, max: Float!, limit: Int!): AppealsRecord23Summary! }"}} {"submissionId":"cmsxlwo3s00lgkup2guv70ur2","title":"Submission V70UR2","payload":{"sample_query":"query Ranked24 { chooseTenants(records: [{ id: \"A\", monthlyRevenue: 58, supportHours: 7, churnRisk: 6 },{ id: \"B\", monthlyRevenue: 65, supportHours: 8, churnRisk: 11 },{ id: \"C\", monthlyRevenue: 72, supportHours: 9, churnRisk: 16 },{ id: \"D\", monthlyRevenue: 79, supportHours: 1, churnRisk: 4 },{ id: \"E\", monthlyRevenue: 86, supportHours: 2, churnRisk: 9 }], min: 2, max: 12, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseTenants: (_, {records,min,max,limit}) => { const eligible=records.filter(({monthlyRevenue,supportHours,churnRisk})=>monthlyRevenue>=min && supportHours<=max); const ranked=eligible.map(r=>{const {monthlyRevenue,supportHours,churnRisk}=r;return {...r,score:monthlyRevenue*(1-churnRisk)-supportHours*50,flagged:churnRisk>0.4}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseTenants\":{\"eligibleCount\":5,\"cutoffScore\":-640,\"selected\":[{\"id\":\"D\",\"score\":-287,\"flagged\":true,\"rank\":1},{\"id\":\"A\",\"score\":-640,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input TenantsRecord24Input { id: ID!, monthlyRevenue: Float!, supportHours: Float!, churnRisk: Float! }\ntype TenantsRecord24Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype TenantsRecord24Summary { selected: [TenantsRecord24Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseTenants(records: [TenantsRecord24Input!]!, min: Float!, max: Float!, limit: Int!): TenantsRecord24Summary! }"}} {"submissionId":"cmsxlwo3s00lhkup2vtrgf1xq","title":"Submission RGF1XQ","payload":{"sample_query":"query Ranked25 { prioritizePatches(records: [{ id: \"A\", cvss: 60, exposure: 8, downtimeCost: 9 },{ id: \"B\", cvss: 67, exposure: 9, downtimeCost: 14 },{ id: \"C\", cvss: 74, exposure: 1, downtimeCost: 2 },{ id: \"D\", cvss: 81, exposure: 2, downtimeCost: 7 },{ id: \"E\", cvss: 88, exposure: 3, downtimeCost: 12 }], min: 3, max: 13, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizePatches: (_, {records,min,max,limit}) => { const eligible=records.filter(({cvss,exposure,downtimeCost})=>cvss>=min && downtimeCost<=max); const ranked=eligible.map(r=>{const {cvss,exposure,downtimeCost}=r;return {...r,score:cvss*exposure-downtimeCost/1000,flagged:exposure>50}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizePatches\":{\"eligibleCount\":4,\"cutoffScore\":161.993,\"selected\":[{\"id\":\"A\",\"score\":479.991,\"flagged\":false,\"rank\":1},{\"id\":\"E\",\"score\":263.988,\"flagged\":false,\"rank\":2},{\"id\":\"D\",\"score\":161.993,\"flagged\":false,\"rank\":3}]}}}","schema_definition":"input PatchesRecord25Input { id: ID!, cvss: Float!, exposure: Float!, downtimeCost: Float! }\ntype PatchesRecord25Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype PatchesRecord25Summary { selected: [PatchesRecord25Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizePatches(records: [PatchesRecord25Input!]!, min: Float!, max: Float!, limit: Int!): PatchesRecord25Summary! }"}} {"submissionId":"cmsxlwo3s00likup20w8rhrqs","title":"Submission 8RHRQS","payload":{"sample_query":"query Ranked26 { rankTranslations(records: [{ id: \"A\", coverage: 62, errorRate: 9, reviewMinutes: 12 },{ id: \"B\", coverage: 69, errorRate: 1, reviewMinutes: 17 },{ id: \"C\", coverage: 76, errorRate: 2, reviewMinutes: 5 },{ id: \"D\", coverage: 83, errorRate: 3, reviewMinutes: 10 },{ id: \"E\", coverage: 90, errorRate: 4, reviewMinutes: 15 }], min: 4, max: 14, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankTranslations: (_, {records,min,max,limit}) => { const eligible=records.filter(({coverage,errorRate,reviewMinutes})=>coverage>=min && errorRate<=max); const ranked=eligible.map(r=>{const {coverage,errorRate,reviewMinutes}=r;return {...r,score:coverage-errorRate*100-reviewMinutes/10,flagged:reviewMinutes>120}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankTranslations\":{\"eligibleCount\":5,\"cutoffScore\":-311.5,\"selected\":[{\"id\":\"B\",\"score\":-32.7,\"flagged\":false,\"rank\":1},{\"id\":\"C\",\"score\":-124.5,\"flagged\":false,\"rank\":2},{\"id\":\"D\",\"score\":-218,\"flagged\":false,\"rank\":3},{\"id\":\"E\",\"score\":-311.5,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input TranslationsRecord26Input { id: ID!, coverage: Float!, errorRate: Float!, reviewMinutes: Float! }\ntype TranslationsRecord26Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype TranslationsRecord26Summary { selected: [TranslationsRecord26Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankTranslations(records: [TranslationsRecord26Input!]!, min: Float!, max: Float!, limit: Int!): TranslationsRecord26Summary! }"}} {"submissionId":"cmsxlwo3s00ljkup2r97kbn5b","title":"Submission 7KBN5B","payload":{"sample_query":"query Ranked27 { selectCampaigns(records: [{ id: \"A\", conversions: 64, spend: 1, complaintRate: 15 },{ id: \"B\", conversions: 71, spend: 2, complaintRate: 3 },{ id: \"C\", conversions: 78, spend: 3, complaintRate: 8 },{ id: \"D\", conversions: 85, spend: 4, complaintRate: 13 },{ id: \"E\", conversions: 92, spend: 5, complaintRate: 18 }], min: 5, max: 15, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectCampaigns: (_, {records,min,max,limit}) => { const eligible=records.filter(({conversions,spend,complaintRate})=>conversions>=min && spend<=max); const ranked=eligible.map(r=>{const {conversions,spend,complaintRate}=r;return {...r,score:conversions/spend-complaintRate,flagged:complaintRate>0.03}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectCampaigns\":{\"eligibleCount\":5,\"cutoffScore\":32.5,\"selected\":[{\"id\":\"A\",\"score\":49,\"flagged\":true,\"rank\":1},{\"id\":\"B\",\"score\":32.5,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input CampaignsRecord27Input { id: ID!, conversions: Float!, spend: Float!, complaintRate: Float! }\ntype CampaignsRecord27Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype CampaignsRecord27Summary { selected: [CampaignsRecord27Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectCampaigns(records: [CampaignsRecord27Input!]!, min: Float!, max: Float!, limit: Int!): CampaignsRecord27Summary! }"}} {"submissionId":"cmsxlwo3s00lkkup2xxa65vab","title":"Submission A65VAB","payload":{"sample_query":"query Ranked28 { chooseReplicas(records: [{ id: \"A\", lagMs: 66, availability: 2, monthlyCost: 18 },{ id: \"B\", lagMs: 73, availability: 3, monthlyCost: 6 },{ id: \"C\", lagMs: 80, availability: 4, monthlyCost: 11 },{ id: \"D\", lagMs: 87, availability: 5, monthlyCost: 16 },{ id: \"E\", lagMs: 94, availability: 6, monthlyCost: 4 }], min: 2, max: 16, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseReplicas: (_, {records,min,max,limit}) => { const eligible=records.filter(({lagMs,availability,monthlyCost})=>availability>=min && lagMs<=max); const ranked=eligible.map(r=>{const {lagMs,availability,monthlyCost}=r;return {...r,score:availability*100-lagMs/10-monthlyCost/100,flagged:monthlyCost>500}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseReplicas\":{\"eligibleCount\":0,\"cutoffScore\":null,\"selected\":[]}}}","schema_definition":"input ReplicasRecord28Input { id: ID!, lagMs: Float!, availability: Float!, monthlyCost: Float! }\ntype ReplicasRecord28Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ReplicasRecord28Summary { selected: [ReplicasRecord28Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseReplicas(records: [ReplicasRecord28Input!]!, min: Float!, max: Float!, limit: Int!): ReplicasRecord28Summary! }"}} {"submissionId":"cmsxlwo3s00llkup2yopl9dj2","title":"Submission PL9DJ2","payload":{"sample_query":"query Ranked29 { rankMentors(records: [{ id: \"A\", expertise: 68, capacityHours: 3, timezoneGap: 4 },{ id: \"B\", expertise: 75, capacityHours: 4, timezoneGap: 9 },{ id: \"C\", expertise: 82, capacityHours: 5, timezoneGap: 14 },{ id: \"D\", expertise: 89, capacityHours: 6, timezoneGap: 2 },{ id: \"E\", expertise: 96, capacityHours: 7, timezoneGap: 7 }], min: 3, max: 17, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankMentors: (_, {records,min,max,limit}) => { const eligible=records.filter(({expertise,capacityHours,timezoneGap})=>expertise>=min && timezoneGap<=max); const ranked=eligible.map(r=>{const {expertise,capacityHours,timezoneGap}=r;return {...r,score:expertise+capacityHours-timezoneGap*2,flagged:capacityHours<3}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankMentors\":{\"eligibleCount\":5,\"cutoffScore\":61,\"selected\":[{\"id\":\"D\",\"score\":91,\"flagged\":false,\"rank\":1},{\"id\":\"E\",\"score\":89,\"flagged\":false,\"rank\":2},{\"id\":\"A\",\"score\":63,\"flagged\":false,\"rank\":3},{\"id\":\"B\",\"score\":61,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input MentorsRecord29Input { id: ID!, expertise: Float!, capacityHours: Float!, timezoneGap: Float! }\ntype MentorsRecord29Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype MentorsRecord29Summary { selected: [MentorsRecord29Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankMentors(records: [MentorsRecord29Input!]!, min: Float!, max: Float!, limit: Int!): MentorsRecord29Summary! }"}} {"submissionId":"cmsxlwo3s00lmkup2jd3uqxxg","title":"Submission 3UQXXG","payload":{"sample_query":"query Ranked30 { prioritizeQueues(records: [{ id: \"A\", depth: 70, oldestMinutes: 4, workerCount: 7 },{ id: \"B\", depth: 77, oldestMinutes: 5, workerCount: 12 },{ id: \"C\", depth: 84, oldestMinutes: 6, workerCount: 17 },{ id: \"D\", depth: 91, oldestMinutes: 7, workerCount: 5 },{ id: \"E\", depth: 98, oldestMinutes: 8, workerCount: 10 }], min: 4, max: 18, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeQueues: (_, {records,min,max,limit}) => { const eligible=records.filter(({depth,oldestMinutes,workerCount})=>depth>=min && workerCount<=max); const ranked=eligible.map(r=>{const {depth,oldestMinutes,workerCount}=r;return {...r,score:depth*oldestMinutes/workerCount,flagged:oldestMinutes>30}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeQueues\":{\"eligibleCount\":5,\"cutoffScore\":78.4,\"selected\":[{\"id\":\"D\",\"score\":127.4,\"flagged\":false,\"rank\":1},{\"id\":\"E\",\"score\":78.4,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input QueuesRecord30Input { id: ID!, depth: Float!, oldestMinutes: Float!, workerCount: Float! }\ntype QueuesRecord30Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype QueuesRecord30Summary { selected: [QueuesRecord30Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeQueues(records: [QueuesRecord30Input!]!, min: Float!, max: Float!, limit: Int!): QueuesRecord30Summary! }"}} {"submissionId":"cmsxlwo3s00lnkup2v3crtivf","title":"Submission CRTIVF","payload":{"sample_query":"query Ranked31 { selectParcels(records: [{ id: \"A\", declaredValue: 72, riskScore: 5, inspectionMinutes: 10 },{ id: \"B\", declaredValue: 79, riskScore: 6, inspectionMinutes: 15 },{ id: \"C\", declaredValue: 86, riskScore: 7, inspectionMinutes: 3 },{ id: \"D\", declaredValue: 93, riskScore: 8, inspectionMinutes: 8 },{ id: \"E\", declaredValue: 100, riskScore: 9, inspectionMinutes: 13 }], min: 5, max: 19, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectParcels: (_, {records,min,max,limit}) => { const eligible=records.filter(({declaredValue,riskScore,inspectionMinutes})=>riskScore>=min && inspectionMinutes<=max); const ranked=eligible.map(r=>{const {declaredValue,riskScore,inspectionMinutes}=r;return {...r,score:declaredValue*riskScore-inspectionMinutes,flagged:declaredValue>5000}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectParcels\":{\"eligibleCount\":5,\"cutoffScore\":599,\"selected\":[{\"id\":\"E\",\"score\":887,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":736,\"flagged\":false,\"rank\":2},{\"id\":\"C\",\"score\":599,\"flagged\":false,\"rank\":3}]}}}","schema_definition":"input ParcelsRecord31Input { id: ID!, declaredValue: Float!, riskScore: Float!, inspectionMinutes: Float! }\ntype ParcelsRecord31Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ParcelsRecord31Summary { selected: [ParcelsRecord31Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectParcels(records: [ParcelsRecord31Input!]!, min: Float!, max: Float!, limit: Int!): ParcelsRecord31Summary! }"}} {"submissionId":"cmsxlwo3s00lokup2xrib4lev","title":"Submission IB4LEV","payload":{"sample_query":"query Ranked32 { rankDatasets(records: [{ id: \"A\", rowCountK: 74, missingRate: 6, licenseScore: 13 },{ id: \"B\", rowCountK: 81, missingRate: 7, licenseScore: 18 },{ id: \"C\", rowCountK: 88, missingRate: 8, licenseScore: 6 },{ id: \"D\", rowCountK: 95, missingRate: 9, licenseScore: 11 },{ id: \"E\", rowCountK: 102, missingRate: 1, licenseScore: 16 }], min: 2, max: 12, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankDatasets: (_, {records,min,max,limit}) => { const eligible=records.filter(({rowCountK,missingRate,licenseScore})=>licenseScore>=min && missingRate<=max); const ranked=eligible.map(r=>{const {rowCountK,missingRate,licenseScore}=r;return {...r,score:rowCountK*licenseScore-missingRate*100,flagged:missingRate>0.1}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankDatasets\":{\"eligibleCount\":5,\"cutoffScore\":145,\"selected\":[{\"id\":\"E\",\"score\":1532,\"flagged\":true,\"rank\":1},{\"id\":\"B\",\"score\":758,\"flagged\":true,\"rank\":2},{\"id\":\"A\",\"score\":362,\"flagged\":true,\"rank\":3},{\"id\":\"D\",\"score\":145,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input DatasetsRecord32Input { id: ID!, rowCountK: Float!, missingRate: Float!, licenseScore: Float! }\ntype DatasetsRecord32Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype DatasetsRecord32Summary { selected: [DatasetsRecord32Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankDatasets(records: [DatasetsRecord32Input!]!, min: Float!, max: Float!, limit: Int!): DatasetsRecord32Summary! }"}} {"submissionId":"cmsxlwo3s00lpkup21adwhd3p","title":"Submission DWHD3P","payload":{"sample_query":"query Ranked33 { choosePowerLoads(records: [{ id: \"A\", demandKw: 76, flexibility: 7, curtailCost: 16 },{ id: \"B\", demandKw: 83, flexibility: 8, curtailCost: 4 },{ id: \"C\", demandKw: 90, flexibility: 9, curtailCost: 9 },{ id: \"D\", demandKw: 97, flexibility: 1, curtailCost: 14 },{ id: \"E\", demandKw: 104, flexibility: 2, curtailCost: 2 }], min: 3, max: 13, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { choosePowerLoads: (_, {records,min,max,limit}) => { const eligible=records.filter(({demandKw,flexibility,curtailCost})=>flexibility>=min && demandKw<=max); const ranked=eligible.map(r=>{const {demandKw,flexibility,curtailCost}=r;return {...r,score:demandKw*flexibility-curtailCost,flagged:curtailCost>200}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"choosePowerLoads\":{\"eligibleCount\":0,\"cutoffScore\":null,\"selected\":[]}}}","schema_definition":"input PowerLoadsRecord33Input { id: ID!, demandKw: Float!, flexibility: Float!, curtailCost: Float! }\ntype PowerLoadsRecord33Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype PowerLoadsRecord33Summary { selected: [PowerLoadsRecord33Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { choosePowerLoads(records: [PowerLoadsRecord33Input!]!, min: Float!, max: Float!, limit: Int!): PowerLoadsRecord33Summary! }"}} {"submissionId":"cmsxlwo3s00lqkup2mf59tn72","title":"Submission 59TN72","payload":{"sample_query":"query Ranked34 { prioritizeCases(records: [{ id: \"A\", lossAmount: 78, evidenceScore: 8, complexity: 2 },{ id: \"B\", lossAmount: 85, evidenceScore: 9, complexity: 7 },{ id: \"C\", lossAmount: 92, evidenceScore: 1, complexity: 12 },{ id: \"D\", lossAmount: 99, evidenceScore: 2, complexity: 17 },{ id: \"E\", lossAmount: 106, evidenceScore: 3, complexity: 5 }], min: 4, max: 14, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeCases: (_, {records,min,max,limit}) => { const eligible=records.filter(({lossAmount,evidenceScore,complexity})=>evidenceScore>=min && complexity<=max); const ranked=eligible.map(r=>{const {lossAmount,evidenceScore,complexity}=r;return {...r,score:lossAmount*evidenceScore/complexity,flagged:complexity>7}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeCases\":{\"eligibleCount\":2,\"cutoffScore\":109.2857,\"selected\":[{\"id\":\"A\",\"score\":312,\"flagged\":false,\"rank\":1},{\"id\":\"B\",\"score\":109.2857,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input CasesRecord34Input { id: ID!, lossAmount: Float!, evidenceScore: Float!, complexity: Float! }\ntype CasesRecord34Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype CasesRecord34Summary { selected: [CasesRecord34Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeCases(records: [CasesRecord34Input!]!, min: Float!, max: Float!, limit: Int!): CasesRecord34Summary! }"}} {"submissionId":"cmsxlwo3s00lrkup2lrgxynlk","title":"Submission GXYNLK","payload":{"sample_query":"query Ranked35 { selectReviewers(records: [{ id: \"A\", expertise: 80, openReviews: 9, conflictRisk: 5 },{ id: \"B\", expertise: 87, openReviews: 1, conflictRisk: 10 },{ id: \"C\", expertise: 94, openReviews: 2, conflictRisk: 15 },{ id: \"D\", expertise: 101, openReviews: 3, conflictRisk: 3 },{ id: \"E\", expertise: 108, openReviews: 4, conflictRisk: 8 }], min: 5, max: 15, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectReviewers: (_, {records,min,max,limit}) => { const eligible=records.filter(({expertise,openReviews,conflictRisk})=>expertise>=min && openReviews<=max); const ranked=eligible.map(r=>{const {expertise,openReviews,conflictRisk}=r;return {...r,score:expertise-openReviews-conflictRisk*10,flagged:conflictRisk>0.2}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectReviewers\":{\"eligibleCount\":5,\"cutoffScore\":-14,\"selected\":[{\"id\":\"D\",\"score\":68,\"flagged\":true,\"rank\":1},{\"id\":\"E\",\"score\":24,\"flagged\":true,\"rank\":2},{\"id\":\"A\",\"score\":21,\"flagged\":true,\"rank\":3},{\"id\":\"B\",\"score\":-14,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input ReviewersRecord35Input { id: ID!, expertise: Float!, openReviews: Float!, conflictRisk: Float! }\ntype ReviewersRecord35Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ReviewersRecord35Summary { selected: [ReviewersRecord35Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectReviewers(records: [ReviewersRecord35Input!]!, min: Float!, max: Float!, limit: Int!): ReviewersRecord35Summary! }"}} {"submissionId":"cmsxlwo3s00lskup2kaz6gnyv","title":"Submission Z6GNYV","payload":{"sample_query":"query Ranked36 { rankSubscriptions(records: [{ id: \"A\", annualValue: 82, usageRate: 1, supportTickets: 8 },{ id: \"B\", annualValue: 89, usageRate: 2, supportTickets: 13 },{ id: \"C\", annualValue: 96, usageRate: 3, supportTickets: 18 },{ id: \"D\", annualValue: 103, usageRate: 4, supportTickets: 6 },{ id: \"E\", annualValue: 110, usageRate: 5, supportTickets: 11 }], min: 2, max: 16, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankSubscriptions: (_, {records,min,max,limit}) => { const eligible=records.filter(({annualValue,usageRate,supportTickets})=>usageRate>=min && supportTickets<=max); const ranked=eligible.map(r=>{const {annualValue,usageRate,supportTickets}=r;return {...r,score:annualValue*usageRate-supportTickets*25,flagged:supportTickets>10}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankSubscriptions\":{\"eligibleCount\":3,\"cutoffScore\":262,\"selected\":[{\"id\":\"E\",\"score\":275,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":262,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input SubscriptionsRecord36Input { id: ID!, annualValue: Float!, usageRate: Float!, supportTickets: Float! }\ntype SubscriptionsRecord36Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype SubscriptionsRecord36Summary { selected: [SubscriptionsRecord36Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankSubscriptions(records: [SubscriptionsRecord36Input!]!, min: Float!, max: Float!, limit: Int!): SubscriptionsRecord36Summary! }"}} {"submissionId":"cmsxlwo3s00ltkup21r9gkxbr","title":"Submission 9GKXBR","payload":{"sample_query":"query Ranked37 { chooseBatches(records: [{ id: \"A\", recordCount: 84, errorRate: 2, processingMinutes: 11 },{ id: \"B\", recordCount: 91, errorRate: 3, processingMinutes: 16 },{ id: \"C\", recordCount: 98, errorRate: 4, processingMinutes: 4 },{ id: \"D\", recordCount: 105, errorRate: 5, processingMinutes: 9 },{ id: \"E\", recordCount: 112, errorRate: 6, processingMinutes: 14 }], min: 3, max: 17, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseBatches: (_, {records,min,max,limit}) => { const eligible=records.filter(({recordCount,errorRate,processingMinutes})=>recordCount>=min && errorRate<=max); const ranked=eligible.map(r=>{const {recordCount,errorRate,processingMinutes}=r;return {...r,score:recordCount*(1-errorRate)/processingMinutes,flagged:processingMinutes>90}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseBatches\":{\"eligibleCount\":5,\"cutoffScore\":-40,\"selected\":[{\"id\":\"A\",\"score\":-7.6364,\"flagged\":false,\"rank\":1},{\"id\":\"B\",\"score\":-11.375,\"flagged\":false,\"rank\":2},{\"id\":\"E\",\"score\":-40,\"flagged\":false,\"rank\":3}]}}}","schema_definition":"input BatchesRecord37Input { id: ID!, recordCount: Float!, errorRate: Float!, processingMinutes: Float! }\ntype BatchesRecord37Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype BatchesRecord37Summary { selected: [BatchesRecord37Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseBatches(records: [BatchesRecord37Input!]!, min: Float!, max: Float!, limit: Int!): BatchesRecord37Summary! }"}} {"submissionId":"cmsxlwo3s00lukup2z3c138hp","title":"Submission C138HP","payload":{"sample_query":"query Ranked38 { prioritizeAlerts(records: [{ id: \"A\", severity: 86, confidence: 3, duplicateCount: 14 },{ id: \"B\", severity: 93, confidence: 4, duplicateCount: 2 },{ id: \"C\", severity: 100, confidence: 5, duplicateCount: 7 },{ id: \"D\", severity: 107, confidence: 6, duplicateCount: 12 },{ id: \"E\", severity: 114, confidence: 7, duplicateCount: 17 }], min: 4, max: 18, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeAlerts: (_, {records,min,max,limit}) => { const eligible=records.filter(({severity,confidence,duplicateCount})=>severity>=min && duplicateCount<=max); const ranked=eligible.map(r=>{const {severity,confidence,duplicateCount}=r;return {...r,score:severity*confidence-duplicateCount,flagged:confidence<0.6}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeAlerts\":{\"eligibleCount\":5,\"cutoffScore\":370,\"selected\":[{\"id\":\"E\",\"score\":781,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":630,\"flagged\":false,\"rank\":2},{\"id\":\"C\",\"score\":493,\"flagged\":false,\"rank\":3},{\"id\":\"B\",\"score\":370,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input AlertsRecord38Input { id: ID!, severity: Float!, confidence: Float!, duplicateCount: Float! }\ntype AlertsRecord38Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype AlertsRecord38Summary { selected: [AlertsRecord38Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeAlerts(records: [AlertsRecord38Input!]!, min: Float!, max: Float!, limit: Int!): AlertsRecord38Summary! }"}} {"submissionId":"cmsxlwo3s00lvkup2z4tcz9a0","title":"Submission TCZ9A0","payload":{"sample_query":"query Ranked39 { selectPlants(records: [{ id: \"A\", yieldTons: 88, waterUse: 4, diseaseRisk: 17 },{ id: \"B\", yieldTons: 95, waterUse: 5, diseaseRisk: 5 },{ id: \"C\", yieldTons: 102, waterUse: 6, diseaseRisk: 10 },{ id: \"D\", yieldTons: 109, waterUse: 7, diseaseRisk: 15 },{ id: \"E\", yieldTons: 116, waterUse: 8, diseaseRisk: 3 }], min: 5, max: 19, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectPlants: (_, {records,min,max,limit}) => { const eligible=records.filter(({yieldTons,waterUse,diseaseRisk})=>yieldTons>=min && waterUse<=max); const ranked=eligible.map(r=>{const {yieldTons,waterUse,diseaseRisk}=r;return {...r,score:yieldTons/waterUse-diseaseRisk,flagged:diseaseRisk>0.3}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectPlants\":{\"eligibleCount\":5,\"cutoffScore\":11.5,\"selected\":[{\"id\":\"B\",\"score\":14,\"flagged\":true,\"rank\":1},{\"id\":\"E\",\"score\":11.5,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input PlantsRecord39Input { id: ID!, yieldTons: Float!, waterUse: Float!, diseaseRisk: Float! }\ntype PlantsRecord39Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype PlantsRecord39Summary { selected: [PlantsRecord39Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectPlants(records: [PlantsRecord39Input!]!, min: Float!, max: Float!, limit: Int!): PlantsRecord39Summary! }"}} {"submissionId":"cmsxlwo3s00lwkup26z4jbl0f","title":"Submission 4JBL0F","payload":{"sample_query":"query Ranked40 { rankEndpoints(records: [{ id: \"A\", requestsK: 90, p95Ms: 5, errorRate: 3 },{ id: \"B\", requestsK: 97, p95Ms: 6, errorRate: 8 },{ id: \"C\", requestsK: 104, p95Ms: 7, errorRate: 13 },{ id: \"D\", requestsK: 111, p95Ms: 8, errorRate: 18 },{ id: \"E\", requestsK: 118, p95Ms: 9, errorRate: 6 }], min: 2, max: 12, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankEndpoints: (_, {records,min,max,limit}) => { const eligible=records.filter(({requestsK,p95Ms,errorRate})=>requestsK>=min && p95Ms<=max); const ranked=eligible.map(r=>{const {requestsK,p95Ms,errorRate}=r;return {...r,score:requestsK-p95Ms/100-errorRate*100,flagged:errorRate>0.02}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankEndpoints\":{\"eligibleCount\":5,\"cutoffScore\":-703.06,\"selected\":[{\"id\":\"A\",\"score\":-210.05,\"flagged\":true,\"rank\":1},{\"id\":\"E\",\"score\":-482.09,\"flagged\":true,\"rank\":2},{\"id\":\"B\",\"score\":-703.06,\"flagged\":true,\"rank\":3}]}}}","schema_definition":"input EndpointsRecord40Input { id: ID!, requestsK: Float!, p95Ms: Float!, errorRate: Float! }\ntype EndpointsRecord40Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype EndpointsRecord40Summary { selected: [EndpointsRecord40Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankEndpoints(records: [EndpointsRecord40Input!]!, min: Float!, max: Float!, limit: Int!): EndpointsRecord40Summary! }"}} {"submissionId":"cmsxlwo3s00lxkup2zakfgqak","title":"Submission KFGQAK","payload":{"sample_query":"query Ranked41 { choosePolicies(records: [{ id: \"A\", coverageValue: 92, premium: 6, exclusionRisk: 6 },{ id: \"B\", coverageValue: 99, premium: 7, exclusionRisk: 11 },{ id: \"C\", coverageValue: 106, premium: 8, exclusionRisk: 16 },{ id: \"D\", coverageValue: 113, premium: 9, exclusionRisk: 4 },{ id: \"E\", coverageValue: 120, premium: 1, exclusionRisk: 9 }], min: 3, max: 13, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { choosePolicies: (_, {records,min,max,limit}) => { const eligible=records.filter(({coverageValue,premium,exclusionRisk})=>coverageValue>=min && premium<=max); const ranked=eligible.map(r=>{const {coverageValue,premium,exclusionRisk}=r;return {...r,score:coverageValue/premium-exclusionRisk,flagged:exclusionRisk>0.25}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"choosePolicies\":{\"eligibleCount\":5,\"cutoffScore\":3.1429,\"selected\":[{\"id\":\"E\",\"score\":111,\"flagged\":true,\"rank\":1},{\"id\":\"A\",\"score\":9.3333,\"flagged\":true,\"rank\":2},{\"id\":\"D\",\"score\":8.5556,\"flagged\":true,\"rank\":3},{\"id\":\"B\",\"score\":3.1429,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input PoliciesRecord41Input { id: ID!, coverageValue: Float!, premium: Float!, exclusionRisk: Float! }\ntype PoliciesRecord41Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype PoliciesRecord41Summary { selected: [PoliciesRecord41Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { choosePolicies(records: [PoliciesRecord41Input!]!, min: Float!, max: Float!, limit: Int!): PoliciesRecord41Summary! }"}} {"submissionId":"cmsxlwo3s00lykup2ddg9ksqd","title":"Submission G9KSQD","payload":{"sample_query":"query Ranked42 { prioritizeImports(records: [{ id: \"A\", rowsK: 94, validationErrors: 7, ageHours: 9 },{ id: \"B\", rowsK: 101, validationErrors: 8, ageHours: 14 },{ id: \"C\", rowsK: 108, validationErrors: 9, ageHours: 2 },{ id: \"D\", rowsK: 115, validationErrors: 1, ageHours: 7 },{ id: \"E\", rowsK: 122, validationErrors: 2, ageHours: 12 }], min: 4, max: 14, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeImports: (_, {records,min,max,limit}) => { const eligible=records.filter(({rowsK,validationErrors,ageHours})=>rowsK>=min && validationErrors<=max); const ranked=eligible.map(r=>{const {rowsK,validationErrors,ageHours}=r;return {...r,score:rowsK+ageHours-validationErrors*10,flagged:ageHours>12}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeImports\":{\"eligibleCount\":5,\"cutoffScore\":112,\"selected\":[{\"id\":\"E\",\"score\":114,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":112,\"flagged\":false,\"rank\":2}]}}}","schema_definition":"input ImportsRecord42Input { id: ID!, rowsK: Float!, validationErrors: Float!, ageHours: Float! }\ntype ImportsRecord42Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ImportsRecord42Summary { selected: [ImportsRecord42Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeImports(records: [ImportsRecord42Input!]!, min: Float!, max: Float!, limit: Int!): ImportsRecord42Summary! }"}} {"submissionId":"cmsxlwo3s00lzkup2eweanb8g","title":"Submission EANB8G","payload":{"sample_query":"query Ranked43 { selectCreators(records: [{ id: \"A\", engagement: 96, brandSafety: 8, costK: 12 },{ id: \"B\", engagement: 103, brandSafety: 9, costK: 17 },{ id: \"C\", engagement: 110, brandSafety: 1, costK: 5 },{ id: \"D\", engagement: 117, brandSafety: 2, costK: 10 },{ id: \"E\", engagement: 124, brandSafety: 3, costK: 15 }], min: 5, max: 15, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectCreators: (_, {records,min,max,limit}) => { const eligible=records.filter(({engagement,brandSafety,costK})=>brandSafety>=min && costK<=max); const ranked=eligible.map(r=>{const {engagement,brandSafety,costK}=r;return {...r,score:engagement*brandSafety-costK,flagged:engagement<0.05}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectCreators\":{\"eligibleCount\":1,\"cutoffScore\":756,\"selected\":[{\"id\":\"A\",\"score\":756,\"flagged\":false,\"rank\":1}]}}}","schema_definition":"input CreatorsRecord43Input { id: ID!, engagement: Float!, brandSafety: Float!, costK: Float! }\ntype CreatorsRecord43Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype CreatorsRecord43Summary { selected: [CreatorsRecord43Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectCreators(records: [CreatorsRecord43Input!]!, min: Float!, max: Float!, limit: Int!): CreatorsRecord43Summary! }"}} {"submissionId":"cmsxlwo3s00m0kup2unbltrlj","title":"Submission BLTRLJ","payload":{"sample_query":"query Ranked44 { rankZones(records: [{ id: \"A\", populationK: 98, responseMinutes: 9, hazardLevel: 15 },{ id: \"B\", populationK: 105, responseMinutes: 1, hazardLevel: 3 },{ id: \"C\", populationK: 112, responseMinutes: 2, hazardLevel: 8 },{ id: \"D\", populationK: 119, responseMinutes: 3, hazardLevel: 13 },{ id: \"E\", populationK: 126, responseMinutes: 4, hazardLevel: 18 }], min: 2, max: 16, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankZones: (_, {records,min,max,limit}) => { const eligible=records.filter(({populationK,responseMinutes,hazardLevel})=>hazardLevel>=min && responseMinutes<=max); const ranked=eligible.map(r=>{const {populationK,responseMinutes,hazardLevel}=r;return {...r,score:populationK*hazardLevel-responseMinutes,flagged:responseMinutes>20}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankZones\":{\"eligibleCount\":5,\"cutoffScore\":894,\"selected\":[{\"id\":\"E\",\"score\":2264,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":1544,\"flagged\":false,\"rank\":2},{\"id\":\"A\",\"score\":1461,\"flagged\":false,\"rank\":3},{\"id\":\"C\",\"score\":894,\"flagged\":false,\"rank\":4}]}}}","schema_definition":"input ZonesRecord44Input { id: ID!, populationK: Float!, responseMinutes: Float!, hazardLevel: Float! }\ntype ZonesRecord44Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype ZonesRecord44Summary { selected: [ZonesRecord44Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankZones(records: [ZonesRecord44Input!]!, min: Float!, max: Float!, limit: Int!): ZonesRecord44Summary! }"}} {"submissionId":"cmsxlwo3s00m1kup2j3z5rbtl","title":"Submission Z5RBTL","payload":{"sample_query":"query Ranked45 { chooseVendors(records: [{ id: \"A\", uptime: 100, priceK: 1, breachCount: 18 },{ id: \"B\", uptime: 107, priceK: 2, breachCount: 6 },{ id: \"C\", uptime: 114, priceK: 3, breachCount: 11 },{ id: \"D\", uptime: 121, priceK: 4, breachCount: 16 },{ id: \"E\", uptime: 128, priceK: 5, breachCount: 4 }], min: 3, max: 17, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseVendors: (_, {records,min,max,limit}) => { const eligible=records.filter(({uptime,priceK,breachCount})=>uptime>=min && priceK<=max); const ranked=eligible.map(r=>{const {uptime,priceK,breachCount}=r;return {...r,score:uptime*100-priceK-breachCount*20,flagged:breachCount>0}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseVendors\":{\"eligibleCount\":5,\"cutoffScore\":11776,\"selected\":[{\"id\":\"E\",\"score\":12715,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":11776,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input VendorsRecord45Input { id: ID!, uptime: Float!, priceK: Float!, breachCount: Float! }\ntype VendorsRecord45Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype VendorsRecord45Summary { selected: [VendorsRecord45Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseVendors(records: [VendorsRecord45Input!]!, min: Float!, max: Float!, limit: Int!): VendorsRecord45Summary! }"}} {"submissionId":"cmsxlwo3s00m2kup21whp6oob","title":"Submission HP6OOB","payload":{"sample_query":"query Ranked46 { prioritizeBuilds(records: [{ id: \"A\", failedTests: 102, ageMinutes: 2, ownerLoad: 4 },{ id: \"B\", failedTests: 109, ageMinutes: 3, ownerLoad: 9 },{ id: \"C\", failedTests: 116, ageMinutes: 4, ownerLoad: 14 },{ id: \"D\", failedTests: 123, ageMinutes: 5, ownerLoad: 2 },{ id: \"E\", failedTests: 130, ageMinutes: 6, ownerLoad: 7 }], min: 4, max: 18, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { prioritizeBuilds: (_, {records,min,max,limit}) => { const eligible=records.filter(({failedTests,ageMinutes,ownerLoad})=>failedTests>=min && ownerLoad<=max); const ranked=eligible.map(r=>{const {failedTests,ageMinutes,ownerLoad}=r;return {...r,score:failedTests*ageMinutes-ownerLoad,flagged:ageMinutes>90}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"prioritizeBuilds\":{\"eligibleCount\":5,\"cutoffScore\":450,\"selected\":[{\"id\":\"E\",\"score\":773,\"flagged\":false,\"rank\":1},{\"id\":\"D\",\"score\":613,\"flagged\":false,\"rank\":2},{\"id\":\"C\",\"score\":450,\"flagged\":false,\"rank\":3}]}}}","schema_definition":"input BuildsRecord46Input { id: ID!, failedTests: Float!, ageMinutes: Float!, ownerLoad: Float! }\ntype BuildsRecord46Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype BuildsRecord46Summary { selected: [BuildsRecord46Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { prioritizeBuilds(records: [BuildsRecord46Input!]!, min: Float!, max: Float!, limit: Int!): BuildsRecord46Summary! }"}} {"submissionId":"cmsxlwo3s00m3kup2urdwwivp","title":"Submission DWWIVP","payload":{"sample_query":"query Ranked47 { selectGrants(records: [{ id: \"A\", impactScore: 104, costK: 3, deliveryRisk: 7 },{ id: \"B\", impactScore: 111, costK: 4, deliveryRisk: 12 },{ id: \"C\", impactScore: 118, costK: 5, deliveryRisk: 17 },{ id: \"D\", impactScore: 125, costK: 6, deliveryRisk: 5 },{ id: \"E\", impactScore: 132, costK: 7, deliveryRisk: 10 }], min: 5, max: 19, limit: 4) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { selectGrants: (_, {records,min,max,limit}) => { const eligible=records.filter(({impactScore,costK,deliveryRisk})=>impactScore>=min && costK<=max); const ranked=eligible.map(r=>{const {impactScore,costK,deliveryRisk}=r;return {...r,score:impactScore/costK-deliveryRisk,flagged:deliveryRisk>0.4}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"selectGrants\":{\"eligibleCount\":5,\"cutoffScore\":8.8571,\"selected\":[{\"id\":\"A\",\"score\":27.6667,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":15.8333,\"flagged\":true,\"rank\":2},{\"id\":\"B\",\"score\":15.75,\"flagged\":true,\"rank\":3},{\"id\":\"E\",\"score\":8.8571,\"flagged\":true,\"rank\":4}]}}}","schema_definition":"input GrantsRecord47Input { id: ID!, impactScore: Float!, costK: Float!, deliveryRisk: Float! }\ntype GrantsRecord47Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype GrantsRecord47Summary { selected: [GrantsRecord47Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { selectGrants(records: [GrantsRecord47Input!]!, min: Float!, max: Float!, limit: Int!): GrantsRecord47Summary! }"}} {"submissionId":"cmsxlwo3s00m4kup2otzd3ppg","title":"Submission ZD3PPG","payload":{"sample_query":"query Ranked48 { rankAccounts(records: [{ id: \"A\", revenueK: 106, growthRate: 4, defaultRisk: 10 },{ id: \"B\", revenueK: 113, growthRate: 5, defaultRisk: 15 },{ id: \"C\", revenueK: 120, growthRate: 6, defaultRisk: 3 },{ id: \"D\", revenueK: 127, growthRate: 7, defaultRisk: 8 },{ id: \"E\", revenueK: 134, growthRate: 8, defaultRisk: 13 }], min: 2, max: 12, limit: 2) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { rankAccounts: (_, {records,min,max,limit}) => { const eligible=records.filter(({revenueK,growthRate,defaultRisk})=>growthRate>=min && defaultRisk<=max); const ranked=eligible.map(r=>{const {revenueK,growthRate,defaultRisk}=r;return {...r,score:revenueK*growthRate-defaultRisk*100,flagged:defaultRisk>0.15}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"rankAccounts\":{\"eligibleCount\":3,\"cutoffScore\":89,\"selected\":[{\"id\":\"C\",\"score\":420,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":89,\"flagged\":true,\"rank\":2}]}}}","schema_definition":"input AccountsRecord48Input { id: ID!, revenueK: Float!, growthRate: Float!, defaultRisk: Float! }\ntype AccountsRecord48Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype AccountsRecord48Summary { selected: [AccountsRecord48Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { rankAccounts(records: [AccountsRecord48Input!]!, min: Float!, max: Float!, limit: Int!): AccountsRecord48Summary! }"}} {"submissionId":"cmsxlwo3s00m5kup2a5jz2wf3","title":"Submission JZ2WF3","payload":{"sample_query":"query Ranked49 { chooseNodes(records: [{ id: \"A\", throughput: 108, latencyMs: 5, failureRate: 13 },{ id: \"B\", throughput: 115, latencyMs: 6, failureRate: 18 },{ id: \"C\", throughput: 122, latencyMs: 7, failureRate: 6 },{ id: \"D\", throughput: 129, latencyMs: 8, failureRate: 11 },{ id: \"E\", throughput: 136, latencyMs: 9, failureRate: 16 }], min: 3, max: 13, limit: 3) { eligibleCount cutoffScore selected { id score flagged rank } } }","resolver_code":"Query: { chooseNodes: (_, {records,min,max,limit}) => { const eligible=records.filter(({throughput,latencyMs,failureRate})=>throughput>=min && latencyMs<=max); const ranked=eligible.map(r=>{const {throughput,latencyMs,failureRate}=r;return {...r,score:throughput-latencyMs-failureRate*1000,flagged:failureRate>0.01}}).sort((x,y)=>y.score-x.score||String(x.id).localeCompare(String(y.id))); const selected=ranked.slice(0,Math.max(0,limit)).map((r,j)=>({id:r.id,score:Number(r.score.toFixed(4)),flagged:r.flagged,rank:j+1})); return {selected,eligibleCount:eligible.length,cutoffScore:selected.length?selected[selected.length-1].score:null}; } }","expected_response":"{\"data\":{\"chooseNodes\":{\"eligibleCount\":5,\"cutoffScore\":-12897,\"selected\":[{\"id\":\"C\",\"score\":-5885,\"flagged\":true,\"rank\":1},{\"id\":\"D\",\"score\":-10879,\"flagged\":true,\"rank\":2},{\"id\":\"A\",\"score\":-12897,\"flagged\":true,\"rank\":3}]}}}","schema_definition":"input NodesRecord49Input { id: ID!, throughput: Float!, latencyMs: Float!, failureRate: Float! }\ntype NodesRecord49Result { id: ID!, score: Float!, flagged: Boolean!, rank: Int! }\ntype NodesRecord49Summary { selected: [NodesRecord49Result!]!, eligibleCount: Int!, cutoffScore: Float }\ntype Query { chooseNodes(records: [NodesRecord49Input!]!, min: Float!, max: Float!, limit: Int!): NodesRecord49Summary! }"}} {"submissionId":"cmtv4fga1001c01s3k15snkls","title":"Filter blog posts by published status","payload":{"sample_query":"{ posts(published: true) { id title } }","resolver_code":"Query: { posts: (_, {published}) => {\n const all = [\n {id: \"1\", title: \"Draft One\", published: false},\n {id: \"2\", title: \"Live Post\", published: true},\n {id: \"3\", title: \"Another Live\", published: true}\n ];\n return published === undefined ? all : all.filter(p => p.published === published);\n} }","expected_response":"{\"data\": {\"posts\": [{\"id\": \"2\", \"title\": \"Live Post\"}, {\"id\": \"3\", \"title\": \"Another Live\"}]}}","schema_definition":"type Post { id: ID!, title: String!, published: Boolean! }\ntype Query { posts(published: Boolean): [Post!]! }"}} {"submissionId":"cmtv4fgc4001u01s3lscc4huf","title":"Square root resolver rejects negative input","payload":{"sample_query":"{ squareRoot(value: -4) }","resolver_code":"Query: { squareRoot: (_, {value}) => {\n if (value < 0) throw new Error('cannot take square root of a negative number');\n return Math.sqrt(value);\n} }","expected_response":"{\"errors\": [{\"message\": \"cannot take square root of a negative number\"}]}","schema_definition":"type Query { squareRoot(value: Float!): Float! }"}} {"submissionId":"cmtv4fget002c01s3yf0qlpz4","title":"Team members with per-member filtered task lists","payload":{"sample_query":"{ members { name tasks(status: \"open\") { title } } }","resolver_code":"Query: { members: () => ([\n {id: \"1\", name: \"Ada\"},\n {id: \"2\", name: \"Grace\"}\n]) },\nMember: { tasks: (member, {status}) => {\n const allTasks = {\n \"1\": [{id: \"t1\", title: \"Design API\", status: \"done\"}, {id: \"t2\", title: \"Write tests\", status: \"open\"}],\n \"2\": [{id: \"t3\", title: \"Deploy service\", status: \"open\"}]\n };\n const tasks = allTasks[member.id] || [];\n return status ? tasks.filter(t => t.status === status) : tasks;\n} }","expected_response":"{\"data\": {\"members\": [{\"name\": \"Ada\", \"tasks\": [{\"title\": \"Write tests\"}]}, {\"name\": \"Grace\", \"tasks\": [{\"title\": \"Deploy service\"}]}]}}","schema_definition":"type Task { id: ID!, title: String!, status: String! }\ntype Member { id: ID!, name: String!, tasks(status: String): [Task!]! }\ntype Query { members: [Member!]! }"}} {"submissionId":"cmtv4fggh002u01s3oe7m67ad","title":"Enum-driven ascending/descending number sort","payload":{"sample_query":"{ numbers(order: DESC) }","resolver_code":"Query: { numbers: (_, {order}) => {\n const nums = [3, 1, 4, 1, 5, 9, 2, 6];\n const sorted = [...nums].sort((a,b) => a-b);\n return order === \"ASC\" ? sorted : sorted.reverse();\n} }","expected_response":"{\"data\": {\"numbers\": [9,6,5,4,3,2,1,1]}}","schema_definition":"enum SortOrder { ASC DESC }\ntype Query { numbers(order: SortOrder!): [Int!]! }"}} {"submissionId":"cmtv4fgi5003c01s31lkbl00p","title":"Discounted price with default percent-off argument","payload":{"sample_query":"{ discountedPrice(price: 49.99) }","resolver_code":"Query: { discountedPrice: (_, {price, percentOff}) => {\n const result = price * (1 - percentOff / 100);\n return Math.round(result * 100) / 100;\n} }","expected_response":"{\"data\": {\"discountedPrice\": 44.99}}","schema_definition":"type Query { discountedPrice(price: Float!, percentOff: Int = 10): Float! }"}} {"submissionId":"cmtv4fgjj003u01s324e38s8w","title":"Aliased calls to the same resolver with different arguments","payload":{"sample_query":"{ a: square(n: 3) b: square(n: 4) }","resolver_code":"Query: { square: (_, {n}) => n * n }","expected_response":"{\"data\": {\"a\": 9, \"b\": 16}}","schema_definition":"type Query { square(n: Int!): Int! }"}} {"submissionId":"cmtv4fglm004c01s3637mwttg","title":"Article with empty comment list resolved from id lookup","payload":{"sample_query":"{ article(id: \"2\") { title comments { text authorName } } }","resolver_code":"Query: { article: (_, {id}) => {\n const db = {\n \"1\": {id: \"1\", title: \"GraphQL Basics\", commentIds: [\"c1\", \"c2\"]},\n \"2\": {id: \"2\", title: \"Advanced Resolvers\", commentIds: []}\n };\n return db[id] || null;\n} },\nArticle: { comments: (article) => {\n const allComments = {\n \"c1\": {id: \"c1\", text: \"Great post!\", authorName: \"Ada\"},\n \"c2\": {id: \"c2\", text: \"Very helpful.\", authorName: \"Grace\"}\n };\n return (article.commentIds || []).map(cid => allComments[cid]);\n} }","expected_response":"{\"data\": {\"article\": {\"title\": \"Advanced Resolvers\", \"comments\": []}}}","schema_definition":"type Comment { id: ID!, text: String!, authorName: String! }\ntype Article { id: ID!, title: String!, comments: [Comment!]! }\ntype Query { article(id: ID!): Article }"}} {"submissionId":"cmtv4fgp0005c01s3f5z95cai","title":"Two independent root fields evaluated on the same input","payload":{"sample_query":"{ isEven(n: -4) isPositive(n: -4) }","resolver_code":"Query: {\n isEven: (_, {n}) => n % 2 === 0,\n isPositive: (_, {n}) => n > 0\n}","expected_response":"{\"data\": {\"isEven\": true, \"isPositive\": false}}","schema_definition":"type Query { isEven(n: Int!): Boolean!, isPositive(n: Int!): Boolean! }"}} {"submissionId":"cmtv4fgqh005u01s3xz6w0uf0","title":"Paginated letter list with limit and offset arguments","payload":{"sample_query":"{ letters(limit: 2, offset: 3) }","resolver_code":"Query: { letters: (_, {limit, offset}) => {\n const all = [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\"];\n return all.slice(offset, offset + limit);\n} }","expected_response":"{\"data\": {\"letters\": [\"d\",\"e\"]}}","schema_definition":"type Query { letters(limit: Int = 3, offset: Int = 0): [String!]! }"}} {"submissionId":"cmtv4fgs8006c01s3i4vtprm5","title":"Order lines with computed line totals from a price lookup","payload":{"sample_query":"{ orderLines { productName quantity total } }","resolver_code":"Query: { orderLines: () => {\n const prices = { \"Widget\": 10.5, \"Gadget\": 9.25 };\n const lines = [\n {productName: \"Widget\", quantity: 3},\n {productName: \"Gadget\", quantity: 4}\n ];\n return lines.map(l => ({\n productName: l.productName,\n quantity: l.quantity,\n total: Math.round(prices[l.productName] * l.quantity * 100) / 100\n }));\n} }","expected_response":"{\"data\": {\"orderLines\": [{\"productName\": \"Widget\", \"quantity\": 3, \"total\": 31.5}, {\"productName\": \"Gadget\", \"quantity\": 4, \"total\": 37}]}}","schema_definition":"type OrderLine { productName: String!, quantity: Int!, total: Float! }\ntype Query { orderLines: [OrderLine!]! }"}} {"submissionId":"cmtx0uksv0fw801nxokhenasr","title":"Invoice totals with voided-line filtering and threshold discount","payload":{"sample_query":"{\n bill: invoice(id: \"INV-7\") {\n id\n currency\n visible: lines { sku quantity unitCents status }\n all: lines(includeVoided: true) { sku status }\n subtotalCents\n discountCents\n payableCents\n }\n}","resolver_code":"Query: {\n invoice: (_, { id }) => {\n const invoices = [{\n id: \"INV-7\",\n currency: \"USD\",\n lines: [\n { sku: \"A-RED\", quantity: 2, unitCents: 1500, status: \"ACTIVE\" },\n { sku: \"B-OLD\", quantity: 1, unitCents: 2500, status: \"VOIDED\" },\n { sku: \"C-BLU\", quantity: 3, unitCents: 900, status: \"ACTIVE\" }\n ]\n }];\n return invoices.find(invoice => invoice.id === id) || null;\n }\n},\nInvoice: {\n lines: (invoice, { includeVoided }) =>\n includeVoided ? invoice.lines : invoice.lines.filter(line => line.status === \"ACTIVE\"),\n subtotalCents: (invoice, { includeVoided }) => {\n const lines = includeVoided ? invoice.lines : invoice.lines.filter(line => line.status === \"ACTIVE\");\n return lines.reduce((sum, line) => sum + line.quantity * line.unitCents, 0);\n },\n discountCents: invoice => {\n const subtotal = invoice.lines\n .filter(line => line.status === \"ACTIVE\")\n .reduce((sum, line) => sum + line.quantity * line.unitCents, 0);\n return subtotal >= 5000 ? Math.floor(subtotal * 0.10) : 0;\n },\n payableCents: invoice => {\n const subtotal = invoice.lines\n .filter(line => line.status === \"ACTIVE\")\n .reduce((sum, line) => sum + line.quantity * line.unitCents, 0);\n const discount = subtotal >= 5000 ? Math.floor(subtotal * 0.10) : 0;\n return subtotal - discount;\n }\n}","expected_response":"{\"data\":{\"bill\":{\"id\":\"INV-7\",\"currency\":\"USD\",\"visible\":[{\"sku\":\"A-RED\",\"quantity\":2,\"unitCents\":1500,\"status\":\"ACTIVE\"},{\"sku\":\"C-BLU\",\"quantity\":3,\"unitCents\":900,\"status\":\"ACTIVE\"}],\"all\":[{\"sku\":\"A-RED\",\"status\":\"ACTIVE\"},{\"sku\":\"B-OLD\",\"status\":\"VOIDED\"},{\"sku\":\"C-BLU\",\"status\":\"ACTIVE\"}],\"subtotalCents\":5700,\"discountCents\":570,\"payableCents\":5130}}}","schema_definition":"enum LineStatus { ACTIVE VOIDED }\ntype Line { sku: String!, quantity: Int!, unitCents: Int!, status: LineStatus! }\ntype Invoice {\n id: ID!\n currency: String!\n lines(includeVoided: Boolean = false): [Line!]!\n subtotalCents(includeVoided: Boolean = false): Int!\n discountCents: Int!\n payableCents: Int!\n}\ntype Query { invoice(id: ID!): Invoice }"}}