Skip to content

Commit 8a89a5c

Browse files
committed
feat(settings): add setAppSettings method
1 parent 3063799 commit 8a89a5c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.0.77",
2+
"version": "0.0.78",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

src/modules/settings/index.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
SettingsResponse,
1414
UserSettingsResponse,
1515
} from '../../index';
16-
import { SET_USER_SETTINGS_MUTATION } from '../../mutations';
16+
import { SET_APP_SETTINGS_MUTATION, SET_USER_SETTINGS_MUTATION } from '../../mutations';
1717

1818
export default class Settings {
1919
constructor(protected client: ClientType, protected key: string) {}
@@ -87,4 +87,17 @@ export default class Settings {
8787
return undefined;
8888
}
8989
}
90+
async setAppSettings(input: ConfigInput) {
91+
try {
92+
await this.client.mutate({
93+
mutation: SET_APP_SETTINGS_MUTATION,
94+
variables: {
95+
input,
96+
},
97+
});
98+
return true;
99+
} catch {
100+
return undefined;
101+
}
102+
}
90103
}

0 commit comments

Comments
 (0)