diff --git a/lib/apollo-federation/tracing/tracer.rb b/lib/apollo-federation/tracing/tracer.rb index 386d82dbd..86aa3b3fd 100644 --- a/lib/apollo-federation/tracing/tracer.rb +++ b/lib/apollo-federation/tracing/tracer.rb @@ -224,7 +224,7 @@ def self.attach_trace_to_result(result) result[:extensions] ||= {} result[:extensions][ApolloFederation::Tracing::KEY] = - Base64.encode64(proto.class.encode(proto)) + Base64.strict_encode64(proto.class.encode(proto)) if result.context[:debug_tracing] result[:extensions][ApolloFederation::Tracing::DEBUG_KEY] = proto.to_h diff --git a/spec/apollo-federation/entities_field_spec.rb b/spec/apollo-federation/entities_field_spec.rb index fdfe8d937..11d7602c1 100644 --- a/spec/apollo-federation/entities_field_spec.rb +++ b/spec/apollo-federation/entities_field_spec.rb @@ -223,7 +223,7 @@ def self.resolve_type(_abstract_type, _obj, _ctx) let(:typename) { 'TypeNotInSchema' } it 'raises' do - expect(-> { execute_query }).to raise_error( + expect { execute_query }.to raise_error( /The _entities resolver tried to load an entity for type "TypeNotInSchema"/, ) end diff --git a/spec/apollo-federation/tracing_spec.rb b/spec/apollo-federation/tracing_spec.rb index cfa292689..b9e3ad062 100644 --- a/spec/apollo-federation/tracing_spec.rb +++ b/spec/apollo-federation/tracing_spec.rb @@ -89,7 +89,7 @@ def test def trace(query) result = schema.execute(query, context: { tracing_enabled: true }) - ApolloFederation::Tracing::Trace.decode(Base64.decode64(result[:extensions][:ftv1])) + ApolloFederation::Tracing::Trace.decode(Base64.strict_decode64(result[:extensions][:ftv1])) end describe 'building the trace tree' do