2022-11-15 10:02:30 +01:00
|
|
|
class GraphqlController < ApplicationController
|
|
|
|
before_action :authenticate_administrateur!
|
|
|
|
|
|
|
|
def playground
|
2023-03-18 12:57:44 +01:00
|
|
|
procedure = current_administrateur.procedures&.last
|
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,
|
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
|