Created
September 11, 2019 07:23
-
-
Save mugan86/8d87284c1f9740dd3c4f9a3f269cc789 to your computer and use it in GitHub Desktop.
Obtener la información pasando el ID mediante Query Variables
This file contains 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
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