ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
4.96k stars 722 forks source link

Connections are always nullable and ignore GraphQLNonNullType #7073

Open cmeeren opened 3 weeks ago

cmeeren commented 3 weeks ago

Product

Hot Chocolate

Version

14.0.0-p.93

Link to minimal reproduction

See zip below

Steps to reproduce

Repro solution: HotChocolateBugRepro.zip

Code for quick reference:

var builder = WebApplication.CreateBuilder(args);

builder
    .Services
    .AddGraphQLServer()
    .AddQueryType<Query>();

var app = builder.Build();

app.MapGraphQL();
app.Run();

public class Query
{
    [GraphQLNonNullType]
    [UsePaging]
    public List<int> Test() => new List<int>();
}

What is expected?

type Query {
  test(...): TestConnection!
}

What is actually happening?

type Query {
  test(...): TestConnection
}

Relevant log output

No response

Additional context

The order of UsePaging and GraphQLNonNullType does not matter.

Additionally, I would expect that when