Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update apollo graphql packages to v2 (major) #2054

Merged
merged 5 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/apollo-federation/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"check": "exit 0"
},
"dependencies": {
"@apollo/gateway": "^0.52.0",
"@apollo/gateway": "^2.0.0",
"@envelop/apollo-federation": "3.0.3",
"graphql-yoga": "3.0.0-next.12",
"graphql": "^16.5.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/apollo-federation/service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"check": "exit 0"
},
"dependencies": {
"@apollo/subgraph": "^0.5.0",
"@apollo/subgraph": "^2.0.0",
"graphql-yoga": "3.0.0-next.12",
"graphql": "^16.2.0"
}
Expand Down
105 changes: 63 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions scripts/override-graphql-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,42 @@ pkg.resolutions = {
}

fs.writeFileSync(pkgPath, JSON.stringify(pkg, undefined, ' ') + '\n')

// disable apollo federation testing with <16 versions
const graphql15AndLess = parseInt(graphqlVersion.split('.')[0]) <= 15
;[`examples/apollo-federation`].forEach((testPath) => {
if (graphql15AndLess) {
// disable
const testPathAbs = path.resolve(
__dirname,
'..',
testPath,
'__integration-tests__',
)
if (fs.existsSync(testPathAbs)) {
fs.renameSync(
testPathAbs,
path.resolve(
__dirname,
'..',
testPath,
'__DISABLED_integration-tests__',
),
)
}
} else {
// enable if disabled
const testPathAbs = path.resolve(
__dirname,
'..',
testPath,
'__DISABLED_integration-tests__',
)
if (fs.existsSync(testPathAbs)) {
fs.renameSync(
testPathAbs,
path.resolve(__dirname, '..', testPath, '__integration-tests__'),
)
}
}
})