demarches-normaliennes/app/controllers/graphql_controller.rb

13 lines
362 B
Ruby
Raw Normal View History

class GraphqlController < ApplicationController
def playground
procedure = current_administrateur&.procedures&.last
gon.default_variables = {
"demarcheNumber": procedure&.id || 42,
"includeDossiers": true
}.compact.to_json
gon.default_query = API::V2::StoredQuery.get('ds-query-v2')
render :playground, layout: false
end
end