public static ISchemaBuilder AddQueryType <TQuery>(
            this ISchemaBuilder builder)
            where TQuery : class
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.AddRootType(typeof(TQuery), OperationType.Query));
        }
        public static ISchemaBuilder AddSubscriptionType <TSubscription>(
            this ISchemaBuilder builder)
            where TSubscription : class
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.AddRootType(
                       typeof(TSubscription),
                       OperationType.Subscription));
        }
        public static ISchemaBuilder AddQueryType(
            this ISchemaBuilder builder,
            ObjectType queryType)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (queryType == null)
            {
                throw new ArgumentNullException(nameof(queryType));
            }

            return(builder.AddRootType(queryType, OperationType.Query));
        }
        public static ISchemaBuilder AddSubscriptionType(
            this ISchemaBuilder builder,
            Type type)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            return(builder.AddRootType(type, OperationType.Subscription));
        }
Example #5
0
 public static ISchemaBuilder AddQueryType(
     this ISchemaBuilder builder,
     ObjectType queryType)
 {
     return(builder.AddRootType(queryType, OperationType.Query));
 }
Example #6
0
 public static ISchemaBuilder AddQueryType <TQuery>(
     this ISchemaBuilder builder)
 {
     return(builder.AddRootType(typeof(TQuery), OperationType.Query));
 }