public static ISchemaBuilder AddSortingType(this ISchemaBuilder ctx, Foo[] resolvedItems = null)
 {
     ctx.AddObjectType(x => x.Name("Test")
                       .Field("foo")
                       .Resolver(resolvedItems)
                       .Type <NonNullType <ListType <NonNullType <ObjectType <Foo> > > > >()
                       .UseSorting());
     return(ctx);
 }
Пример #2
0
 public static void Configure(ISchemaBuilder builder)
 {
     builder.AddObjectType <InterfaceImpl1>(x => x.Implements <InterfaceType <Test> >());
     builder.AddObjectType <InterfaceImpl2>(x => x.Implements <InterfaceType <Test> >());
     builder.AddInterfaceType <Test>();
 }
 public static void Configure(ISchemaBuilder builder)
 {
     builder.AddObjectType <InterfaceImpl1>();
     builder.AddObjectType <InterfaceImpl2>();
 }