Skip to content

Instantly share code, notes, and snippets.

@mugan86
Created September 11, 2019 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mugan86/8d87284c1f9740dd3c4f9a3f269cc789 to your computer and use it in GitHub Desktop.
Save mugan86/8d87284c1f9740dd3c4f9a3f269cc789 to your computer and use it in GitHub Desktop.
Obtener la información pasando el ID mediante Query Variables
axios_.post(apiUrl, {
query: queries.getSelectCharacter,
variables: { id: '2'}
})
.then((res) => {
const character = res.data.data.character;
console.log(`Personaje seleccionado ID ${character.id} - ${character.name}`)
console.log(character)
})
.catch((error) => {
console.error(error)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment