charlypoly / spotify-graphql

GraphQL schema for Spotify WebAPI — TypeScript / Node.js (v6)
MIT License
278 stars 27 forks source link

Add images #30

Closed rshkv closed 7 years ago

rshkv commented 7 years ago

I'm using your library to query tracks, and I would like to display their album covers. I took from this, that your album's don't include images.

Is images something you intend to add in the near future? Or can you point me to what I'd have to do to add them to the schema? This is my first time with GraphQL, but I know that the SpotifyApi includes images when you query tracks or albums. I assume it wouldn't need extra calls.

Would appreciate 🙂.

charlypoly commented 7 years ago

Hi @rshkv,

That's a good request, I'll plan to implement the images for all types that need it by the end of week.

See #31

Cheers !

rshkv commented 7 years ago

Awesome! Thank you very much, @wittydeveloper.

charlypoly commented 7 years ago

@rshkv , it's released !

See https://github.com/thefrenchhouse/spotify-graphql/blob/master/CHANGELOG.md#110-2017-03-15

You can now do the following :

query {
    track(id: "1zHlj4dQ8ZAtrayhuDDmk4") {
        id
        name
        album {
            id
            name
            images {
                url
                height
                width
            }
        }
    }
}

Images are available on following types : Artist, Playlist, Album and User

Tell me if you have other requests, I'll be happy to add some features!

rshkv commented 7 years ago

Thanks!