lib/graphql/execution/multiplex.rb in graphql-1.10.0.pre1 vs lib/graphql/execution/multiplex.rb in graphql-1.10.0.pre2

- old
+ new

@@ -93,10 +93,11 @@ finish_query(data_result, query, multiplex) # Get the Query::Result, not the Hash query.result end rescue Exception + # TODO rescue at a higher level so it will catch errors in analysis, too # Assign values here so that the query's `@executed` becomes true queries.map { |q| q.result_values ||= {} } raise end @@ -171,9 +172,18 @@ # # It yields when the queries should be executed, then runs teardown. def instrument_and_analyze(multiplex) GraphQL::Execution::Instrumentation.apply_instrumenters(multiplex) do schema = multiplex.schema + if schema.interpreter? && schema.analysis_engine != GraphQL::Analysis::AST + raise <<-ERR +Can't use `GraphQL::Execution::Interpreter` without `GraphQL::Analysis::AST`, please add this plugin to your schema: + + use GraphQL::Analysis::AST + +For information about the new analysis engine: https://graphql-ruby.org/queries/ast_analysis.html +ERR + end multiplex_analyzers = schema.multiplex_analyzers if multiplex.max_complexity multiplex_analyzers += if schema.using_ast_analysis? [GraphQL::Analysis::AST::MaxQueryComplexity] else