-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Setup the discover query for all the current entertainment quer…
…y types
- Loading branch information
1 parent
75e332a
commit 32651c9
Showing
31 changed files
with
1,149 additions
and
630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { HttpModule } from '@nestjs/axios'; | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { DiscoverFilteringResolver } from './discover-filtering.resolver'; | ||
import { DiscoverFilteringService } from './discover-filtering.service'; | ||
import { FilteringOptionsModule } from '../filtering-options/filtering-options.module'; | ||
import { UtilsModule } from '../utils/utils.module'; | ||
|
||
@Module({ | ||
providers: [DiscoverFilteringService, DiscoverFilteringResolver], | ||
imports: [FilteringOptionsModule, HttpModule, UtilsModule, FilteringOptionsModule] | ||
}) | ||
export class DiscoverFilteringModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Args, Query, Resolver } from '@nestjs/graphql'; | ||
|
||
import { DiscoverFilteringService } from './discover-filtering.service'; | ||
import { DiscoverFormDataInput } from '../graphql.schema'; | ||
|
||
@Resolver() | ||
export class DiscoverFilteringResolver { | ||
constructor(private readonly discoverFilteringService: DiscoverFilteringService) {} | ||
|
||
@Query() | ||
discoverMovies( | ||
@Args('filterValues') filters: DiscoverFormDataInput, | ||
@Args('pageNumber') pageNumber: number | ||
) { | ||
return this.discoverFilteringService.getDiscoverMovies({ filters, pageNumber }); | ||
} | ||
|
||
@Query() | ||
discoverShows( | ||
@Args('filterValues') filters: DiscoverFormDataInput, | ||
@Args('pageNumber') pageNumber: number | ||
) { | ||
return this.discoverFilteringService.getDiscoverShows({ filters, pageNumber }); | ||
} | ||
} |
Oops, something went wrong.