Is there a way to ignore all fields by default on a GraphQL type and only add the wanted field?
Hot Chocolate infers GraphQL type members form the C# type automatically.
This means that the following code ...
public class Foo
{
public string Bar { get; set; }
public string? Baz { get; set; }
}
public class FooType : ObjectType<Foo>
{
}
will result in the following GraphQL type:
type Foo {
bar: String!
baz: String
}
In my use-case I want to change this behavior and define explicitly which type member of my C# type is used in the GraphQL type.