Skip to content

Commit

Permalink
映画一覧クエリと分けるために最新映画クエリから人気映画クエリに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
keinuma committed Jan 3, 2020
1 parent de84196 commit d47ab50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const db = admin.firestore();

const resolvers = {
Query: {
latestMovies: async () => {
popularMovies: async () => {
const snapshot = await db
.collection("movies")
.orderBy("info.release_date", "desc")
.orderBy("info.rank")
.limit(10)
.get();
console.log(snapshot);
Expand Down
2 changes: 1 addition & 1 deletion functions/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export default gql`
}
type Query {
latestMovies: [Movie]
popularMovies: [Movie]
}
`;

0 comments on commit d47ab50

Please sign in to comment.