Skip to content

Equivalent of Call Hierarchy but for fragments/fields #96

@martinbonnin

Description

@martinbonnin

IntelliJ has the Call Hierarchy tool that allows to drill into where a specific funtion is called:

Image

I would like the same thing for fragments:

query GetHomeFeed {
   home {
     videos {
       ...videoDetails
     }
   }
}

fragment videoDetails on Video {
  id
  title
  author {
    ...userDetails
  }
}

fragment userDetails on User {
  id
  name
  email
}

I would expect the call hierarchy to be something like GetHomeFeed (query) -> home -> videos -> videoDetails (fragment) -> author -> userDetails (fragment) (only a single call in that case)

Bonus points for being able to do this on fields. If I type a new query:

query GetUser {
  user {
    ...userDetails
  }
}

Call hierarchy for User.email:

- email
  - userDetails (fragment)
    - user
      - GetUser (query)
    - author
      - videoDetails (fragment)
        - videos
          - home
            - GetHomeFeedQuery (query)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions