New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested query arguments based on parent query result #95
Comments
This is doable @Paddy-Hamilton! Using your example code: query luke {
Luke @rest(type: "Person", path: "people/1/") {
name
films {
url @export(as: "url")
film @rest(type: "Film", path: ":url") {
title
}
}
}
} The |
You may also find |
Films is an array of urls, it is not an object containing an url property. Could you modify this example? |
@fbartho thanks for the explanation and the bonus tip re network requests. I think the need for using this nested request method in this example is due to the structure of the api, so I'd have to just accept multiple network requests if i wanted to get this data. But thanks, will be helpful in structuring my own database and api. |
I have been looking for some more documentation around |
@Paddy-Hamilton we definitely support the I'm unfamiliar for the |
This issue is not solved for me, please take a look at https://codesandbox.io/s/6yv8y2z9v3 It will load a single url problem is that films is an array. I don't think this can be solved by pathBuilder. |
I'm wondering if it is possible to perform nested queries, where the child query arguments are based on the parent result.
e.g based on the docs given example
Films is an array of urls.
Q Is it possible to pass in the url to the film query path argument?
The text was updated successfully, but these errors were encountered: