thunder icon indicating copy to clipboard operation
thunder copied to clipboard

Selection Sets Support

Open Hale-ma opened this issue 5 years ago • 3 comments

Hi, I enjoy using this library developing my graphql server. I would like to know is there any support for Selection Sets of query? Define different behavior in a function for query with different Selection Sets may enhance the performance. For instance, a query that only lookup a few field may only need a sample SQL to finish while looking for extra field for this fragment may need to have other logic to calculate the field to return . If I can pass the return field to my function, I can do different logic. However, seems query.FieldFunc("name",func) does not support this.

Hale-ma avatar Nov 11 '19 11:11 Hale-ma

Seems like related code: argsToJson and parseSelectionSet

https://github.com/samsarahq/thunder/blob/babf75b0cd19d8963b164c284a9e661bcaf80538/graphql/parser.go#L91-L109

kevinmichaelchen avatar Nov 07 '20 20:11 kevinmichaelchen

+1 for that

uripre avatar Mar 18 '21 12:03 uripre

Probably related to #200 and #201

uripre avatar Mar 18 '21 12:03 uripre