1

I am trying to add a check in GraphQL::Schema. I want to call a method where I have defined my schema. One Way is to call the method in GraphqlController. But, I am not able to get the arguments that are sent in the mutation/query only the query string. For example, I want custom validation across all mutations and queries.

class MySchema < GraphQL::Schema
  #my method to be called for each query/mutation
  mutation(Types::MutationType)
  query(Types::QueryType)
end
aniket
  • 95
  • 5
  • 12

1 Answers1

0

How about params[:variables] ? There is also something like schema filtering: https://github.com/rmosolgo/graphql-ruby/blob/master/guides/schema/limiting_visibility.md

TomKo1
  • 214
  • 2
  • 14