| 99 | |
| 100 | |
| 101 | def marge_feature_switch(initial_output: dict) -> dict: |
| 102 | featureSwitches = {} |
| 103 | for k in initial_output["featureSwitch"].keys(): |
| 104 | if k == "debug": |
| 105 | for k in initial_output["featureSwitch"]["debug"].keys(): |
| 106 | featureSwitches[k] = initial_output["featureSwitch"]["debug"][k] |
| 107 | if k == "defaultConfig": |
| 108 | for k in initial_output["featureSwitch"]["defaultConfig"].keys(): |
| 109 | featureSwitches[k] = initial_output["featureSwitch"]["defaultConfig"][k] |
| 110 | if k == "user": |
| 111 | for k in initial_output["featureSwitch"]["user"].keys(): |
| 112 | featureSwitches[k] = initial_output["featureSwitch"]["user"][k] |
| 113 | return featureSwitches |
| 114 | |
| 115 | |
| 116 | def marge_metadata(graphql_output: list, feature_switch: dict) -> list: |