Hey all, looking for clarity on the LaunchRunMutat...
# ask-community
s
Hey all, looking for clarity on the LaunchRunMutation using dagster's graphql API. Where can I find the repositoryLocationName? Should runConfigData include required resources, partitions_def? Is there an example I can use for this type? Thanks in advance!
o
hi @Samuel Shi! for repositoryLocationName, you can find this if you go to the "Deployment" tab in the UI. If you're using the new
Definitions
API, then the things listed there will be the repository (code) location names, and the repository will be
__repository__
. If you're using
@repository
, then that tab will show you
{code_location_name}@{repository_name}
. As for runConfigData, this just needs to be the actual run config you'd like to supply to the run, so essentially just a dictionary of config in the same shape that you'd pass into
@job(config={...})
. One example would be
Copy code
{
  "ops": {
    "my_op": {
      "config": {
        "foo": 1,
        "bar": "baz"
      }
    }
  }
}
I also wrote up the bit about the repository args into a github discussion for better visibility (as it's pretty confusing at the moment): https://github.com/dagster-io/dagster/discussions/14752
s
got it. thanks!
@owen One of the things that I want to pass in config is for what partition to run the config for. For example: I want to run this job for partition 1, but using the launchrunmutation. How would I be able to achieve this?
o
ah I see -- partition keys can be set via the tags, see: https://github.com/dagster-io/dagster/discussions/14442
s
@owen Can this be done in a pure graphql query (not pythong client)? Thanks again!
o
yep! under the hood, the python client is just executing a graphql query. tags get passed via
{"executionMetadata": {"tags": {"dagster/partition": "..."}}}
s
Gotcha. Thanks @owen , you rock!
🌈 1