Skip to content

Instantly share code, notes, and snippets.

@kluu1
Last active March 25, 2020 14:08
Show Gist options
  • Select an option

  • Save kluu1/97237370abdd0ce2ab2c01af4c44d52d to your computer and use it in GitHub Desktop.

Select an option

Save kluu1/97237370abdd0ce2ab2c01af4c44d52d to your computer and use it in GitHub Desktop.
module.exports.resolvers = {
Query: {
getOrders: (_, args) => {
const orders = [
{
id: '1977',
amount: 10.0,
tax: 0.5,
total: 10.5,
},
{
id: '1978',
amount: 20.0,
tax: 1.0,
total: 21.0,
},
{
id: '1979',
amount: 30.0,
tax: 1.5,
total: 31.5,
},
];
return orders;
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment