Exemplo n.º 1
0
        public static IApplicationBuilder UseGraphiQl(this IApplicationBuilder builder, PathString path, Action <GraphiQlMiddlewareOptions> configure)
        {
            var options = new GraphiQlMiddlewareOptions();

            configure(options);

            return(builder.UseGraphiQl(path, options));
        }
Exemplo n.º 2
0
        public static IApplicationBuilder UseGraphiQl(this IApplicationBuilder builder, PathString path, GraphiQlMiddlewareOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

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

            return(builder.Map(path, branch => branch.UseMiddleware <GraphiQlMiddleware>(options)));
        }
Exemplo n.º 3
0
 public GraphiQlMiddleware(RequestDelegate next, GraphiQlMiddlewareOptions options)
 {
     this.next    = next;
     this.options = options;
 }