Skip to content

Instantly share code, notes, and snippets.

@antonkalik
Created August 30, 2022 15:54
Show Gist options
  • Save antonkalik/0ea2beb6ffc668e591a656d39d12a5a3 to your computer and use it in GitHub Desktop.
Save antonkalik/0ea2beb6ffc668e591a656d39d12a5a3 to your computer and use it in GitHub Desktop.
Resolvers GraphQL Schema
const fakeData = {
id: 4838745,
value: 'Some Random String',
};
module.exports = {
Query: {
getFakeDataExample: () => fakeData,
},
Mutation: {
updateFakeData: (_, { value }) => {
return {
...fakeData,
value,
};
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment