public static IApplicationBuilder UseGraphiQl(this IApplicationBuilder builder, PathString path, Action <GraphiQlMiddlewareOptions> configure) { var options = new GraphiQlMiddlewareOptions(); configure(options); return(builder.UseGraphiQl(path, options)); }
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))); }
public GraphiQlMiddleware(RequestDelegate next, GraphiQlMiddlewareOptions options) { this.next = next; this.options = options; }