feat(graphql): improuve stored query

This commit is contained in:
Paul Chavard 2023-04-11 10:11:43 +02:00
parent bf6cc25063
commit ca9fa71667

View file

@ -23,18 +23,18 @@ class API::V2::StoredQuery
$revision: ID $revision: ID
$createdSince: ISO8601DateTime $createdSince: ISO8601DateTime
$updatedSince: ISO8601DateTime $updatedSince: ISO8601DateTime
$deletedOrder: Order
$deletedFirst: Int
$deletedAfter: String
$deletedSince: ISO8601DateTime
$pendingDeletedOrder: Order $pendingDeletedOrder: Order
$pendingDeletedFirst: Int $pendingDeletedFirst: Int
$pendingDeletedAfter: String $pendingDeletedAfter: String
$pendingDeletedSince: ISO8601DateTime $pendingDeletedSince: ISO8601DateTime
$deletedOrder: Order
$deletedFirst: Int
$deletedAfter: String
$deletedSince: ISO8601DateTime
$includeGroupeInstructeurs: Boolean = false $includeGroupeInstructeurs: Boolean = false
$includeDossiers: Boolean = false $includeDossiers: Boolean = false
$includeDeletedDossiers: Boolean = false
$includePendingDeletedDossiers: Boolean = false $includePendingDeletedDossiers: Boolean = false
$includeDeletedDossiers: Boolean = false
$includeRevision: Boolean = false $includeRevision: Boolean = false
$includeService: Boolean = false $includeService: Boolean = false
$includeChamps: Boolean = true $includeChamps: Boolean = true
@ -118,11 +118,16 @@ class API::V2::StoredQuery
$revision: ID $revision: ID
$createdSince: ISO8601DateTime $createdSince: ISO8601DateTime
$updatedSince: ISO8601DateTime $updatedSince: ISO8601DateTime
$pendingDeletedOrder: Order
$pendingDeletedFirst: Int
$pendingDeletedAfter: String
$pendingDeletedSince: ISO8601DateTime
$deletedOrder: Order $deletedOrder: Order
$deletedFirst: Int $deletedFirst: Int
$deletedAfter: String $deletedAfter: String
$deletedSince: ISO8601DateTime $deletedSince: ISO8601DateTime
$includeDossiers: Boolean = false $includeDossiers: Boolean = false
$includePendingDeletedDossiers: Boolean = false
$includeDeletedDossiers: Boolean = false $includeDeletedDossiers: Boolean = false
$includeChamps: Boolean = true $includeChamps: Boolean = true
$includeAnotations: Boolean = true $includeAnotations: Boolean = true
@ -157,6 +162,19 @@ class API::V2::StoredQuery
...DossierFragment ...DossierFragment
} }
} }
pendingDeletedDossiers(
order: $pendingDeletedOrder
first: $pendingDeletedFirst
after: $pendingDeletedAfter
deletedSince: $pendingDeletedSince
) @include(if: $includePendingDeletedDossiers) {
pageInfo {
...PageInfoFragment
}
nodes {
...DeletedDossierFragment
}
}
deletedDossiers( deletedDossiers(
order: $deletedOrder order: $deletedOrder
first: $deletedFirst first: $deletedFirst
@ -250,14 +268,9 @@ class API::V2::StoredQuery
} }
demandeur { demandeur {
__typename __typename
... on PersonnePhysique { ...PersonnePhysiqueFragment
civilite
nom
prenom
dateDeNaissance
}
... on PersonneMoraleIncomplete { siret }
...PersonneMoraleFragment ...PersonneMoraleFragment
...PersonneMoraleIncompleteFragment
} }
demarche { demarche {
revision { revision {
@ -368,24 +381,6 @@ class API::V2::StoredQuery
collapsibleExplanationEnabled collapsibleExplanationEnabled
collapsibleExplanationText collapsibleExplanationText
} }
... on PaysChampDescriptor {
options {
name
code
}
}
... on RegionChampDescriptor {
options {
name
code
}
}
... on DepartementChampDescriptor {
options {
name
code
}
}
} }
fragment AvisFragment on Avis { fragment AvisFragment on Avis {
@ -502,8 +497,7 @@ class API::V2::StoredQuery
} }
... on EpciChamp { ... on EpciChamp {
epci { epci {
name ...EpciFragment
code
} }
departement { departement {
...DepartementFragment ...DepartementFragment
@ -524,14 +518,12 @@ class API::V2::StoredQuery
} }
... on RegionChamp { ... on RegionChamp {
region { region {
name ...RegionFragment
code
} }
} }
... on PaysChamp { ... on PaysChamp {
pays { pays {
name ...PaysFragment
code
} }
} }
... on SiretChamp { ... on SiretChamp {
@ -579,6 +571,17 @@ class API::V2::StoredQuery
} }
} }
fragment PersonneMoraleIncompleteFragment on PersonneMoraleIncomplete {
siret
}
fragment PersonnePhysiqueFragment on PersonnePhysique {
civilite
nom
prenom
}
fragment FileFragment on File { fragment FileFragment on File {
filename filename
contentType contentType
@ -602,11 +605,26 @@ class API::V2::StoredQuery
regionCode regionCode
} }
fragment PaysFragment on Pays {
name
code
}
fragment RegionFragment on Region {
name
code
}
fragment DepartementFragment on Departement { fragment DepartementFragment on Departement {
name name
code code
} }
fragment EpciFragment on Epci {
name
code
}
fragment CommuneFragment on Commune { fragment CommuneFragment on Commune {
name name
code code