Skip to content

Instantly share code, notes, and snippets.

@martijnwalraven
Last active June 19, 2018 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martijnwalraven/14e8d152001e3227d8e30093f0d9c8e3 to your computer and use it in GitHub Desktop.
Save martijnwalraven/14e8d152001e3227d8e30093f0d9c8e3 to your computer and use it in GitHub Desktop.
Query: {
movie: async (_source, { id }, { dataSources }) => {
return dataSources.moviesAPI.getMovie(id);
},
mostViewedMovies: async (_source, _args, { dataSources }) => {
return dataSources.moviesAPI.getMostViewedMovies();
},
favorites: async (_source, _args, { dataSources }) => {
return dataSources.personalizationAPI.getFavorites();
},
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment