LekoArts/gatsby-source-tmdb

Get movies in account list

moeriki opened this issue · 1 comments

I don't seem to be able to get the movie data from the accountLists. Is it correct that this functionality is not included at the moment?

If so I'd love to see it added. Can make PR.

It turns out it was possible, I just didn't know how. For those looking…

Gatsby config.

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-source-tmdb',
      options: {
        modules: {
          account: {
            activate: true,
            endpoints: { list: 'accountLists' },
          },
        },
      },
    },
  ]
};

Your component query.

query {
  tmdbAccountLists(name: {eq: "Name of my list"}) {
    items {
      id
      title
    }
  }
}