@jsb188/graphql 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache/config.ts +1 -1
- package/gql/mutations/authMutations.ts +28 -0
- package/package.json +1 -1
- package/types.d.ts +13 -0
package/cache/config.ts
CHANGED
|
@@ -188,10 +188,38 @@ mutation changePassword (
|
|
|
188
188
|
$currentPassword: String!
|
|
189
189
|
$password: String!
|
|
190
190
|
$passwordRepeat: String!
|
|
191
|
+
$token: Token
|
|
191
192
|
) {
|
|
192
193
|
changePassword (
|
|
193
194
|
currentPassword: $currentPassword
|
|
194
195
|
password: $password
|
|
195
196
|
passwordRepeat: $passwordRepeat
|
|
197
|
+
token: $token
|
|
198
|
+
)
|
|
199
|
+
}`;
|
|
200
|
+
|
|
201
|
+
export const requestTokenizedEmailMtn = gql`
|
|
202
|
+
mutation requestTokenizedEmail (
|
|
203
|
+
$email: String!
|
|
204
|
+
$requestType: TokenType!
|
|
205
|
+
) {
|
|
206
|
+
requestTokenizedEmail (
|
|
207
|
+
email: $email
|
|
208
|
+
requestType: $requestType
|
|
196
209
|
)
|
|
197
210
|
}`;
|
|
211
|
+
|
|
212
|
+
export const consumeTokenMtn = gql`
|
|
213
|
+
mutation consumeToken (
|
|
214
|
+
$token: Token!
|
|
215
|
+
$expected: TokenType
|
|
216
|
+
) {
|
|
217
|
+
consumeToken (
|
|
218
|
+
token: $token
|
|
219
|
+
expected: $expected
|
|
220
|
+
) {
|
|
221
|
+
id
|
|
222
|
+
success
|
|
223
|
+
value
|
|
224
|
+
}
|
|
225
|
+
}`;
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -29,3 +29,16 @@ export interface GraphQLHandlers {
|
|
|
29
29
|
export type UpdateObserversFn = (args: UpdateDataObserverArgs) => void;
|
|
30
30
|
export type OnCompletedGQLFn = (data: any, error: ServerErrorObj | null, variables: any) => void;
|
|
31
31
|
export type OnErrorGQLFn = (error: ServerErrorObj | null, variables: any) => void;
|
|
32
|
+
|
|
33
|
+
// Params for most GraphQL hooks
|
|
34
|
+
|
|
35
|
+
export type UseGraphQLParams = Partial<{
|
|
36
|
+
onCompleted: OnCompletedGQLFn;
|
|
37
|
+
onError: OnErrorGQLFn;
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
// Params for most GraphQL hooks with these options
|
|
41
|
+
|
|
42
|
+
export type UseGraphQLParamsExtra = Partial<{
|
|
43
|
+
checkMountedBeforeCallback?: boolean;
|
|
44
|
+
}> & UseGraphQLParams;
|