Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queryDepth being too strict #105

Closed
feugy opened this issue Jan 14, 2020 · 0 comments · Fixed by #116
Closed

queryDepth being too strict #105

feugy opened this issue Jan 14, 2020 · 0 comments · Fixed by #116

Comments

@feugy
Copy link
Contributor

feugy commented Jan 14, 2020

Hello!
It seems the calculation for query depth is not considering only the depth of a query, but also hoy many fields it returns.
Here is a real example:

fragment metric on WeatherDatum {
  actual
  units
  delta
  style
  normal
}
fragment metricArray on WeatherData {
  actual
  normal
  units
  style
}
fragment summedMetricArray on WeatherSummedData {
  units
  array
  sum
}

query FieldMetrics($farmId: String) {
  fieldForecast(id: $farmId, unit: Metric) {
    temperature {
      today {
        ...metric
      }
      maximaOverYear {
        ...metricArray
      }
    }
    rainfall {
      accumulation {
        ...metricArray
      }
      last30DaysSummed {
        ...summedMetricArray
      }
      today {
        ...metric
      }
      yesterday {
        ...metric
      }
      nextWeek {
        ...metric
      }
    }
    country
    state
    county
    updateTime
    createdTime
  }
}

The maximum depth seems to be 3: fieldForecast > temperature > today
But when running the query in playground, I am receiving:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant