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