diff --git a/lib/rspec/graphql_response/helpers/execute_graphql.rb b/lib/rspec/graphql_response/helpers/execute_graphql.rb index 7b74f06..4130610 100644 --- a/lib/rspec/graphql_response/helpers/execute_graphql.rb +++ b/lib/rspec/graphql_response/helpers/execute_graphql.rb @@ -6,12 +6,9 @@ operation_vars = graphql_variables if respond_to? :graphql_variables operation_vars = self.instance_eval(&graphql_variables) if operation_vars.is_a? Proc - + operation_context = graphql_context if respond_to? :graphql_context operation_context = self.instance_eval(&operation_context) if operation_context.is_a? Proc - config.graphql_schema.execute(operation, { - variables: operation_vars, - context: operation_context - }) + config.graphql_schema.execute(operation, variables: operation_vars, context: operation_context) end