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

Grauenwolf picture Grauenwolf  路  26Comments

shoe-diamente picture shoe-diamente  路  33Comments

OpenSpacesAndPlaces picture OpenSpacesAndPlaces  路  25Comments

maolivo picture maolivo  路  50Comments

jbliss1234 picture jbliss1234  路  26Comments