Created
August 30, 2022 15:24
-
-
Save antonkalik/d3d0b867f955dcbc0f6d8b11e1b81cbe to your computer and use it in GitHub Desktop.
Resolvers for GraphQL Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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