Skip to content

Identifying complex fields during query execution #1721

@andrehp

Description

@andrehp

Hi!

Is there a way to identify if a given resolve step is part of a complex query?

I'm trying to monitor the number of times the complex fields are being queried to understand which ones are used more frequently so that I can optimize accordingly.

For example, in this query:

  query GetUserData($userId: UUID!) {
    userQuery {
      getUserById(id: $userId) {
        firstName
        lastName
        emailAddress
        job {
          description
        }
      }
    }
  }

Suppose that job is a complex field for user, I would like to be able to see something maybe in ResolveInfo to identify job as a complex field.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions