graphql-go / graphql-go/graphql
What is the canonical approach to passing arguments down a tree?
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 845
- PR merge metrics
- No merged PRs in 30d
Description
If I wanted to construct a schema that allowed the following query to occur:
```
{
country(name: "USA"){
city(name: "San Francisco"){
street(name: "Second Street"){
location
}
}
}
}
```
What is the best approach for providing the 'Resolve' function with all three arguments? Assume in this case that it's impossible to resolve the street information without also knowing the country and city.
The graphql.ResolveParams object passes the street name to the Resolve function, and the city name can usually be determined from the ResolveParams 'Source' field, but how can we get the country name? Does the information appear in the Info field (a ResolveInfo object, which is uncommented and undocumented)?
Contributor guide
Assessment
This issue has not been assessed yet.