2022-11-15 10:02:30 +01:00
|
|
|
class GraphqlController < ApplicationController
|
|
|
|
before_action :authenticate_administrateur!
|
|
|
|
|
|
|
|
def playground
|
2022-11-24 11:09:16 +01:00
|
|
|
procedure = current_administrateur.procedures&.first
|
|
|
|
dossier = procedure&.dossiers&.first
|
2022-11-15 10:02:30 +01:00
|
|
|
|
|
|
|
gon.default_query = API::V2::StoredQuery.get('ds-query-v2')
|
|
|
|
gon.default_variables = {
|
2022-11-24 11:09:16 +01:00
|
|
|
"demarcheNumber": procedure&.id,
|
|
|
|
"dossierNumber": dossier&.id,
|
2022-11-15 10:02:30 +01:00
|
|
|
"includeDossiers": true
|
2022-11-24 11:09:16 +01:00
|
|
|
}.compact.to_json
|
2022-11-15 10:02:30 +01:00
|
|
|
|
|
|
|
render :playground, layout: false
|
|
|
|
end
|
|
|
|
end
|