Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connections are always nullable and ignore GraphQLNonNullType #7073

Open
cmeeren opened this issue Apr 26, 2024 · 0 comments
Open

Connections are always nullable and ignore GraphQLNonNullType #7073

cmeeren opened this issue Apr 26, 2024 · 0 comments
Labels
🐛 bug Something isn't working 🌶️ hot chocolate

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Apr 26, 2024

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

@cmeeren cmeeren added the 🐛 bug Something isn't working label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🌶️ hot chocolate
Projects
None yet
Development

No branches or pull requests

2 participants