updated-schema
This commit is contained in:
parent
1e27546b3e
commit
ed23e1f7a8
|
@ -215,7 +215,6 @@ export const SessionProvider = (props: {
|
||||||
if (token) {
|
if (token) {
|
||||||
if (!inboxClient.private) {
|
if (!inboxClient.private) {
|
||||||
apiClient.connect(token)
|
apiClient.connect(token)
|
||||||
notifierClient.connect(token)
|
|
||||||
inboxClient.connect(token)
|
inboxClient.connect(token)
|
||||||
}
|
}
|
||||||
if (!author()) loadAuthor()
|
if (!author()) loadAuthor()
|
||||||
|
|
|
@ -8,11 +8,10 @@ import {
|
||||||
NotificationsResult,
|
NotificationsResult,
|
||||||
QueryLoad_NotificationsArgs,
|
QueryLoad_NotificationsArgs,
|
||||||
} from '../schema/core.gen'
|
} from '../schema/core.gen'
|
||||||
|
import { apiClient } from './core'
|
||||||
|
|
||||||
export const notifierClient = {
|
export const notifierClient = {
|
||||||
private: null,
|
private: apiClient.private,
|
||||||
connect: (token: string) => (notifierClient.private = createGraphQLClient('notifier', token)),
|
|
||||||
|
|
||||||
getNotifications: async (params: QueryLoad_NotificationsArgs): Promise<NotificationsResult> => {
|
getNotifications: async (params: QueryLoad_NotificationsArgs): Promise<NotificationsResult> => {
|
||||||
const resp = await notifierClient.private.query(loadNotifications, params).toPromise()
|
const resp = await notifierClient.private.query(loadNotifications, params).toPromise()
|
||||||
return resp.data?.load_notifications
|
return resp.data?.load_notifications
|
||||||
|
|
Loading…
Reference in New Issue
Block a user