Skip to content

Commit

Permalink
add: migrate subgraph to studio
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpy committed Jun 27, 2024
1 parent 4f68520 commit 17baa74
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local.properties
node_modules/
npm-debug.log
yarn-error.log
.env

# fastlane
#
Expand Down
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@celo-tools/celo-ethers-wrapper": "^0.4.0",
"@ethersproject/shims": "^5.7.0",
"@gooddollar/good-design": "^0.1.31",
"@gooddollar/goodcollective-sdk": "^1.0.15",
"@gooddollar/goodcollective-sdk": "^1.1.1",
"@gooddollar/web3sdk-v2": "^0.2.2",
"@nerdwallet/apollo-cache-policies": "^3.2.0",
"@react-native-aria/interactions": "0.2.3",
Expand Down Expand Up @@ -63,7 +63,7 @@
"react-native-get-random-values": "^1.9.0",
"react-native-modal": "^13.0.1",
"react-native-safe-area-context": "3.3.2",
"react-native-svg": "^13.9.0",
"react-native-svg": "^15.1.0",
"react-native-svg-web": "^1.0.9",
"react-native-web": "0.18.*",
"react-router-dom": "^6.14.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { AsyncStorageWrapper, persistCache } from 'apollo3-cache-persist';
import AsyncStorage from '@react-native-async-storage/async-storage';

import { errorLink, retryLink } from '../../utils/apolloLinkUtils';
import env from '../../lib/env';

const subgraphUri = 'https://api.thegraph.com/subgraphs/name/gooddollar/goodcollective';
const subgraphUri = env.REACT_APP_SUBGRAPH;

export const useCreateSubgraphApolloClient = (): ApolloClient<any> | undefined => {
const [apolloClient, setApolloClient] = useState<ApolloClient<NormalizedCacheObject> | undefined>();
Expand Down
3 changes: 3 additions & 0 deletions packages/app/src/lib/env.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
...process.env,
};
1 change: 1 addition & 0 deletions packages/app/src/lib/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { ...process.env, ...import.meta.env };
4 changes: 3 additions & 1 deletion packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "@tsconfig/react-native/tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx",
"lib": ["DOM", "es2019"]
"lib": ["DOM", "es2019"],
"module": "ESNext",
"types": ["vite/client", "jest"]
}
}
1 change: 1 addition & 0 deletions packages/app/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
envPrefix: ['REACT_APP_'],
plugins: [react(), dynamicImports(), nodePolyfills(), viteTsconfigPaths()],
resolve: {
alias: {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4307,7 +4307,7 @@ __metadata:
"@celo-tools/celo-ethers-wrapper": ^0.4.0
"@ethersproject/shims": ^5.7.0
"@gooddollar/good-design": ^0.1.31
"@gooddollar/goodcollective-sdk": ^1.0.15
"@gooddollar/goodcollective-sdk": ^1.1.1
"@gooddollar/web3sdk-v2": ^0.2.2
"@nerdwallet/apollo-cache-policies": ^3.2.0
"@react-native-aria/interactions": 0.2.3
Expand Down Expand Up @@ -4388,7 +4388,7 @@ __metadata:
languageName: unknown
linkType: soft

"@gooddollar/goodcollective-contracts@^1.0.4, @gooddollar/goodcollective-contracts@workspace:packages/contracts":
"@gooddollar/goodcollective-contracts@^1.1.0, @gooddollar/goodcollective-contracts@workspace:packages/contracts":
version: 0.0.0-use.local
resolution: "@gooddollar/goodcollective-contracts@workspace:packages/contracts"
dependencies:
Expand Down Expand Up @@ -4431,11 +4431,11 @@ __metadata:
languageName: unknown
linkType: soft

"@gooddollar/goodcollective-sdk@^1.0.15, @gooddollar/goodcollective-sdk@workspace:packages/sdk-js":
"@gooddollar/goodcollective-sdk@^1.1.1, @gooddollar/goodcollective-sdk@workspace:packages/sdk-js":
version: 0.0.0-use.local
resolution: "@gooddollar/goodcollective-sdk@workspace:packages/sdk-js"
dependencies:
"@gooddollar/goodcollective-contracts": ^1.0.4
"@gooddollar/goodcollective-contracts": ^1.1.0
"@superfluid-finance/sdk-core": ^0.6.12
"@types/eslint": ^8.40.2
"@typescript-eslint/eslint-plugin": ^5.60.0
Expand Down

0 comments on commit 17baa74

Please sign in to comment.