Sha256: 0b2db23804843c7db044df0395c3819d511a3c3249bf9c854001e183e7d4c671
Contents?: true
Size: 907 Bytes
Versions: 59
Compression:
Stored size: 907 Bytes
Contents
# frozen_string_literal: true # test_via: ../query.rb module GraphQL class Query module ArgumentsCache # @return [Hash<InternalRepresentation::Node, GraphQL::Language::NodesDirectiveNode => Hash<GraphQL::Field, GraphQL::Directive => GraphQL::Query::Arguments>>] def self.build(query) Hash.new do |h1, irep_or_ast_node| h1[irep_or_ast_node] = Hash.new do |h2, definition| ast_node = irep_or_ast_node.is_a?(GraphQL::InternalRepresentation::Node) ? irep_or_ast_node.ast_node : irep_or_ast_node h2[definition] = if definition.arguments.empty? GraphQL::Query::Arguments::NO_ARGS else GraphQL::Query::LiteralInput.from_arguments( ast_node.arguments, definition, query.variables, ) end end end end end end end
Version data entries
59 entries across 59 versions & 1 rubygems