DSL: Compose query with all nested fields included
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Review the query-building API around ds.Content._type.fields and the handling of of_type described in the report. Compare that behavior with the supplied GraphQL introspection query and determine whether recursive selection has a bounded, well-defined scope. Done means a decided support or documentation path that addresses nested fields and prevents unbounded recursion.
Written by the indexing model from the issue text.
Description
Hello!
I'm building my query dynamically. I want to select all the nested sub fields (children, grand children etc). Is there a way to accomplish this with gql?
I'm not very fluent in graphql but I do know it's possible to build infinite nested queries, so is it even possible/easy to prevent that from happening?
I've experimented with looping through ds.Content._type.fields to somehow select each field and any children they might parent. But I find it confusing as some objects contains of_type attribute while others do not and I don't know why that is.
Might I be better off doing an introspection with
{
__schema {
types {
name
fields {
name
}
}
}
}
and determine any children by simply parsing the json data? Seems redundant.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from graphql-python/gql
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
graphql-python/gql#613 · 2 comments ·
-
type: feature
Difficulty 3/5 1-2 days Newbie friendliness 42/100
graphql-python/gql#434 ·
-
type: feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
graphql-python/gql#373 · 1 reaction ·
-
type: feature
Difficulty 3/5 1-2 days Newbie friendliness 42/100
graphql-python/gql#355 · 1 comment ·
All issues in graphql-python/gql
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·