Ajoute les changements à l'API

This commit is contained in:
Kara Diaby 2023-10-10 13:42:43 +00:00
parent 4145f25210
commit 5b08f54665
4 changed files with 42 additions and 1 deletions

View file

@ -114,7 +114,8 @@ class API::V2::Schema < GraphQL::Schema
Types::Champs::Descriptor::TextareaChampDescriptorType,
Types::Champs::Descriptor::TextChampDescriptorType,
Types::Champs::Descriptor::TitreIdentiteChampDescriptorType,
Types::Champs::Descriptor::YesNoChampDescriptorType
Types::Champs::Descriptor::YesNoChampDescriptorType,
Types::Champs::Descriptor::ExpressionReguliereChampDescriptorType
def self.unauthorized_object(error)
# Add a top-level error to the response instead of returning nil:

View file

@ -2284,6 +2284,34 @@ type ExplicationChampDescriptor implements ChampDescriptor {
type: TypeDeChamp! @deprecated(reason: "Utilisez le champ `__typename` à la place.")
}
type ExpressionReguliereChampDescriptor implements ChampDescriptor {
"""
Description des champs dun bloc répétable.
"""
champDescriptors: [ChampDescriptor!] @deprecated(reason: "Utilisez le champ `RepetitionChampDescriptor.champ_descriptors` à la place.")
"""
Description du champ.
"""
description: String
id: ID!
"""
Libellé du champ.
"""
label: String!
"""
Est-ce que le champ est obligatoire ?
"""
required: Boolean!
"""
Type de la valeur du champ.
"""
type: TypeDeChamp! @deprecated(reason: "Utilisez le champ `__typename` à la place.")
}
type File {
byteSize: Int! @deprecated(reason: "Utilisez le champ `byteSizeBigInt` à la place.")
byteSizeBigInt: BigInt!
@ -3945,6 +3973,11 @@ enum TypeDeChamp {
"""
explication
"""
Expression régulière
"""
expression_reguliere
"""
Titre de section
"""

View file

@ -96,6 +96,8 @@ module Types
Types::Champs::Descriptor::EpciChampDescriptorType
when TypeDeChamp.type_champs.fetch(:cojo)
Types::Champs::Descriptor::COJOChampDescriptorType
when TypeDeChamp.type_champs.fetch(:expression_reguliere)
Types::Champs::Descriptor::ExpressionReguliereChampDescriptorType
end
end
end

View file

@ -0,0 +1,5 @@
module Types::Champs::Descriptor
class ExpressionReguliereChampDescriptorType < Types::BaseObject
implements Types::ChampDescriptorType
end
end