using Northwind.GraphQL; // Query
using Packt.Shared; // Metoda rozszerzająca AddNorthwindContext

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddNorthwindContext();

builder.Services
  .AddGraphQLServer()
  .RegisterDbContext<NorthwindContext>()
  .AddQueryType<Query>()
  .AddMutationType<Mutation>();

var app = builder.Build();

app.MapGet("/", () => "Przejdź do strony: https://localhost:5111/graphql");

app.MapGraphQL();

app.Run();
