From 4db9d55f24ee4970d66bfa86308c87fbfadb4191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Tkaczy=C5=84ski?= Date: Fri, 1 Mar 2024 17:38:55 +0100 Subject: [PATCH] chore: make GraphQL fragments use unique names to prevent Apollo warning (#105) Also upgraded Apollo in the meantime --- apps/ui/package.json | 2 +- apps/ui/src/networks/offchain/api/queries.ts | 12 ++++++------ yarn.lock | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/ui/package.json b/apps/ui/package.json index 3d03d3562..50ac78b0a 100644 --- a/apps/ui/package.json +++ b/apps/ui/package.json @@ -26,7 +26,7 @@ }, "prettier": "@snapshot-labs/prettier-config", "dependencies": { - "@apollo/client": "^3.8.4", + "@apollo/client": "^3.9.5", "@argent/get-starknet": "^6.4.7", "@braintree/sanitize-url": "^6.0.4", "@ensdomains/eth-ens-namehash": "^2.0.15", diff --git a/apps/ui/src/networks/offchain/api/queries.ts b/apps/ui/src/networks/offchain/api/queries.ts index 04503657c..2dc9c4bb4 100644 --- a/apps/ui/src/networks/offchain/api/queries.ts +++ b/apps/ui/src/networks/offchain/api/queries.ts @@ -1,7 +1,7 @@ import gql from 'graphql-tag'; const SPACE_FRAGMENT = gql` - fragment spaceFragment on Space { + fragment offchainSpaceFragment on Space { id admins members @@ -46,7 +46,7 @@ const SPACE_FRAGMENT = gql` `; const PROPOSAL_FRAGMENT = gql` - fragment proposalFragment on Proposal { + fragment offchainProposalFragment on Proposal { id ipfs space { @@ -83,7 +83,7 @@ const PROPOSAL_FRAGMENT = gql` export const PROPOSAL_QUERY = gql` query ($id: String!) { proposal(id: $id) { - ...proposalFragment + ...offchainProposalFragment } } ${PROPOSAL_FRAGMENT} @@ -92,7 +92,7 @@ export const PROPOSAL_QUERY = gql` export const PROPOSALS_QUERY = gql` query ($first: Int!, $skip: Int!, $where: ProposalWhere) { proposals(first: $first, skip: $skip, where: $where, orderBy: "created", orderDirection: desc) { - ...proposalFragment + ...offchainProposalFragment } } ${PROPOSAL_FRAGMENT} @@ -101,7 +101,7 @@ export const PROPOSALS_QUERY = gql` export const SPACES_RANKING_QUERY = gql` query ($first: Int, $skip: Int, $where: SpaceWhere) { spaces(first: $first, skip: $skip, where: $where) { - ...spaceFragment + ...offchainSpaceFragment } } ${SPACE_FRAGMENT} @@ -110,7 +110,7 @@ export const SPACES_RANKING_QUERY = gql` export const SPACE_QUERY = gql` query ($id: String!) { space(id: $id) { - ...spaceFragment + ...offchainSpaceFragment } } ${SPACE_FRAGMENT} diff --git a/yarn.lock b/yarn.lock index f9294ffbf..e36dc1b13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,10 +40,10 @@ resolved "https://registry.yarnpkg.com/@apollo/cache-control-types/-/cache-control-types-1.0.3.tgz#5da62cf64c3b4419dabfef4536b57a40c8ff0b47" integrity sha512-F17/vCp7QVwom9eG7ToauIKdAxpSoadsJnqIfyryLFSkLSOEqu+eC5Z3N8OXcUVStuOMcNHlyraRsA6rRICu4g== -"@apollo/client@^3.8.4": - version "3.9.2" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.2.tgz#96edf2c212f828bad1ef3d84234fa473c5a27ff8" - integrity sha512-Zw9WvXjqhpbgkvAvnj52vstOWwM0iedKWtn1hSq1cODQyoe1CF2uFwMYFI7l56BrAY9CzLi6MQA0AhxpgJgvxw== +"@apollo/client@^3.9.5": + version "3.9.5" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.5.tgz#502ec191756a7f44788b5f08cbe7b8de594a7656" + integrity sha512-7y+c8MTPU+hhTwvcGVtMMGIgWduzrvG1mz5yJMRyqYbheBkkky3Lki6ADWVSBXG1lZoOtPYvB2zDgVfKb2HSsw== dependencies: "@graphql-typed-document-node/core" "^3.1.1" "@wry/caches" "^1.0.0" @@ -53,7 +53,7 @@ hoist-non-react-statics "^3.3.2" optimism "^0.18.0" prop-types "^15.7.2" - rehackt "0.0.3" + rehackt "0.0.5" response-iterator "^0.2.6" symbol-observable "^4.0.0" ts-invariant "^0.10.3" @@ -11123,10 +11123,10 @@ regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" -rehackt@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.0.3.tgz#1ea454620d4641db8342e2db44595cf0e7ac6aa0" - integrity sha512-aBRHudKhOWwsTvCbSoinzq+Lej/7R8e8UoPvLZo5HirZIIBLGAgdG7SL9QpdcBoQ7+3QYPi3lRLknAzXBlhZ7g== +rehackt@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.0.5.tgz#184c82ea369d5b0b989ede0593ebea8b2bcfb1d6" + integrity sha512-BI1rV+miEkaHj8zd2n+gaMgzu/fKz7BGlb4zZ6HAiY9adDmJMkaDcmuXlJFv0eyKUob+oszs3/2gdnXUrzx2Tg== remarkable@^2.0.1: version "2.0.1"