Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

DSL: Compose query with all nested fields included

Open
#316 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api

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

type: feature

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from graphql-python/gql

All issues in graphql-python/gql

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.