Exemplo n.º 1
0
        public static IApplicationBuilder UseGraphQLPlayground(this IApplicationBuilder app, GraphQLPlaygroundOptions options)
        {
            if (options == null)
            {
                options = new GraphQLPlaygroundOptions();
            }

            app.UseMiddleware <PlaygroundMiddleware>(options);
            return(app);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new PlaygroundMiddleware
 /// </summary>
 /// <param name="nextMiddleware">The Next Middleware</param>
 /// <param name="settings">The Settings of the Middleware</param>
 public PlaygroundMiddleware(RequestDelegate nextMiddleware, GraphQLPlaygroundOptions settings)
 {
     this.nextMiddleware = nextMiddleware ?? throw new ArgumentNullException(nameof(nextMiddleware));
     this.settings       = settings ?? throw new ArgumentNullException(nameof(settings));
 }