gqlgen icon indicating copy to clipboard operation
gqlgen copied to clipboard

[proposal] Add @concurrent directive for types

Open krupyansky opened this issue 1 year ago • 0 comments

What happened?

For every element of list on marshaling graphql object we get one goroutine. It's bad for performance on load tests. We should use goroutine for network call or another system call. Or hard parallel calculations. By marshaling isn't hard calculation.

What did you expect?

I propose to add "@concurrent" directive for control the behavior. That lists consists concurrent type will have generated code as is now. But for lists with not concurrent type (without @concurrent directive) will not have concurrent code.

krupyansky avatar Jul 30 '24 08:07 krupyansky