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

Samuel Shi

06/12/2023, 4:26 PM
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

owen

06/12/2023, 6:43 PM
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

Samuel Shi

06/12/2023, 7:37 PM
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

owen

06/12/2023, 8:57 PM
ah I see -- partition keys can be set via the tags, see: https://github.com/dagster-io/dagster/discussions/14442
s

Samuel Shi

06/12/2023, 9:27 PM
@owen Can this be done in a pure graphql query (not pythong client)? Thanks again!
o

owen

06/12/2023, 9:33 PM
yep! under the hood, the python client is just executing a graphql query. tags get passed via
{"executionMetadata": {"tags": {"dagster/partition": "..."}}}
s

Samuel Shi

06/13/2023, 2:10 PM
Gotcha. Thanks @owen , you rock!
🌈 1