コード例 #1
0
 protected override void Configure(IInterfaceTypeDescriptor descriptor)
 {
     descriptor.Name("Node");
     descriptor.Description(
         "The node interface is implemented by entities that have " +
         "a gloabl unique identifier.");
     descriptor.Field("id").Type <NonNullType <IdType> >();
 }
コード例 #2
0
        protected override void Configure(IInterfaceTypeDescriptor descriptor)
        {
            descriptor.Description("The Character Description.");

            descriptor.Name("Character");

            descriptor.Field("id")
            .Type <NonNullType <IdType> >();

            descriptor.Field("name")
            .Type <StringType>();

            descriptor.Field("friends")
            .Type <ListType <CharacterType> >();

            descriptor.Field("appearsIn")
            .Type <ListType <EpisodeType> >();

            descriptor.Field("height")
            .Type <FloatType>()
            .Argument("unit", a => a.Type <EnumType <Unit> >());
        }