https://dagster.io/ logo
#ask-ai
Title
# ask-ai
s

Simon Ammer

02/22/2024, 3:33 PM
Can I use the GraphQL API to query the result of a specific partition?
s

Scout

02/22/2024, 3:33 PM
Yes, you can use the GraphQL API to query the result of a specific partition. The documentation provides an example of a GraphQL query that retrieves a list of Dagster runs, which can be modified to filter runs by partition. Here is an example query from the documentation that retrieves all runs:
Copy code
graphql query RunsQuery {   runsOrError {     __typename     ... on Runs {       results {         runId         jobName         status         runConfigYaml         startTime         endTime       }     }   } }
To filter by a specific partition, you would need to modify the query to include a filter that specifies the partition you are interested in. The exact field and filter syntax will depend on the schema of your GraphQL API and how partitions are represented within it. If you need to query for runs associated with a specific partition, you would typically use the
partition
field within your query, if available, to specify the partition key. However, the exact query structure and available fields would be determined by the GraphQL schema for your Dagster instance. For more detailed information about the available queries and how to structure them, you can access the GraphQL Playground by navigating to the
/graphql
route in your browser, where you can explore the full GraphQL schema and use the interactive documentation to construct your queries.
3 Views