A sample Apollo server (GraphQL) with a Users service REST data source.
$ npm i
$ npm start
query GetUsers {
users {
id
firstName
lastName
email
}
}
mutation SaveUser($user: SaveUserInput!) {
saveUser(input: $user) {
firstName
lastName
email
}
}
{
"user": {
"firstName": "Guy",
"lastName": "Fieri",
"email": "guy.fieri@flavortown.com"
}
}
mutation {
removeUser(input: { id: 16 })
}