chore: add app config with GQL URL and PORT 3001
This commit is contained in:
9
packages/web/src/config/app.ts
Normal file
9
packages/web/src/config/app.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
type Config = {
|
||||
[key: string]: string,
|
||||
};
|
||||
|
||||
const config: Config = {
|
||||
graphqlUrl: process.env.REACT_APP_GRAPHQL_URL as string,
|
||||
};
|
||||
|
||||
export default config;
|
@@ -1,6 +1,10 @@
|
||||
import { ApolloClient, InMemoryCache } from '@apollo/client';
|
||||
import appConfig from 'config/app';
|
||||
|
||||
const cache = new InMemoryCache();
|
||||
const client = new ApolloClient({ cache: cache });
|
||||
const client = new ApolloClient({
|
||||
uri: appConfig.graphqlUrl,
|
||||
cache
|
||||
});
|
||||
|
||||
export default client;
|
||||
|
Reference in New Issue
Block a user