[GraphQL]: more docs
This commit is contained in:
parent
ea6667ff9f
commit
a23e84bc57
4 changed files with 130 additions and 7 deletions
|
@ -10,27 +10,66 @@ type Avis {
|
|||
type CarteChamp implements Champ {
|
||||
geoAreas: [GeoArea!]!
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
}
|
||||
|
||||
interface Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
}
|
||||
|
||||
type ChampDescriptor {
|
||||
"""
|
||||
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!
|
||||
}
|
||||
|
||||
type CheckboxChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
value: Boolean!
|
||||
}
|
||||
|
@ -88,14 +127,30 @@ type CreateDirectUploadPayload {
|
|||
|
||||
type DateChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
value: ISO8601DateTime
|
||||
}
|
||||
|
||||
type DecimalNumberChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
value: Float
|
||||
}
|
||||
|
@ -165,6 +220,10 @@ type Demarche {
|
|||
Le numero de la démarche.
|
||||
"""
|
||||
number: Int!
|
||||
|
||||
"""
|
||||
L'état de la démarche.
|
||||
"""
|
||||
state: DemarcheState!
|
||||
title: String!
|
||||
updatedAt: ISO8601DateTime!
|
||||
|
@ -296,7 +355,15 @@ type DossierEdge {
|
|||
type DossierLinkChamp implements Champ {
|
||||
dossier: Dossier
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
}
|
||||
|
||||
|
@ -376,16 +443,32 @@ scalar ISO8601DateTime
|
|||
|
||||
type IntegerNumberChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
value: Int
|
||||
}
|
||||
|
||||
type LinkedDropDownListChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
primaryValue: String
|
||||
secondaryValue: String
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
}
|
||||
|
||||
|
@ -399,7 +482,15 @@ type Message {
|
|||
|
||||
type MultipleDropDownListChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
values: [String!]!
|
||||
}
|
||||
|
@ -480,7 +571,15 @@ type PersonneMorale {
|
|||
|
||||
type PieceJustificativeChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
url: URL
|
||||
}
|
||||
|
@ -524,7 +623,15 @@ type Query {
|
|||
type RepetitionChamp implements Champ {
|
||||
champs: [Champ!]!
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
}
|
||||
|
||||
|
@ -537,13 +644,29 @@ type SelectionUtilisateur implements GeoArea {
|
|||
type SiretChamp implements Champ {
|
||||
etablissement: PersonneMorale
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
}
|
||||
|
||||
type TextChamp implements Champ {
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Libellé du champ.
|
||||
"""
|
||||
label: String!
|
||||
|
||||
"""
|
||||
La valeur du champ sous forme texte.
|
||||
"""
|
||||
stringValue: String
|
||||
value: String
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@ module Types
|
|||
end
|
||||
|
||||
global_id_field :id
|
||||
field :type, TypeDeChampType, null: false, method: :type_champ
|
||||
field :label, String, null: false, method: :libelle
|
||||
field :description, String, null: true
|
||||
field :required, Boolean, null: false, method: :mandatory?
|
||||
field :type, TypeDeChampType, "Type de la valeur du champ.", null: false, method: :type_champ
|
||||
field :label, String, "Libellé du champ.", null: false, method: :libelle
|
||||
field :description, String, "Description du champ.", null: true
|
||||
field :required, Boolean, "Est-ce que le champ est obligatoire ?", null: false, method: :mandatory?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,8 +3,8 @@ module Types
|
|||
include Types::BaseInterface
|
||||
|
||||
global_id_field :id
|
||||
field :label, String, null: false, method: :libelle
|
||||
field :string_value, String, null: true, method: :for_api_v2
|
||||
field :label, String, "Libellé du champ.", null: false, method: :libelle
|
||||
field :string_value, String, "La valeur du champ sous forme texte.", null: true, method: :for_api_v2
|
||||
|
||||
definition_methods do
|
||||
def resolve_type(object, context)
|
||||
|
|
|
@ -12,7 +12,7 @@ module Types
|
|||
field :number, Int, "Le numero de la démarche.", null: false, method: :id
|
||||
field :title, String, null: false, method: :libelle
|
||||
field :description, String, "Déscription de la démarche.", null: false
|
||||
field :state, DemarcheState, null: false
|
||||
field :state, DemarcheState, "L'état de la démarche.", null: false
|
||||
|
||||
field :created_at, GraphQL::Types::ISO8601DateTime, null: false
|
||||
field :updated_at, GraphQL::Types::ISO8601DateTime, null: false
|
||||
|
|
Loading…
Reference in a new issue