demarches-normaliennes/app/controllers/graphql_controller.rb

16 lines
403 B
Ruby
Raw Normal View History

class GraphqlController < ApplicationController
before_action :authenticate_administrateur!
def playground
2023-03-18 12:57:44 +01:00
procedure = current_administrateur.procedures&.last
gon.default_query = API::V2::StoredQuery.get('ds-query-v2')
gon.default_variables = {
"demarcheNumber": procedure&.id,
"includeDossiers": true
}.compact.to_json
render :playground, layout: false
end
end