private void UpdateContextData(
     IResolverContext context,
     IReadOnlyQueryResult result,
     DelegateDirective delegateDirective)
 {
     if (result.ContextData.Count > 0)
     {
         ImmutableDictionary <string, object> .Builder builder =
             ImmutableDictionary.CreateBuilder <string, object>();
         builder.AddRange(context.ScopedContextData);
         builder[WellKnownProperties.SchemaName] = delegateDirective.Schema;
         builder.AddRange(result.ContextData);
         context.ScopedContextData = builder.ToImmutableDictionary();
     }
     else
     {
         context.ModifyScopedContext(c => c.SetItem(
                                         WellKnownProperties.SchemaName,
                                         delegateDirective.Schema));
     }
 }