chore: Migrate from Relay to Apollo (#5754)
* feat: initial apollo configutation (#5565) * initial apollo configutation * add new files * check in types-and-hooks * config unused export * deduplicate * ignore checked in schema for linting * remove prettier ignore * test unchecking types and hooks file * undo * rename codegen, respond to comments Co-authored-by:Charles Bachmeier <charlie@genie.xyz> * Remove maybe value from codegen * add babel gql codegen * correct ts graphql-tag * remove plugin from craco * chore: migrate Assets Query to Apollo (#5665) * chore: migrate Assets Query to Apollo * delete comment * move length check back to collectionAssets * remove uneeded check * respond to comments * working switching and filters * change sweep fetch policy Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * chore: migrate collection query to apollo (#5647) * migrate collection query to apollo * remove page level suspense * undo removing page level suspense * rename query and hook * guard returns * add return type prop * cleanup nullables * memoizing * use gql from apollo * use babel gql and move empty trait * add fetch policy Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * chore: migrate NFT details query to apollo (#5648) * chore: migrate NFT details query to apollo * update todo * update imports * remove no longer used hook * rename query * use babel gql and nonnullable type * working page * add fetchpolicy * respond to comments Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * chore: migrate NftBalanceQuery (#5653) * chore: migrate NftBalanceQuery * cleanup * update pagination * better undefined handling * move brake listing for invalid asset higher * better handle loading * memoize and cleanup Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * remove named gql query consts * set default fetchPolicy * null suspense * chore: Migrate The Graph queries (#5727) * migrate TheGraph queries to Apollo * add new files * ignore thegraph generated types * use standard fetchPolicy * update apollo codegen commands Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * chore: migrate token queries to Apollo (#5682) * migrate utils to types-and-hooks * too many TokenTable re-renders * working token queries * fixed sparkline for native asset * onChangeTimePeriod * define inline * use query instead of data in naming * sparklineQuery instead of sparklineData * rename to usePriceHistory * multiline if else * remove optional * remove unneeded eslint ignore * rename tokenQueryLoading * rename OnChangeTimePeriod * token address fallback * just address Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * chore: deprecate Relay (#5747) * chore: deprecate Relay * remove graph:ql generate step * add new files * apollo to graphql centric naming * add new files Co-authored-by:
Charles Bachmeier <charlie@genie.xyz> * remove no longer needed config exclusions Co-authored-by:
Charles Bachmeier <charlie@genie.xyz>
Showing
apollo-codegen.ts
0 → 100644
apollo-codegen_thegraph.ts
0 → 100644
... | @@ -8,10 +8,10 @@ | ... | @@ -8,10 +8,10 @@ |
"contracts:compile:abi": "typechain --target ethers-v5 --out-dir src/abis/types \"./src/abis/**/*.json\"", | "contracts:compile:abi": "typechain --target ethers-v5 --out-dir src/abis/types \"./src/abis/**/*.json\"", | ||
"contracts:compile:v3": "typechain --target ethers-v5 --out-dir src/types/v3 \"./node_modules/@uniswap/**/artifacts/contracts/**/*[!dbg].json\"", | "contracts:compile:v3": "typechain --target ethers-v5 --out-dir src/types/v3 \"./node_modules/@uniswap/**/artifacts/contracts/**/*[!dbg].json\"", | ||
"contracts:compile": "yarn contracts:compile:abi && yarn contracts:compile:v3", | "contracts:compile": "yarn contracts:compile:abi && yarn contracts:compile:v3", | ||
"relay": "relay-compiler relay.config.js", | |||
"relay-thegraph": "relay-compiler relay_thegraph.config.js", | |||
"graphql:fetch": "node fetch-schema.js", | "graphql:fetch": "node fetch-schema.js", | ||
"graphql:generate": "yarn relay && yarn relay-thegraph", | "graphql:generate:data": "graphql-codegen --config apollo-codegen.ts", | ||
"graphql:generate:thegraph": "graphql-codegen --config apollo-codegen_thegraph.ts", | |||
"graphql:generate": "yarn graphql:generate:data && yarn graphql:generate:thegraph", | |||
"prei18n:extract": "node prei18n-extract.js", | "prei18n:extract": "node prei18n-extract.js", | ||
"i18n:extract": "lingui extract --locale en-US", | "i18n:extract": "lingui extract --locale en-US", | ||
"i18n:compile": "yarn i18n:extract && lingui compile", | "i18n:compile": "yarn i18n:extract && lingui compile", | ||
... | @@ -94,7 +94,6 @@ | ... | @@ -94,7 +94,6 @@ |
"@typescript-eslint/parser": "^4", | "@typescript-eslint/parser": "^4", | ||
"@vanilla-extract/babel-plugin": "^1.1.7", | "@vanilla-extract/babel-plugin": "^1.1.7", | ||
"@vanilla-extract/webpack-plugin": "^2.1.11", | "@vanilla-extract/webpack-plugin": "^2.1.11", | ||
"babel-plugin-relay": "^14.1.0", | |||
"cypress": "^10.3.1", | "cypress": "^10.3.1", | ||
"env-cmd": "^10.1.0", | "env-cmd": "^10.1.0", | ||
"eslint": "^7.11.0", | "eslint": "^7.11.0", | ||
... | @@ -113,16 +112,23 @@ | ... | @@ -113,16 +112,23 @@ |
"postinstall-postinstall": "^2.1.0", | "postinstall-postinstall": "^2.1.0", | ||
"prettier": "^2.7.1", | "prettier": "^2.7.1", | ||
"react-scripts": "^4.0.3", | "react-scripts": "^4.0.3", | ||
"relay-compiler": "^14.1.0", | |||
"serve": "^11.3.2", | "serve": "^11.3.2", | ||
"ts-transform-graphql-tag": "^0.2.1", | |||
"typechain": "^5.0.0", | "typechain": "^5.0.0", | ||
"typescript": "^4.4.3", | "typescript": "^4.4.3", | ||
"yarn-deduplicate": "^6.0.0" | "yarn-deduplicate": "^6.0.0" | ||
}, | }, | ||
"dependencies": { | "dependencies": { | ||
"@apollo/client": "^3.7.2", | |||
"@coinbase/wallet-sdk": "^3.3.0", | "@coinbase/wallet-sdk": "^3.3.0", | ||
"@fontsource/ibm-plex-mono": "^4.5.1", | "@fontsource/ibm-plex-mono": "^4.5.1", | ||
"@fontsource/inter": "^4.5.1", | "@fontsource/inter": "^4.5.1", | ||
"@graphql-codegen/cli": "^2.15.0", | |||
"@graphql-codegen/client-preset": "^1.2.1", | |||
"@graphql-codegen/typescript": "^2.8.3", | |||
"@graphql-codegen/typescript-operations": "^2.5.8", | |||
"@graphql-codegen/typescript-react-apollo": "^3.3.7", | |||
"@graphql-codegen/typescript-resolvers": "^2.7.8", | |||
"@lingui/core": "^3.14.0", | "@lingui/core": "^3.14.0", | ||
"@lingui/macro": "^3.14.0", | "@lingui/macro": "^3.14.0", | ||
"@lingui/react": "^3.14.0", | "@lingui/react": "^3.14.0", | ||
... | @@ -135,7 +141,6 @@ | ... | @@ -135,7 +141,6 @@ |
"@react-hook/window-scroll": "^1.3.0", | "@react-hook/window-scroll": "^1.3.0", | ||
"@reduxjs/toolkit": "^1.6.1", | "@reduxjs/toolkit": "^1.6.1", | ||
"@sentry/react": "7.20.1", | "@sentry/react": "7.20.1", | ||
"@types/react-relay": "^13.0.2", | |||
"@types/react-window-infinite-loader": "^1.0.6", | "@types/react-window-infinite-loader": "^1.0.6", | ||
"@uniswap/analytics": "1.2.0", | "@uniswap/analytics": "1.2.0", | ||
"@uniswap/analytics-events": "^1.5.0", | "@uniswap/analytics-events": "^1.5.0", | ||
... | @@ -215,8 +220,6 @@ | ... | @@ -215,8 +220,6 @@ |
"react-popper": "^2.2.3", | "react-popper": "^2.2.3", | ||
"react-query": "^3.39.1", | "react-query": "^3.39.1", | ||
"react-redux": "^8.0.2", | "react-redux": "^8.0.2", | ||
"react-relay": "^14.1.0", | |||
"react-relay-network-modern": "^6.2.1", | |||
"react-router-dom": "^6.3.0", | "react-router-dom": "^6.3.0", | ||
"react-spring": "^9.5.5", | "react-spring": "^9.5.5", | ||
"react-table": "^7.8.0", | "react-table": "^7.8.0", | ||
... | ... |
This diff is collapsed.
src/graphql/data/apollo.ts
0 → 100644
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment