Built-in support for GraphQL
POST https://spotify-graphql-server.herokuapp.com/graphql
Qodex launched built-in support for GraphQL in version 7.2.
If you're using Qodex v7.2 or later, the app supports the following:
- Sending GraphQL queries in request body as POST requests
- Support for GraphQL variables
- Creating APIs in Qodex with GraphQL schema type
- Query autocompletion integrated with user-defined GraphQL schemas
This example is from this step-by-step tutorial about how to use Qodex with the Spotify GraphQL API.
](/assets/blogs/https://i.imgur.com/4nKoPU7.png)
To enable the autocompletion, you will need to add a GraphQL schema under the APIs tab, and then select the schema while typing your query. An example GraphQL schema:
type Album {
name: String
id: ID
image: String
tracks: [Track]
}
type Artist {
name: String!
id: ID
image: String
albums(limit: Int = 10): [Album]
}
type Query {
hi(message: String = "Hi"): String
queryArtists(byName: String = "Red Hot Chili Peppers"): [Artist]
}
type Track {
name: String!
artists: [Artist]
preview_url: String
id: ID
}
RESPONSES
status: OK
{"data":{"queryArtists":[{"name":"Pink Floyd","image":"https://i.scdn.co/image/e69f71e2be4b67b82af90fb8e9d805715e0684fa","albums":[{"name":"The Endless River"},{"name":"The Endless River"},{"name":"Pulse"},{"name":"Pulse (Live)"},{"name":"The Division Bell (2011 Remastered Version)"},{"name":"The Division Bell"},{"name":"Delicate Sound of Thunder (Live)"},{"name":"Delicate Sound Of Thunder"},{"name":"A Momentary Lapse of Reason"},{"name":"A Momentary Lapse of Reason"},{"name":"A Momentary Lapse Of Reason (2011 Remastered Version)"},{"name":"The Final Cut (2011 Remastered Version)"},{"name":"The Final Cut"},{"name":"The Wall"},{"name":"The Wall (Remastered)"},{"name":"Animals"},{"name":"Animals (2011 Remastered Version)"},{"name":"Wish You Were Here"},{"name":"Wish You Were Here [Remastered] (Remastered Version)"},{"name":"The Dark Side of the Moon"}]},{"name":"Dj Pink Floyd","image":"https://i.scdn.co/image/1e6e870d6fa368e77cb23fe628ca8d5d093f2d7c","albums":[{"name":"Go to Sleep"}]},{"name":"Think Pink Floyd","image":"https://i.scdn.co/image/15978deb5e42e26bbc81a0464084b9638457cb76","albums":[{"name":"Billy Martin"}]},{"name":"Pink Floyd Redux","image":"https://i.scdn.co/image/92911e90e7cfa8c64c2c790b22b75bce1e31508e","albums":[{"name":"A New Music Experience"},{"name":"Pink Floyd Redux"}]},{"name":"The Australian Pink Floyd Show","image":"https://i.scdn.co/image/4080bc55ea9ccc9f4fb101eae4c14351e832c382","albums":[{"name":"Exposed In The Light"},{"name":"Live at Hammersmith Apollo 2011"}]},{"name":"Celtic Pink Floyd","image":"https://i.scdn.co/image/41c1dd9c5d40e9e3d2e2abe90d7c6d751075af3b","albums":[{"name":"In Studio"},{"name":"Celtic Pink Floyd"}]},{"name":"The Pink Floyd Story","image":"https://i.scdn.co/image/2480d7c24b9ad93408a8455b1dc281d3f7239268","albums":[{"name":"The Great Gig In the Sky"},{"name":"American Horror Story - The Name Game"},{"name":"American Horror Story - The Name Game"},{"name":"Travellers - The Complete Fantasy Playlist"}]},{"name":"Floyd Pink","image":"https://i.scdn.co/image/5fd98e28dcbbaa97b3cc2ed84683589dddc424b4","albums":[{"name":"Money (Broke Version)"},{"name":"PUSH EP"}]},{"name":"Pink Floyd Project","image":"https://i.scdn.co/image/948813e539c645da4b8b0ef8a7560102a27bfc80","albums":[{"name":"Jelling Musikfestival 2012"}]},{"name":"Hungarian Pink Floyd Show","image":"https://i.scdn.co/image/53f81d7757b55320a9b4248cc96ef36d26f8dfe1","albums":[{"name":"On The Turning Away 2012"}]},{"name":"Atom Pink Floyd Tribute","image":"https://i.scdn.co/image/6cbd40d400a19ef0d86eec900b4cb78c18ed1354","albums":[{"name":"Tearing Down the Wall: Live 2015"},{"name":"Studio Sessions - Wish You Were Here"}]},{"name":"Pink Floyd Tribute Band","image":"","albums":[{"name":"World's Greatest Rock Anthems - The Only Rock Tributes Album You'll Ever Need! (Deluxe Version)"},{"name":"World's Greatest Rock Anthems - The only Rock Tributes album you'll ever need!"}]},{"name":"Made famous by Pink Floyd","image":"","albums":[{"name":"Lesbian Music"}]},{"name":"The Machine Perform Pink Floyd","image":"https://i.scdn.co/image/52a23a39ff1313c05a54a624734d90cc3057d34c","albums":[{"name":"Two Nights At The Keswick, Volume 2"},{"name":"The Machine Unplugged"},{"name":"Two Nights at the Keswick, Volume 1"}]},{"name":"THE ILLUSION A SOUND LIKE PINK FLOYD","image":"https://i.scdn.co/image/b83e98cbf88f9807fbe31c7cff33b959ba12cd67","albums":[{"name":"Project One"},{"name":"Leaving the Earth"}]}]}}