sometimes when I execute this query to get all run...
# dagster-feedback
z
sometimes when I execute this query to get all runs associated with a job:
Copy code
query RunsQuery(
    $pipelineName: String
    $limit: Int
  ) {
    runsOrError (filter: {pipelineName: $pipelineName,}, limit: $limit) {
      __typename
      ... on PythonError {
        message
        stack
      }
      ... on Runs {
        results {
          runId
          jobName
          status
          stats {
            ... on RunStatsSnapshot {
              startTime
              endTime
              stepsFailed
            }
          }
        }
      }
    }
  }
variables = {"pipelineName": "job-to-search"} I get this:
Copy code
{
  "error": "JSON.parse: unexpected character at line 1 column 1 of the JSON data"
}
the query does seem to take a while to return and maybe that's the problem, but it's unclear to me how to paginate through this endpoint because it seems that none of the response objects contain a cursor. this error also only occurs maybe 1/4 of the time
🤖 1
d
Hey zach - my guess is its running slow because of that stats field - are you using that part?
That has to query the event log to pull the stats, so its much slower
z
hmm okay that makes sense. I was hoping to get the stepsFailed but might not need it for now - if I do I suppose I can just get the runIds and then make separate calls to retrieve the stats
not a big deal