# Retrieve Builds https://api-docs.lumar.io/docs/protect/builds/retrieve-builds ## Retrieve all builds belonging to a test suite The following query retrieves the last 100 builds of a given test suite: ```graphql query GetTestSuiteBuilds($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { builds(last: 100) { nodes { status createdAt finishedAt passed failedTestCount } } } } } ``` ## Retrieve the latest build belonging to a test suite The following query retrieves the latest build of a given test suite: ```graphql query GetTestSuiteLatestBuild($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { builds(first: 1, orderBy: {direction: DESC, field: createdAt}) { nodes { status createdAt } } } } } ```