FSharp.Data.GraphQL
FSharp.Data.GraphQL copied to clipboard
Fix recursive definition of InputObject fields
Using recursive definition of fields in the InputObject resulted in a null reference exception. The exception was triggered because the ExecuteInput on a field definition was not initialized. It was caused by not caching the field definitions correctly, resulting in uninitialized field definitions to be used.
In this PR, the function that is used to retrieve the definitions is wrapped inside a lazy, which makes sure that always the same field definitions are returned.
ps. it was required to update the dependencies because MSBuild.StructuredLogger was causing an issue when restoring the client project.
@mickhansen, @nikhedonia any comments about this one?
@vanhoeij
@vanhoeij
@njlr what do you think?
@njlr what do you think?
This change makes sense to me.
Good to fix the typos also :+1:
@vanhoeij will you rebase? Or give me access to your repo
@vanhoeij thank you very much for your contribution!
@vanhoeij
Error Message:
expected { fieldWithNestedInputObject: "{"na":{"a":null,"b":null,"c":"c","d":null},"nb":"b"}" }
but got { fieldWithNestedInputObject: "{"na":{"a":null,"b":null,"c":"c","d":null,"e":null},"nb":"b"}" }
Is the fix as simple as adding ,"e":null?