From 3ac4163f33b35c95be8da992cfc25513989cd7ae Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 6 Dec 2023 20:17:30 +0100 Subject: [PATCH] =?UTF-8?q?documentation(api):=20ou=20trouver=20l'email=20?= =?UTF-8?q?de=20l'usager=20qui=20d=C3=A9pose=20le=20dossier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/graphql/schema.graphql | 10 ++++++++++ app/graphql/types/dossier_type.rb | 2 +- app/graphql/types/profile_type.rb | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index ca666a258..fd247f0c1 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -1423,6 +1423,10 @@ type Dossier { """ state: DossierState! traitements: [Traitement!]! + + """ + Profile de l'usager déposant le dossier + """ usager: Profile! } @@ -3504,7 +3508,13 @@ type PoleEmploiChampDescriptor implements ChampDescriptor { type: TypeDeChamp! @deprecated(reason: "Utilisez le champ `__typename` à la place.") } +""" +Profil d'un usager connecté (déposant un dossier, instruisant un dossier...) +""" type Profile { + """ + Email de l'usager + """ email: String! id: ID! } diff --git a/app/graphql/types/dossier_type.rb b/app/graphql/types/dossier_type.rb index ed7dca3a8..b0a4c7856 100644 --- a/app/graphql/types/dossier_type.rb +++ b/app/graphql/types/dossier_type.rb @@ -49,7 +49,7 @@ module Types field :geojson, Types::File, "L’URL du GeoJSON contenant les données cartographiques du dossier.", null: true field :attestation, Types::File, "L’URL de l’attestation au format PDF.", null: true - field :usager, Types::ProfileType, null: false + field :usager, Types::ProfileType, "Profile de l'usager déposant le dossier", null: false field :groupe_instructeur, Types::GroupeInstructeurType, null: false field :revision, Types::RevisionType, null: false, deprecation_reason: 'Utilisez le champ `demarche.revision` à la place.' diff --git a/app/graphql/types/profile_type.rb b/app/graphql/types/profile_type.rb index f3f056fd3..a9476c7b6 100644 --- a/app/graphql/types/profile_type.rb +++ b/app/graphql/types/profile_type.rb @@ -1,6 +1,8 @@ module Types class ProfileType < Types::BaseObject + description "Profil d'un usager connecté (déposant un dossier, instruisant un dossier...)" + global_id_field :id - field :email, String, null: false + field :email, String, "Email de l'usager", null: false end end