-
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.
[GraphQL] write first resolver. (#38)
write first resolver
- Loading branch information
1 parent
7791f11
commit 81ebee2
Showing
6 changed files
with
52 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import strawberry | ||
|
||
from src.business_logic.formation.get_formation_details import ( | ||
FormationDetails, | ||
get_formation_details_by_id, | ||
) | ||
from src.business_logic.formation.scrap.get_main_formation import get_main_formations | ||
from src.business_logic.formation.scrap.get_repartition_formations import ( | ||
get_libelle_type_formation, | ||
) | ||
from src.business_logic.formation.scrap.types import Facet, FormationsWithTotal | ||
from src.business_logic.formation.scrap.search_formation import ( | ||
search_formations, | ||
) | ||
|
||
|
||
# TODO : Deprecated REST a migrate here for get_feed_formations and search_formations | ||
@strawberry.type | ||
class FormationResolver: | ||
get_formation_details_by_id: FormationDetails = ( | ||
strawberry.field(resolver=get_formation_details_by_id), | ||
) | ||
get_libelle_type_formation: list[Facet] = strawberry.field( | ||
resolver=get_libelle_type_formation | ||
) | ||
search_formations: FormationsWithTotal = strawberry.field( | ||
resolver=search_formations | ||
) | ||
get_feed_formations: FormationsWithTotal = strawberry.field( | ||
resolver=get_main_formations | ||
) |
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
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