GraphQL API rate limits not respecting directives in query cost/node count

I have a fairly simplistic query that really isn’t requesting that much information at all, but I’m consistently getting errors on making the query with response messages such as “This query requests up to XXX,XXX possible nodes which exceeds the maximum limit of 500,000” or “By the time this query traverses to the reactions connection, it is requesting up to 900,000 possible nodes which exceeds the maximum limit of 500,000.” The second error message is especially worrying because I’m not even querying for reactions.

This appears to be because my query makes use of directives to reduce/expand the overall amount of information requested. I’m attempting to make the query w/ “skipDetails” set to true, which in turn makes it exclude timeline items, commits, etc etc. Essentially all the things that would make the query costly. However, the response I’m seeing indicates that even though directives are obeyed in the resulting data, they have no relevance in terms of calculating cost or query node count, and instead the cost/node count are calculated as if the directives were not there.

This is causing the cost per query to skyrocket, and very easily causes the queries to not return at all due to the fact that it perceives the query goes beyond the 500,000 node limit, even though it’s nowhere near it.

By my own calculations, this is the actual number of nodes queried:

1  = 1 organization
+
1  = 1 repository
+
50 = 50 pull requests
= 52 nodes

Clearly this should be nowhere near enough to cause the API to fail to respond.

I’ve included the query and key fragments used by it below:

query MoreRepoPRs($orgName:String!, $repoName:String!, $quantity:Int = 50, $cursor:String, $states:[PullRequestState!] = [MERGED], $skipDetails:Boolean = true) {
  rateLimit {
    ...RateLimit
  }
  organization(login:$orgName) {
    repository(name:$repoName) {
      pullRequests(after:$cursor, states: $states, first: $quantity, orderBy:{field:CREATED_AT, direction:DESC}) {
        ...PullRequests
      }
    }
  }
}

fragment PullRequests on PullRequestConnection {
  totalCount
  pageInfo {
    ...PageInfo
  }
  nodes {
    ...PullRequest
  }
}

fragment PullRequest on PullRequest {
  ...PullRequestId
  ...Comment
  title
  url
  createdAt
  updatedAt
  closedAt
  state
  baseRefName
  baseRefOid
  headRefName
  headRefOid
  mergeable
  isCrossRepository
  commits(first: 20) @skip(if: $skipDetails) {
    totalCount
    pageInfo {
      ...PageInfo
    }
    nodes {
      url
      commit {
        ...Commit
      }
    }
  }
  additions
  deletions
  changedFiles
  reviewThreads(first: 5) @skip(if: $skipDetails) {
    totalCount
    pageInfo {
      ...PageInfo
    }
    nodes {
      id
      isResolved
      resolvedBy {
        ...User
      }
      comments(first: 30) {
        totalCount
        pageInfo {
          ...PageInfo
        }
        nodes {
          ...Comment
          pullRequestReview {
            id
            databaseId
          }
          databaseId
        }
      }
    }
  }
  timelineItems(first: 15) @skip(if: $skipDetails) {
    ...PullRequestTimelineItems
  }
}