Created
September 11, 2019 05:50
-
-
Save mugan86/3796c212760d1cd37b17533f598ef562 to your computer and use it in GitHub Desktop.
Add queries to work with queries in GraphQL from Javascript
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
module.exports = { | |
apiUrl: 'https://breaking-bad-voting.herokuapp.com/graphql', | |
queries: { | |
getCharacters: `{ | |
characters { | |
id | |
name | |
actor | |
total_episodes | |
} | |
}`, | |
getCharacterWalter: `{ | |
character (id: "1") { | |
id | |
name | |
total_episodes | |
votes | |
} | |
}`, | |
getSelectCharacter: ` | |
query getCharacter($id: ID!) { | |
character (id: $id) { | |
id | |
name | |
actor | |
} | |
}` | |
}, | |
mutations: { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment