Skip to content

Instantly share code, notes, and snippets.

@antonkalik
Created August 30, 2022 15:24
Show Gist options
  • Save antonkalik/d3d0b867f955dcbc0f6d8b11e1b81cbe to your computer and use it in GitHub Desktop.
Save antonkalik/d3d0b867f955dcbc0f6d8b11e1b81cbe to your computer and use it in GitHub Desktop.
Resolvers for GraphQL Schema
const fakeData = {
id: 223421,
label: 'Some Label From External',
};
module.exports = {
Query: {
getItemsExternal: () => [fakeData],
},
Mutation: {
updateDataExternal: (_, { label }) => {
return {
...fakeData,
label,
};
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment