Use graphql playground instead of graphiql
This commit is contained in:
parent
e45d56c681
commit
7a8fd3c679
5 changed files with 12 additions and 87 deletions
|
@ -1,81 +0,0 @@
|
|||
DEFAULT_QUERY = "# La documentation officielle de la spécification (Anglais) : https://graphql.org/
|
||||
# Une introduction aux concepts et raisons d'être de GraphQL (Français) : https://blog.octo.com/graphql-et-pourquoi-faire/
|
||||
# Le schema GraphQL de demarches-simplifiees.fr : https://demarches-simplifiees-graphql.netlify.com
|
||||
# Le endpoint GraphQL de demarches-simplifiees.fr : https://www.demarches-simplifiees.fr/api/v2/graphql
|
||||
|
||||
query getDemarche($demarcheNumber: Int!) {
|
||||
demarche(number: $demarcheNumber) {
|
||||
id
|
||||
number
|
||||
title
|
||||
champDescriptors {
|
||||
id
|
||||
type
|
||||
label
|
||||
}
|
||||
dossiers(first: 3) {
|
||||
nodes {
|
||||
id
|
||||
number
|
||||
datePassageEnConstruction
|
||||
datePassageEnInstruction
|
||||
dateTraitement
|
||||
usager {
|
||||
email
|
||||
}
|
||||
champs {
|
||||
id
|
||||
label
|
||||
... on TextChamp {
|
||||
value
|
||||
}
|
||||
... on DecimalNumberChamp {
|
||||
value
|
||||
}
|
||||
... on IntegerNumberChamp {
|
||||
value
|
||||
}
|
||||
... on CheckboxChamp {
|
||||
value
|
||||
}
|
||||
... on DateChamp {
|
||||
value
|
||||
}
|
||||
... on DossierLinkChamp {
|
||||
dossier {
|
||||
id
|
||||
}
|
||||
}
|
||||
... on MultipleDropDownListChamp {
|
||||
values
|
||||
}
|
||||
... on LinkedDropDownListChamp {
|
||||
primaryValue
|
||||
secondaryValue
|
||||
}
|
||||
... on PieceJustificativeChamp {
|
||||
file {
|
||||
url
|
||||
}
|
||||
}
|
||||
... on CarteChamp {
|
||||
geoAreas {
|
||||
source
|
||||
geometry {
|
||||
type
|
||||
coordinates
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}"
|
||||
|
||||
GraphiQL::Rails.config.initial_query = DEFAULT_QUERY
|
||||
GraphiQL::Rails.config.title = 'demarches-simplifiees.fr'
|
|
@ -3,3 +3,10 @@ GraphQL::RailsLogger.configure do |config|
|
|||
'API::V2::GraphqlController' => ['execute']
|
||||
}
|
||||
end
|
||||
|
||||
GraphqlPlayground::Rails.configure do |config|
|
||||
config.title = "demarches-simplifiees.fr"
|
||||
config.settings = {
|
||||
"schema.polling.enable": false
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue