test sse endpoint
This commit is contained in:
parent
2ed61fd763
commit
582b666da2
12034
pnpm-lock.yaml
Normal file
12034
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -87,6 +87,7 @@ export const InboxView = () => {
|
|||
setPostMessageText('')
|
||||
setMessageToReply(null)
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight
|
||||
console.log('!!! messages:', messages())
|
||||
} catch (error) {
|
||||
console.error('[post message error]:', error)
|
||||
}
|
||||
|
@ -104,7 +105,6 @@ export const InboxView = () => {
|
|||
if (textareaParent) {
|
||||
textareaParent.dataset.replicatedValue = postMessageText()
|
||||
}
|
||||
console.log('!!! messages:', messages())
|
||||
if (params['initChat']) {
|
||||
try {
|
||||
const newChat = await actions.createChat([Number(params['initChat'])], '')
|
||||
|
|
|
@ -49,7 +49,8 @@ export const InboxProvider = (props: { children: JSX.Element }) => {
|
|||
const { unsubscribe } = pipe(
|
||||
subclient().subscription(newMessage, {}),
|
||||
subscribe((result) => {
|
||||
console.debug('[subscription] ' + result)
|
||||
console.info('[subscription]')
|
||||
console.debug(result)
|
||||
// TODO: handle data result
|
||||
})
|
||||
)
|
||||
|
|
|
@ -37,7 +37,7 @@ export const resetToken = () => {
|
|||
}
|
||||
|
||||
const options: ClientOptions = {
|
||||
url: apiBaseUrl,
|
||||
url: apiBaseUrl + '/graphql',
|
||||
maskTypename: true,
|
||||
requestPolicy: 'cache-and-network',
|
||||
fetchOptions: () => {
|
||||
|
|
|
@ -10,7 +10,7 @@ if (isDev) {
|
|||
}
|
||||
|
||||
const options: ClientOptions = {
|
||||
url: apiBaseUrl,
|
||||
url: apiBaseUrl + '/graphql',
|
||||
maskTypename: true,
|
||||
requestPolicy: 'cache-and-network',
|
||||
exchanges
|
||||
|
|
|
@ -7,6 +7,7 @@ export default gql`
|
|||
messages {
|
||||
author
|
||||
body
|
||||
replyTo
|
||||
createdAt
|
||||
id
|
||||
updatedAt
|
||||
|
|
Loading…
Reference in New Issue
Block a user