WIP PWA for Grain
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add API endpoint configuration

+12 -1
+1
.env.example
··· 1 + VITE_API_ENDPOINT=http://localhost:4000/graphql
+4
.gitignore
··· 1 + node_modules/ 2 + dist/ 3 + .env 4 + .env.local
+4
src/config.js
··· 1 + export const config = { 2 + // Set your quickslice GraphQL endpoint here 3 + apiEndpoint: import.meta.env.VITE_API_ENDPOINT || 'http://localhost:4000/graphql' 4 + };
+3 -1
src/services/grain-api.js
··· 1 + import { config } from '../config.js'; 2 + 1 3 class GrainApiService { 2 - #endpoint = '/api/graphql'; // Configure based on environment 4 + #endpoint = config.apiEndpoint; 3 5 4 6 async getTimeline({ first = 10, after = null } = {}) { 5 7 const query = `