graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.91k stars 839 forks source link

Make the selection set available in the resolve function as a simple accessible struct #535

Open susamn opened 4 years ago

susamn commented 4 years ago

Currently, the selection set is available in the following place, nested deeply and I don't know where will I stumble upon a nil reference.

params.Info.Operation.GetSelectionSet().Selections

We need a way to access the selection set as a simple and accessible struct, which can be used to make decisions on which backends to hit or not.