graphql-go-tools icon indicating copy to clipboard operation
graphql-go-tools copied to clipboard

Why marshal to/from json when the config appears fixed?

Open schmidtw opened this issue 2 years ago • 1 comments

Why marshal from a graphql_datasource.Configuration to JSON here: https://github.com/wundergraph/graphql-go-tools/blob/e6e1a13e36eaf3a4e09a2bbd1eca3dfcb3d955d6/pkg/graphql/engine_config_v2.go#L97

Only to turn around and unmarshal the same struct from JSON here: https://github.com/wundergraph/graphql-go-tools/blob/e6e1a13e36eaf3a4e09a2bbd1eca3dfcb3d955d6/pkg/engine/datasource/graphql_datasource/graphql_datasource.go#L241

Why the extra step?

schmidtw avatar Jul 25 '22 22:07 schmidtw

I think Custom could also be changed to any.

jensneuse avatar Jul 26 '22 05:07 jensneuse