Skip to content

Commit

Permalink
chore: make GraphQL fragments use unique names to prevent Apollo warn…
Browse files Browse the repository at this point in the history
…ing (#105)

Also upgraded Apollo in the meantime
  • Loading branch information
Sekhmet authored Mar 1, 2024
1 parent 7ed51a3 commit 4db9d55
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion apps/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions apps/ui/src/networks/offchain/api/queries.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import gql from 'graphql-tag';

const SPACE_FRAGMENT = gql`
fragment spaceFragment on Space {
fragment offchainSpaceFragment on Space {
id
admins
members
Expand Down Expand Up @@ -46,7 +46,7 @@ const SPACE_FRAGMENT = gql`
`;

const PROPOSAL_FRAGMENT = gql`
fragment proposalFragment on Proposal {
fragment offchainProposalFragment on Proposal {
id
ipfs
space {
Expand Down Expand Up @@ -83,7 +83,7 @@ const PROPOSAL_FRAGMENT = gql`
export const PROPOSAL_QUERY = gql`
query ($id: String!) {
proposal(id: $id) {
...proposalFragment
...offchainProposalFragment
}
}
${PROPOSAL_FRAGMENT}
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -11123,10 +11123,10 @@ regexp.prototype.flags@^1.5.1:
define-properties "^1.2.0"
set-function-name "^2.0.0"

[email protected].3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.0.3.tgz#1ea454620d4641db8342e2db44595cf0e7ac6aa0"
integrity sha512-aBRHudKhOWwsTvCbSoinzq+Lej/7R8e8UoPvLZo5HirZIIBLGAgdG7SL9QpdcBoQ7+3QYPi3lRLknAzXBlhZ7g==
[email protected].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"
Expand Down

0 comments on commit 4db9d55

Please sign in to comment.