diff --git a/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionCursor.test.js b/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionCursor.test.js index 59b2e275c07..204370ec622 100644 --- a/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionCursor.test.js +++ b/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionCursor.test.js @@ -18,7 +18,7 @@ describe("serialization", () => { describe("value parsing", () => { test("handles null or undefined", () => { - expect(ConnectionCursor.parseValue(undefined)).toBe(undefined); + expect(ConnectionCursor.parseValue(undefined)).toBe(null); expect(ConnectionCursor.parseValue(null)).toBe(null); }); diff --git a/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionLimitInt.js b/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionLimitInt.js index 059cc209ad9..c274b4edae0 100644 --- a/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionLimitInt.js +++ b/imports/plugins/core/core/server/no-meteor/resolvers/ConnectionLimitInt.js @@ -8,8 +8,7 @@ const MAX_LIMIT = 200; * @private */ function parseValue(value) { - // Note that we do not have to do isNaN(value) check here because GraphQLScalarType will not call this for isNaN. - // Instead it automatically changes isNaN to undefined. + if (value === undefined || isNaN(value)) return undefined; if (typeof value !== "number") return MAX_LIMIT; return Math.min(Math.max(1, value), MAX_LIMIT); } diff --git a/imports/plugins/core/payments/server/no-meteor/schemas/schema.graphql b/imports/plugins/core/payments/server/no-meteor/schemas/schema.graphql index 408f8aabfa0..3fed9926a2e 100644 --- a/imports/plugins/core/payments/server/no-meteor/schemas/schema.graphql +++ b/imports/plugins/core/payments/server/no-meteor/schemas/schema.graphql @@ -55,14 +55,14 @@ type ExampleIOUPaymentData { fullName: String! } -# These should be defined in their respective plugin schemas, but `extend union` isn't working yet -union PaymentData = ExampleIOUPaymentData | StripeCardPaymentData | MarketplaceStripeCardPaymentData +# Use `extend union` to define a payment plugin's PaymentData type +"Data identifying a payment for an order" +union PaymentData = ExampleIOUPaymentData -# These should be defined in their respective plugin schemas, but `extend enum` isn't working yet +# Use `extend enum` to add a plugin's payment method name "The name of a payment method, which is how payment methods are keyed" enum PaymentMethodName { iou_example - stripe_card } "An example" diff --git a/imports/plugins/included/payments-example/server/no-meteor/schemas/schema.graphql b/imports/plugins/included/payments-example/server/no-meteor/schemas/schema.graphql index 8bcd4454ff0..bede4a81bbc 100644 --- a/imports/plugins/included/payments-example/server/no-meteor/schemas/schema.graphql +++ b/imports/plugins/included/payments-example/server/no-meteor/schemas/schema.graphql @@ -27,7 +27,3 @@ input PlaceOrderWithExampleIOUPaymentInput { "The information necessary to pay. Collect this information from the shopper during a checkout flow." payment: ExampleIOUPaymentInput! } - -extend enum PaymentMethodName { - iou_example -} diff --git a/package-lock.json b/package-lock.json index c4b0f82041c..3b3f0a0ac15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7185,9 +7185,9 @@ } }, "graphql": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.13.1.tgz", - "integrity": "sha512-awNp3LTrQ7dJDSX3p3PBuxNDC+WFSOrWeV6+l4Xeh2PQJVOFyQ9SZPonXRz2WZc7aIxLZsf2nDZuuuc0qyEq/A==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.0.2.tgz", + "integrity": "sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw==", "requires": { "iterall": "1.2.2" } @@ -7261,15 +7261,34 @@ "integrity": "sha512-qnNmof9pAqj/LUzs3lStP0Gw1qhdVCUS7Ab7+SUB6KD5aX1uqxWQRwMnOGTkhKuLvLNIs1TvNz+iS9kUGl1MhA==" }, "graphql-tools": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-3.1.1.tgz", - "integrity": "sha512-yHvPkweUB0+Q/GWH5wIG60bpt8CTwBklCSzQdEHmRUgAdEQKxw+9B7zB3dG7wB3Ym7M7lfrS4Ej+jtDZfA2UXg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.3.tgz", + "integrity": "sha512-NNZM0WSnVLX1zIMUxu7SjzLZ4prCp15N5L2T2ro02OVyydZ0fuCnZYRnx/yK9xjGWbZA0Q58yEO//Bv/psJWrg==", "requires": { - "apollo-link": "1.2.2", + "apollo-link": "1.2.3", "apollo-utilities": "1.0.16", "deprecated-decorator": "0.1.6", "iterall": "1.2.2", "uuid": "3.3.2" + }, + "dependencies": { + "apollo-link": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.3.tgz", + "integrity": "sha512-iL9yS2OfxYhigme5bpTbmRyC+Htt6tyo2fRMHT3K1XRL/C5IQDDz37OjpPy4ndx7WInSvfSZaaOTKFja9VWqSw==", + "requires": { + "apollo-utilities": "1.0.16", + "zen-observable-ts": "0.8.10" + } + }, + "zen-observable-ts": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz", + "integrity": "sha512-5vqMtRggU/2GhePC9OU4sYEWOdvmayp2k3gjPf4F0mXwB3CSbbNznfDUvDJx9O2ZTa1EIXdJhPchQveFKwNXPQ==", + "requires": { + "zen-observable": "0.8.8" + } + } } }, "graphql.js": { diff --git a/package.json b/package.json index ad69ea18973..f41aa232c65 100644 --- a/package.json +++ b/package.json @@ -68,12 +68,12 @@ "fibers": "^2.0.0", "flatten-obj": "^3.1.1", "font-awesome": "^4.7.0", - "graphql": "0.13.1", + "graphql": "14.0.2", "graphql-fields": "1.1.0", "graphql-iso-date": "3.5.0", "graphql-relay": "0.5.5", "graphql-tag": "2.9.2", - "graphql-tools": "3.1.1", + "graphql-tools": "4.0.3", "graphql.js": "0.4.20", "handlebars": "^4.0.11", "history": "^4.7.2",