Skip to content

cklam2/graphql-maybe

Repository files navigation

GraphQL.Maybe

NuGet version (GraphQL.Maybe)

The GraphQL.Maybe type can be used to represent non-nullable graphql fields as optional fields in C#

type User {
  id: Int!
  username: String!
  email: String
  age: Int
}
public class User 
{
  int Id { get; set; }
  string Username { get; set; }
  Maybe<string> Email { get; set; }
  Maybe<int> Age { get; set; }
}

JSON custom converters will only pass fields that are either non-optional or have a value assigned.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages