Graphql-dotnet: Is there any option to add some custom data to extensions property of graphql response ?

Created on 11 Oct 2018  路  2Comments  路  Source: graphql-dotnet/graphql-dotnet

Hi,

Thanks for this great library :),

I wanted add some custom data in the extensions property but it does not seem to be easy in graphql-dotnet, I can not find such a property in the ExecutionError class or anywhere else , is there any implementation for this feature or any plan for near future to add this feature ?

Original issue

question

Most helpful comment

There is an Extensions property on the ExecutionResult which you can add extra information.

https://github.com/graphql-dotnet/graphql-dotnet/blob/master/src/GraphQL/Execution/ExecutionResult.cs#L26

On a per-error basis, you can add extra information to the Data property which will get rendered as extensions.

All 2 comments

There is an Extensions property on the ExecutionResult which you can add extra information.

https://github.com/graphql-dotnet/graphql-dotnet/blob/master/src/GraphQL/Execution/ExecutionResult.cs#L26

On a per-error basis, you can add extra information to the Data property which will get rendered as extensions.

Cool, that worked for me. Thanks for the info :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mahald picture mahald  路  4Comments

dharmeshtailor picture dharmeshtailor  路  4Comments

VladimirAkopyan picture VladimirAkopyan  路  4Comments

pravinhabbu4u picture pravinhabbu4u  路  4Comments

wendelnascimento picture wendelnascimento  路  3Comments