How to ignore methods and related input types of a class in implicit field binding? #6703
-
Example class: public class MySchema
{
public string Name { get; private set; }
public void SetName(string name, IUpdatePolicy policy)
{
//
}
} Here the framework also tries to create an input schema for IUpdatePolicy. The actual class is having 20+ properties and hence I want to use the implicit field binding. |
Beta Was this translation helpful? Give feedback.
Answered by
nitish-mittal-maersk
Nov 17, 2023
Replies: 1 comment
-
I figured it out: .AddObjectType<MySchema>(descriptor =>
{
descriptor.Field(t => t.SetName(default, default)).Ignore();
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nitish-mittal-maersk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured it out: