Пример #1
0
 public void Merge(
     ISchemaMergeContext context,
     IReadOnlyList <IDirectiveTypeInfo> directives)
 {
     context.AddDirective(
         directives.First(t =>
                          t.Definition.Arguments.Any()).Definition);
 }
        protected void MergeTypes(
            ISchemaMergeContext context,
            IReadOnlyList <IDirectiveTypeInfo> types,
            NameString newTypeName)
        {
            var definitions = types
                              .Select(t => t.Definition)
                              .ToList();

            DirectiveDefinitionNode definition =
                definitions[0].Rename(
                    newTypeName,
                    types.Select(t => t.Schema.Name));

            context.AddDirective(definition);
        }