Teal.fm frontend powered by slices.network tealfm-slices.wisp.place
tealfm slices

feat: update slice URI

Changed files
+11 -11
src
+1 -1
README.md
···
- **Production API**: `https://api.slices.network/graphql`
- **Slice**:
-
`at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a`
## Scripts
···
- **Production API**: `https://api.slices.network/graphql`
- **Slice**:
+
`at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26`
## Scripts
+2 -2
package.json
···
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
-
"schema:dev": "npx get-graphql-schema 'http://localhost:3000/graphql?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a' > schema.graphql",
-
"schema:prod": "npx get-graphql-schema 'https://api.slices.network/graphql?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a' > schema.graphql"
},
"dependencies": {
"graphql-ws": "^6.0.6",
···
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
+
"schema:dev": "npx get-graphql-schema 'http://localhost:3000/graphql?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26' > schema.graphql",
+
"schema:prod": "npx get-graphql-schema 'https://api.slices.network/graphql?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26' > schema.graphql"
},
"dependencies": {
"graphql-ws": "^6.0.6",
+8 -8
src/main.tsx
···
import { StrictMode, Suspense } from "react";
import { createRoot } from "react-dom/client";
-
import { BrowserRouter, Routes, Route } from "react-router-dom";
import "./index.css";
import App from "./App.tsx";
import Profile from "./Profile.tsx";
···
import { RelayEnvironmentProvider } from "react-relay";
import {
Environment,
-
Network,
type FetchFunction,
Observable,
type SubscribeFunction,
-
type GraphQLResponse,
} from "relay-runtime";
import { createClient } from "graphql-ws";
const HTTP_ENDPOINT =
-
"https://api.slices.network/graphql?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a";
const WS_ENDPOINT =
-
"wss://api.slices.network/graphql/ws?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a";
const fetchGraphQL: FetchFunction = async (request, variables) => {
const resp = await fetch(HTTP_ENDPOINT, {
···
sink.error(error);
} else if (error instanceof CloseEvent) {
sink.error(
-
new Error(`WebSocket closed: ${error.code} ${error.reason}`)
);
} else {
sink.error(new Error(JSON.stringify(error)));
}
},
complete: () => sink.complete(),
-
}
);
});
};
···
</Suspense>
</RelayEnvironmentProvider>
</BrowserRouter>
-
</StrictMode>
);
···
import { StrictMode, Suspense } from "react";
import { createRoot } from "react-dom/client";
+
import { BrowserRouter, Route, Routes } from "react-router-dom";
import "./index.css";
import App from "./App.tsx";
import Profile from "./Profile.tsx";
···
import { RelayEnvironmentProvider } from "react-relay";
import {
Environment,
type FetchFunction,
+
type GraphQLResponse,
+
Network,
Observable,
type SubscribeFunction,
} from "relay-runtime";
import { createClient } from "graphql-ws";
const HTTP_ENDPOINT =
+
"https://api.slices.network/graphql?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26";
const WS_ENDPOINT =
+
"wss://api.slices.network/graphql/ws?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26";
const fetchGraphQL: FetchFunction = async (request, variables) => {
const resp = await fetch(HTTP_ENDPOINT, {
···
sink.error(error);
} else if (error instanceof CloseEvent) {
sink.error(
+
new Error(`WebSocket closed: ${error.code} ${error.reason}`),
);
} else {
sink.error(new Error(JSON.stringify(error)));
}
},
complete: () => sink.complete(),
+
},
);
});
};
···
</Suspense>
</RelayEnvironmentProvider>
</BrowserRouter>
+
</StrictMode>,
);