Fixed subscription issue. Related to no authorization token for WS request.
This commit is contained in:
@@ -6,13 +6,17 @@ import { Table, Divider, Icon } from "antd";
|
||||
|
||||
import {
|
||||
GET_ALL_OPEN_JOBS,
|
||||
SUBSCRIPTION_ALL_OPEN_JOBS
|
||||
SUBSCRIPTION_ALL_OPEN_JOBS,
|
||||
test
|
||||
} from "../../graphql/jobs.queries";
|
||||
|
||||
export default function JobsPage() {
|
||||
const { loading, error, data } = useQuery(GET_ALL_OPEN_JOBS);
|
||||
|
||||
//const { loading, error, data } = useSubscription(SUBSCRIPTION_ALL_OPEN_JOBS);
|
||||
// const { loading, error, data } = useQuery(GET_ALL_OPEN_JOBS, {
|
||||
// fetchPolicy: "network-only"
|
||||
// });
|
||||
const { loading, error, data } = useSubscription(SUBSCRIPTION_ALL_OPEN_JOBS, {
|
||||
fetchPolicy: "network-only"
|
||||
});
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -76,8 +80,10 @@ export default function JobsPage() {
|
||||
}
|
||||
];
|
||||
|
||||
//if (loading) return "Loading";
|
||||
if (error) return <AlertComponent message={error.message} />;
|
||||
if (error) {
|
||||
console.log("error", error);
|
||||
return <AlertComponent message={error} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user