Class: GraphQL::PersistedQueries::Analyzers::HttpMethodAstAnalyzer

Inherits:
Analysis::AST::Analyzer
  • Object
show all
Defined in:
lib/graphql/persisted_queries/analyzers/http_method_ast_analyzer.rb

Overview

Verifies that mutations are not executed using GET requests

Instance Method Summary collapse

Constructor Details

#initialize(query) ⇒ HttpMethodAstAnalyzer

Returns a new instance of HttpMethodAstAnalyzer.



8
9
10
11
# File 'lib/graphql/persisted_queries/analyzers/http_method_ast_analyzer.rb', line 8

def initialize(query)
  super
  @query = query
end

Instance Method Details

#resultObject



13
14
15
# File 'lib/graphql/persisted_queries/analyzers/http_method_ast_analyzer.rb', line 13

def result
  HttpMethodValidator.new(@query).perform
end