// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { var opt = new GraphQLPlaygroundOptions { GraphQLEndPoint = "/graphql", Path = "/graphql" }; app.UseGraphQLPlayground(opt); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public PoliticalAdministrativeDivisionConfiguration(string apiDigitalGobClDPA, string graphQLPath, string deployedBaseUrl, string graphQLPlaygroundPath) : this(apiDigitalGobClDPA, graphQLPath, deployedBaseUrl) { GraphQLPlaygroundUri = new Uri(new Uri(deployedBaseUrl), graphQLPlaygroundPath); GraphQLPlaygroundOptions = new GraphQLPlaygroundOptions { Path = GraphQLPlaygroundUri.AbsolutePath, GraphQLEndPoint = GraphQLUri.AbsolutePath }; }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); var playgroundOptions = new GraphQLPlaygroundOptions(); playgroundOptions.SchemaPollingEnabled = false; app.UseGraphQLPlayground(playgroundOptions); }
/// <summary> Adds middleware for GraphQL Playground using the specified options. </summary> /// <param name="app"> <see cref="IApplicationBuilder"/> to configure an application's request pipeline. </param> /// <param name="options"> Options to customize <see cref="PlaygroundMiddleware"/>. If not set, then the default values will be used. </param> /// <returns> The reference to provided <paramref name="app"/> instance. </returns> public static IApplicationBuilder UseGraphQLPlayground(this IApplicationBuilder app, GraphQLPlaygroundOptions options = null) => app.UseMiddleware <PlaygroundMiddleware>(options ?? new GraphQLPlaygroundOptions());
public PlaygroundPageModel(GraphQLPlaygroundOptions settings) { this.settings = settings; }
public PlaygroundPageModel(GraphQLPlaygroundOptions options) { _options = options; }