Last active
January 6, 2021 05:33
-
-
Save tlimpanont/f30a085515e1b6706587398e87ff1b5d to your computer and use it in GitHub Desktop.
create workout app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Workout name", | |
| "difficulty": 1, | |
| "duration": 1, | |
| "asset": { | |
| "url": "www.assets.com", | |
| "type": "video/mp4" | |
| }, | |
| "rounds": [ | |
| { | |
| "order": 1, | |
| "round_exercises": { | |
| "data": [ | |
| { | |
| "order": 1, | |
| "type": "DURATION", | |
| "value": 60, | |
| "exercise": { | |
| "on_conflict": { | |
| "constraint": "exercises_name_key", | |
| "update_columns": ["name"] | |
| }, | |
| "data": { | |
| "name": "Exercise name", | |
| "assets": { | |
| "data": [ | |
| { | |
| "order": 1, | |
| "url": "www.assets.com", | |
| "type": "video/mp4" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mutation insert_workouts_one( | |
| $name: String! | |
| $difficulty: Int! | |
| $duration: Int! | |
| $asset: assets_insert_input! | |
| $rounds: [rounds_insert_input!]! | |
| ) { | |
| insert_workouts_one( | |
| on_conflict: { constraint: workouts_name_key, update_columns: [name] } | |
| object: { | |
| asset: { data: $asset } | |
| name: $name | |
| difficulty: $difficulty | |
| duration: $duration | |
| rounds: { data: $rounds } | |
| } | |
| ) { | |
| name | |
| id | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment