submissionId stringlengths 25 25 | title stringlengths 17 64 | payload dict |
|---|---|---|
cmsuk7q7p00qig4p2wckiypkd | Submission KIYPKD | {
"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 ... |
cmsuk7q7p00qkg4p2525ffeap | Submission 5FFEAP | {
"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: ... |
cmsuk7q7p00qlg4p2h35t6nu2 | Submission 5T6NU2 | {
"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\... |
cmsuk7q7p00qmg4p2fn60y23b | Submission 60Y23B | {
"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 ... |
cmsuk7q7p00qng4p2m53cfyw7 | Submission 3CFYW7 | {
"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\"... |
cmsuk7q7p00qpg4p23lv51f7x | Submission V51F7X | {
"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: ... |
cmsuk7q7p00qqg4p2rbbkrd64 | Submission BKRD64 | {
"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\"... |
cmsuk7q7p00qrg4p2rvm29nja | Submission M29NJA | {
"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\", s... |
cmsuk7q7p00qsg4p2bbwmv7lh | Submission WMV7LH | {
"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: ... |
cmsuk7q7p00qtg4p2sr2we1dt | Submission 2WE1DT | {
"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 ... |
cmsuk7q7p00qug4p2k3b7wvhf | Submission B7WVHF | {
"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 list... |
cmsumxkvi011cg4p2hilr9n6m | Submission LR9N6M | {
"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 Re... |
cmsumxkvi011dg4p2u6j6q6mr | Submission J6Q6MR | {
"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 ... |
cmsumxkvj011eg4p202nrvz84 | Submission NRVZ84 | {
"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\"}]}}}... |
cmsumxkvj011fg4p2z7nxvogf | Submission NXVOGF | {
"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 Qu... |
cmsumxkvj011gg4p22k1t1x73 | Submission 1T1X73 | {
"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 }",
"expec... |
cmsv745kg01aag4p2xmrdi1ga | Submission RDI1GA | {
"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... |
cmsv74niu01ajg4p23req7nkx | Submission EQ7NKX | {
"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); r... |
cmsv756cq01atg4p2rj2u9gm0 | Submission 2U9GM0 | {
"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 }; } }",
... |
cmsv75kt501b4g4p2alwubliq | Submission WUBLIQ | {
"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.bala... |
cmsv761dl01bfg4p25i1jx777 | Submission 1JX777 | {
"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\"... |
cmsv76gbv01bqg4p23zwx0m6b | Submission WX0M6B | {
"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_defin... |
cmsv76u3101c0g4p2znr56ism | Submission R56ISM | {
"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... |
cmsv779me01cbg4p2eiqw7ks9 | Submission QW7KS9 | {
"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 } ] }",
... |
cmsv77qk301cmg4p2e5sh4g3i | Submission SH4G3I | {
"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 |... |
cmsv785l101cwg4p2jes42s44 | Submission S42S44 | {
"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'}, a... |
cmsv78k3y01d7g4p2m2dbfjek | Submission DBFJEK | {
"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... |
cmsv78zxl01dhg4p2rjs9oix7 | Submission S9OIX7 | {
"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 start... |
cmsv79k2t01dtg4p2kic9hk9p | Submission C9HK9P | {
"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]; c... |
cmsv79xhr01e4g4p2je7eu0x8 | Submission 7EU0X8 | {
"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... |
cmsv7acqm01efg4p2cd4t8abo | Submission 4T8ABO | {
"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; ret... |
cmsv7atfj01emg4p2jcqx6m4i | Submission QX6M4I | {
"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:... |
cmsv7b9fh01etg4p2zc4q9qv7 | Submission 4Q9QV7 | {
"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]... |
cmsv7bnlg01ezg4p22u5admyl | Submission 5ADMYL | {
"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_respo... |
cmsv7c18x01f3g4p24ocivpwf | Submission CIVPWF | {
"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 ... |
cmsv7ch0u01f8g4p2z5zfugvx | Submission ZFUGVX | {
"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 ca... |
cmsv7ea5701fmg4p2ixp4q56s | Submission P4Q56S | {
"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'},... |
cmsv7eoev01fpg4p2jzyk3pdx | Submission YK3PDX | {
"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 ca... |
cmsv8f8nl01heg4p21eb1uvgk | Submission B1UVGK | {
"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: Stri... |
cmsv8ghvo01hjg4p2ntb8imwq | Submission B8IMWQ | {
"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\":{\"d... |
cmsv8hr3701hog4p2u8sr9tuw | Submission SR9TUW | {
"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}",
... |
cmsv8irei01hsg4p2x1f13913 | Submission F13913 | {
"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}",... |
cmsv8jfw001hwg4p2rx0ug26l | Submission 0UG26L | {
"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\"... |
cmsv8k15201i0g4p21p3pjfjs | Submission 3PJFJS | {
"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": "{\... |
cmsv8kk8701i4g4p2murn6dck | Submission RN6DCK | {
"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 {... |
cmsv8l1qi01i8g4p2qae4s3rd | Submission E4S3RD | {
"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": "{\... |
cmsv8ljw301ibg4p2u2srcz6g | Submission SRCZ6G | {
"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 Profil... |
cmsv8m2s801ieg4p2exehbnoz | Submission EHBNOZ | {
"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.m... |
cmsv8me6e01ifg4p2nd05u54o | Submission 05U54O | {
"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... |
cmsv8mvlu01iig4p21j4yzqyd | Submission 4YZQYD | {
"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\":\"... |
cmsv8ng4d01ikg4p2x539uf9a | Submission 39UF9A | {
"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_respo... |
cmsv8nygr01img4p29itfyvuk | Submission TFYVUK | {
"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]... |
cmsv8odgf01iog4p26cr96axx | Submission R96AXX | {
"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}"
} |
cmsv8ot8b01iqg4p2sdj416r1 | Submission J416R1 | {
"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}"
} |
cmsv8p87401isg4p2jxptis6j | Submission PTIS6J | {
"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}",
... |
cmsv8pxil01itg4p2qnpzpxsa | Submission PZPXSA | {
"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... |
cmsv8qgnu01iug4p26oi3mhzd | Submission I3MHZD | {
"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... |
cmsv8qzfx01ivg4p2scdolm67 | Submission DOLM67 | {
"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":... |
cmsv8rjsd01iwg4p2l12xse28 | Submission 2XSE28 | {
"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... |
cmsvaxhlw01n8g4p2i7yfrjyh | Submission YFRJYH | {
"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 { __typena... |
cmsvaxhlw01n9g4p2ev459nm9 | Submission 459NM9 | {
"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... |
cmsvaxhlw01nag4p2xx7lbnzc | Submission 7LBNZC | {
"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... |
cmsvaxhlw01nbg4p27haql0di | Submission AQL0DI | {
"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\"... |
cmsvaxhlw01ncg4p21lqi4yl2 | Submission QI4YL2 | {
"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: a... |
cmsvaxhlw01ndg4p2yubh3et0 | Submission BH3ET0 | {
"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 loo... |
cmsvaxhlw01neg4p2vyrg4m4f | Submission RG4M4F | {
"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... |
cmsvaxhlw01nfg4p2xcvetydd | Submission VETYDD | {
"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() ... |
cmsvaxhlw01ngg4p2oidvvye0 | Submission DVVYE0 | {
"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,... |
cmsvaxhlw01nhg4p2hn8913mu | Submission 8913MU | {
"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 } }) },\nI... |
cmsvaxhlw01nig4p2p2sjf41z | Submission SJF41Z | {
"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: [] }) },\nRe... |
cmsvaxhlw01njg4p25vvjgwao | Submission VJGWAO | {
"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) => ({... |
cmsvaxhlw01nkg4p2oftcj3mf | Submission TCJ3MF | {
"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 defaulte... |
cmsvaxhlw01nlg4p2k9fsv0cz | Submission FSV0CZ | {
"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\\\".\"}]}",
"sch... |
cmsvaxhlw01nmg4p261qwqn84 | Submission QWQN84 | {
"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 signe... |
cmsvaxhlw01nng4p2dpfboej8 | Submission FBOEJ8 | {
"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... |
cmsvaxhlw01nog4p20a7y51mw | Submission 7Y51MW | {
"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 lad... |
cmsvaxhlw01npg4p2griy4a32 | Submission IY4A32 | {
"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: (_, {... |
cmsvaxhlw01nqg4p2l89hetd2 | Submission 9HETD2 | {
"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: ... |
cmsvaxhlw01nrg4p2ple4dsio | Submission E4DSIO | {
"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: 36... |
cmsvg9tqv01owg4p2ln3uhzxb | Submission 3UHZXB | {
"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\",... |
cmsvg9tqv01oxg4p2ycphjpe6 | Submission PHJPE6 | {
"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}... |
cmsvg9tqv01oyg4p2e6tbf2sa | Submission TBF2SA | {
"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\": \"insuf... |
cmsvg9tqv01ozg4p2i131yj1f | Submission 31YJ1F | {
"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": ... |
cmsvg9tqv01p0g4p2ewt8cutm | Submission T8CUTM | {
"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... |
cmsvgn37f01qpg4p2god9g3me | Submission D9G3ME | {
"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.le... |
cmsvgn37g01qqg4p2ix7og4uz | Submission 7OG4UZ | {
"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 ${... |
cmsvgn37g01qrg4p264h61ew8 | Submission H61EW8 | {
"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}] ... |
cmsvgn37g01qsg4p2w97kltue | Submission 7KLTUE | {
"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 ]... |
cmsvgn37g01qtg4p2zz3duih1 | Submission 3DUIH1 | {
"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_definitio... |
cmsvgn37g01qug4p21q8jvy67 | Submission 8JVY67 | {
"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":... |
cmsvgn37g01qvg4p22z6mepsu | Submission 6MEPSU | {
"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_respon... |
cmsvgn37g01qwg4p27rve81ae | Submission VE81AE | {
"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\", subcateg... |
cmsvgn37g01qxg4p2qaoawu8m | Submission OAWU8M | {
"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_de... |
cmsvgn37g01qyg4p20pzbxdte | Submission ZBXDTE | {
"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_respon... |
cmsvgn37g01qzg4p2cv8k4iv8 | Submission 8K4IV8 | {
"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}",
... |
cmsvgn37g01r0g4p2gw6hvemg | Submission 6HVEMG | {
"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}]}}",
... |
cmsvgn37g01r1g4p24iheihbp | Submission HEIHBP | {
"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:... |
cmsvgn37g01r2g4p2q01f1yc1 | Submission 1F1YC1 | {
"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.loca... |
cmsvgn37g01r3g4p2g1bkur12 | Submission BKUR12 | {
"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_defin... |
cmsvgn37g01r4g4p2wxsxvll2 | Submission SXVLL2 | {
"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:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.