Sha256: bbe14c10248b1c5435722ed37baa7d9b35c9caf947ad99f86a0f9c8804e19069
Contents?: true
Size: 862 Bytes
Versions: 12
Compression:
Stored size: 862 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe GraphQL::Schema::CatchallMiddleware do let(:result) { Dummy::Schema.execute(query_string) } let(:query_string) {%| query noMilk { error }|} before do Dummy::Schema.middleware << GraphQL::Schema::CatchallMiddleware end after do Dummy::Schema.middleware.delete(GraphQL::Schema::CatchallMiddleware) end if TESTING_RESCUE_FROM describe "rescuing errors" do let(:errors) { query.context.errors } it "turns into error messages" do expected = { "data" => { "error" => nil }, "errors"=> [ { "message"=>"Internal error", "locations"=>[{"line"=>1, "column"=>17}], "path"=>["error"] }, ] } assert_equal(expected, result) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems