NASA-AMMOS / aerie-cli

An unofficial CLI for interacting with Aerie planning software
MIT License
3 stars 4 forks source link

Update Aerie-CLI expanded sequence link query to handle conflict #123

Open cartermak opened 5 months ago

cartermak commented 5 months ago

The UI has this built into the query:

mutation InsertSequenceToActivity($input: sequence_to_simulated_activity_insert_input!) {
  sequence: insert_sequence_to_simulated_activity_one(object: $input, on_conflict: {constraint: sequence_to_simulated_activity_primary_key, update_columns: [seq_id]}) {
    seq_id
  }
}

This will prevent uniqueness violations when trying to link activities to a sequence that are already currently linked to another sequence.