graphql-dotnet / graphql-dotnet/conventions

How to deal with NonNull

Open
#112 22 comments 0 reactions 1 assignee Claimed by @tlil View on GitHub
question
Dominant language
C#
Stars
228
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Hello,
what's the proper way to deal with `NonNull` not being `T`?
Let's assume that you have a resolver like:

```
public async Task>>> AllXs(...)
{
IEnumerable list = await ...;
// how to return this?
}
```

what's the proper way to return `list`?

Do I have to add some boilerplate code like:

```
return new NonNull>>(list.Select(x => new NonNull(x)));
```

?

I've tried to look at both examples, but none of those seem to use `NonNull` for output types.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.