graphql-dotnet / graphql-dotnet/graphql-dotnet
Add Transform(TSourceType source) method to InputObjectGraphType
- Dominant language
- C#
- Stars
- 6k
- Forks
- 945
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 14
Description
Consider the following input type definition
```c#
public class MyInputGraphType : InputObjectGraphType
{
public MyInputGraphType()
{
Field>("Name");
Field>("Age");
// how to "inject" the Internal?
}
}
public class MyInput
{
public string Name { get; set; }
public int Age { get; set; }
public string Internal { get; set; }
}
```
I want to be able to set the `Internal` property using some internal logic. I know that I can override the `ParseDictionary` but it means I'll have to parse the entire CLR type myself, which I'd prefer to avoid. Something like `Transform(MyInput source)`, which receives a parsed object, would make life much easier.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.