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

feat: update MP GraphQL to v15 and peer dependencies [DRAFT / IN-PROGRESS] #5455

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
de95fbd
chore: upgrade graphql and express-graphql
MounirDhahri Nov 1, 2023
4778c51
chore: upgrade to graphql 15
MounirDhahri Nov 1, 2023
5185774
fix: introspection query imports
MounirDhahri Nov 16, 2023
160fd0d
refactor: reapply patches
MounirDhahri Nov 16, 2023
e4f63c3
chore: update enums to match new format
MounirDhahri Nov 16, 2023
729275d
fix: add missing aggregate-error
MounirDhahri Nov 16, 2023
5418021
chore: update apollo related packages
MounirDhahri Nov 16, 2023
1b06065
chore: update graphl relay to 0.6.0
MounirDhahri Nov 16, 2023
f0dce82
chore: update graphql-relay
MounirDhahri Nov 16, 2023
3831a94
Revert "chore: update enums to match new format"
MounirDhahri Nov 16, 2023
1ba69fc
fix: broken enums
MounirDhahri Nov 16, 2023
4f21808
chore: upgrade graphql-tools to 4.0.8
MounirDhahri Nov 17, 2023
f5080c9
Revert "fix: broken enums"
MounirDhahri Nov 17, 2023
e53c070
chore: will keep fixing enums until they give up
MounirDhahri Nov 17, 2023
00ee409
chore: disable exchange schema stitching
MounirDhahri Nov 17, 2023
baf748f
feat: get exchange stitching to work again 🎉
MounirDhahri Nov 17, 2023
4f3e691
fix: typescript issues 👌
MounirDhahri Nov 17, 2023
cf905e8
fix: graphql-tools weird error
MounirDhahri Nov 17, 2023
3f22535
fix: ts issue
MounirDhahri Dec 1, 2023
c9d0e82
chore: remove unnecessary patch
MounirDhahri Dec 1, 2023
8fd44f5
chore: remove graphql types patch
MounirDhahri Dec 1, 2023
0841bf4
fix: properly transform CommerceDate
MounirDhahri Dec 1, 2023
27602ec
fix: wrongly updated sale artwork edge type
MounirDhahri Dec 1, 2023
4d7cc0a
fix: broken tests
MounirDhahri Dec 1, 2023
0f246cb
fix: broken ts
MounirDhahri Dec 1, 2023
b78dc99
fix: rebase conflict
MounirDhahri Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2,958 changes: 1,358 additions & 1,600 deletions _schemaV2.graphql

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"author": "Art.sy Inc",
"license": "MIT",
"dependencies": {
"@ardatan/aggregate-error": "^0.0.6",
"@artsy/img": "1.0.3",
"@artsy/morgan": "^1.0.2",
"@artsy/multienv": "^1.2.0",
Expand All @@ -44,9 +45,9 @@
"@graphql-tools/delegate": "6.0.10",
"@sentry/node": "5.18.1",
"accounting": "0.4.1",
"apollo-link": "1.2.1",
"apollo-link-context": "1.0.8",
"apollo-link-http": "1.5.4",
"apollo-link": "^1.2.14",
"apollo-link-context": "^1.0.20",
"apollo-link-http": "^1.5.17",
"basic-auth": "1.1.0",
"body-parser": "1.18.2",
"chalk": "^4.1.2",
Expand All @@ -58,17 +59,17 @@
"debug": "2.6.9",
"dotenv": "10.0.0",
"express": "4.17.3",
"express-graphql": "0.9.0",
"express-graphql": "^0.12.0",
"express-ipfilter": "0.3.1",
"express-rate-limit": "3.2.0",
"form-data": "^4.0.0",
"google-libphonenumber": "^3.2.25",
"graphql": "14.5.4",
"graphql": "15.8.0",
"graphql-depth-limit": "1.1.0",
"graphql-middleware": "1.2.6",
"graphql-middleware": "6.1.32",
"graphql-parse-resolve-info": "^4.12.3",
"graphql-relay": "0.5.4",
"graphql-tools": "4.0.5",
"graphql-relay": "0.7.0",
"graphql-tools": "5.0.0",
"graphql-type-json": "0.1.4",
"graphql-upload": "^13.0.0",
"hot-shots": "5.6.1",
Expand Down Expand Up @@ -112,7 +113,6 @@
"@graphql-inspector/core": "1.27.0",
"@types/express-rate-limit": "2.9.3",
"@types/google-libphonenumber": "^7.4.22",
"@types/graphql-relay": "0.4.9",
"@types/graphql-upload": "^8.0.11",
"@types/invariant": "2.2.29",
"@types/jest": "23.3.2",
Expand Down
52 changes: 0 additions & 52 deletions patches/@types/graphql+0.13.4.patch

This file was deleted.

76 changes: 0 additions & 76 deletions patches/@types/graphql-relay+0.4.9.patch

This file was deleted.

46 changes: 23 additions & 23 deletions patches/graphql+14.5.4.patch → patches/graphql+15.8.0.patch
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
patch-package
diff --git a/node_modules/graphql/type/definition.d.ts b/node_modules/graphql/type/definition.d.ts
index b304d22..f2d2ebe 100644
--- a/node_modules/graphql/type/definition.d.ts
+++ b/node_modules/graphql/type/definition.d.ts
@@ -615,15 +615,16 @@ export interface GraphQLInterfaceTypeConfig<
* });
*
*/
-export class GraphQLUnionType {
+// TODO: Remove `any` defaults before submitting upstream.
+export class GraphQLUnionType<TSource = any, TContext = any> {
@@ -708,12 +708,12 @@ export interface GraphQLUnionTypeExtensions {
export class GraphQLUnionType {
name: string;
description: Maybe<string>;
- resolveType: Maybe<GraphQLTypeResolver<any, any>>;
+ resolveType: Maybe<GraphQLTypeResolver<TSource, TContext>>;
extensions: Maybe<Readonly<Record<string, any>>>;
extensions: Maybe<Readonly<GraphQLUnionTypeExtensions>>;
astNode: Maybe<UnionTypeDefinitionNode>;
extensionASTNodes: Maybe<ReadonlyArray<UnionTypeExtensionNode>>;

- constructor(config: GraphQLUnionTypeConfig<any, any>);
+ constructor(config: GraphQLUnionTypeConfig<TSource, TContext>);

getTypes(): GraphQLObjectType[];
- constructor(config: Readonly<GraphQLUnionTypeConfig<any, any>>);
+ constructor(config: Readonly<GraphQLUnionTypeConfig<TSource, TContext>>);
getTypes(): Array<GraphQLObjectType>;

toConfig(): GraphQLUnionTypeConfig<any, any> & {
diff --git a/node_modules/graphql/utilities/assertValidName.js b/node_modules/graphql/utilities/assertValidName.js
index 5affb00..7c79a3b 100644
--- a/node_modules/graphql/utilities/assertValidName.js
+++ b/node_modules/graphql/utilities/assertValidName.js
@@ -34,9 +34,9 @@ function assertValidName(name) {
function isValidNameError(name, node) {
typeof name === 'string' || (0, _devAssert.default)(0, 'Expected string');
function isValidNameError(name) {
typeof name === 'string' || (0, _devAssert.default)(0, 'Expected name to be a string.');

- if (name.length > 1 && name[0] === '_' && name[1] === '_') {
- return new _GraphQLError.GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."), node);
- return new _GraphQLError.GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."));
- }
+ // if (name.length > 1 && name[0] === '_' && name[1] === '_') {
+ // return new _GraphQLError.GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."), node);
+ // return new _GraphQLError.GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."));
+ // }

if (!NAME_RX.test(name)) {
return new _GraphQLError.GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."), node);
return new _GraphQLError.GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."));
diff --git a/node_modules/graphql/utilities/assertValidName.mjs b/node_modules/graphql/utilities/assertValidName.mjs
index d504d22..7fd641b 100644
--- a/node_modules/graphql/utilities/assertValidName.mjs
+++ b/node_modules/graphql/utilities/assertValidName.mjs
@@ -21,9 +21,9 @@ export function assertValidName(name) {
export function isValidNameError(name, node) {
typeof name === 'string' || devAssert(0, 'Expected string');
export function isValidNameError(name) {
typeof name === 'string' || devAssert(0, 'Expected name to be a string.');

- if (name.length > 1 && name[0] === '_' && name[1] === '_') {
- return new GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."), node);
- return new GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."));
- }
+ // if (name.length > 1 && name[0] === '_' && name[1] === '_') {
+ // return new GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."), node);
+ // return new GraphQLError("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."));
+ // }

if (!NAME_RX.test(name)) {
return new GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."), node);
return new GraphQLError("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."));
90 changes: 0 additions & 90 deletions patches/graphql-relay+0.5.4.patch

This file was deleted.