shurcooL/graphql

Multiline graphql tag

alexander-myltsev opened this issue · 1 comments

I have a very long graphql tag as follows:

`graphql:"nameResolver(names: $names, advancedResolution: $advancedResolution, bestMatchOnly: true, preferredDataSourceIds: [1,12,169])"`

Is there a way to split it to multilines as follows?:

graphql:"nameResolver(names: $names, 
                      advancedResolution: $advancedResolution, 
                      bestMatchOnly: true, 
                      preferredDataSourceIds: [1,12,169])"`

To answer your question, this library uses the standard Go struct field tags (as documented at https://godoc.org/reflect#StructTag), and they don’t support multiple lines. See issue golang/go#15893. That means, at this time, this isn’t possible.

We can use this issue for further discussion.