Skip to content

Instantly share code, notes, and snippets.

View DenoBY's full-sized avatar
💻

Baidak.D DenoBY

💻
View GitHub Profile
@DenoBY
DenoBY / echo_client.js
Last active March 10, 2022 23:05
Apollo Lighthouse Subscription - Laravel Echo Server
import {ApolloClient, InMemoryCache, HttpLink} from "@apollo/client";
import gql from "graphql-tag";
import Echo from "laravel-echo";
import {createLighthouseSubscriptionLink} from "@thekonz/apollo-lighthouse-subscription-link";
import {ApolloLink} from "apollo-link";
window.io = require("socket.io-client");
const echoClient = new Echo({
broadcaster: 'socket.io',