Ejemplo n.º 1
0
        // 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();
            });
        }
Ejemplo n.º 2
0
        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
            };
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 /// <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());
Ejemplo n.º 5
0
 public PlaygroundPageModel(GraphQLPlaygroundOptions settings)
 {
     this.settings = settings;
 }
Ejemplo n.º 6
0
 public PlaygroundPageModel(GraphQLPlaygroundOptions options)
 {
     _options = options;
 }