diff --git a/package-lock.json b/package-lock.json index 7a4aef66fc1..44b4b1fb583 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6330,25 +6330,25 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": false, + "resolved": "", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "optional": true }, "aproba": { "version": "1.2.0", - "resolved": false, + "resolved": "", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "resolved": false, + "resolved": "", "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "optional": true, "requires": { @@ -6358,13 +6358,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": false, + "resolved": "", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { @@ -6374,31 +6374,31 @@ }, "code-point-at": { "version": "1.1.0", - "resolved": false, + "resolved": "", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": false, + "resolved": "", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "optional": true }, "debug": { "version": "2.6.9", - "resolved": false, + "resolved": "", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "optional": true, "requires": { @@ -6407,31 +6407,31 @@ }, "deep-extend": { "version": "0.5.1", - "resolved": false, + "resolved": "", "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "optional": true }, "delegates": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": false, + "resolved": "", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "optional": true }, "fs.realpath": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "optional": true }, "gauge": { "version": "2.7.4", - "resolved": false, + "resolved": "", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "optional": true, "requires": { @@ -6447,7 +6447,7 @@ }, "glob": { "version": "7.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "optional": true, "requires": { @@ -6461,13 +6461,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "optional": true }, "iconv-lite": { "version": "0.4.21", - "resolved": false, + "resolved": "", "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", "optional": true, "requires": { @@ -6476,7 +6476,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": false, + "resolved": "", "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "optional": true, "requires": { @@ -6485,7 +6485,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": false, + "resolved": "", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { @@ -6495,19 +6495,19 @@ }, "inherits": { "version": "2.0.3", - "resolved": false, + "resolved": "", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "optional": true }, "ini": { "version": "1.3.5", - "resolved": false, + "resolved": "", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "optional": true, "requires": { @@ -6516,13 +6516,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": false, + "resolved": "", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { @@ -6531,13 +6531,13 @@ }, "minimist": { "version": "0.0.8", - "resolved": false, + "resolved": "", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "optional": true }, "mkdirp": { "version": "0.5.1", - "resolved": false, + "resolved": "", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "optional": true, "requires": { @@ -6546,13 +6546,13 @@ }, "ms": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "optional": true }, "needle": { "version": "2.2.0", - "resolved": false, + "resolved": "", "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", "optional": true, "requires": { @@ -6563,7 +6563,7 @@ }, "node-pre-gyp": { "version": "0.10.0", - "resolved": false, + "resolved": "", "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "optional": true, "requires": { @@ -6581,7 +6581,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "optional": true, "requires": { @@ -6591,13 +6591,13 @@ }, "npm-bundled": { "version": "1.0.3", - "resolved": false, + "resolved": "", "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", "optional": true }, "npm-packlist": { "version": "1.1.10", - "resolved": false, + "resolved": "", "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "optional": true, "requires": { @@ -6607,7 +6607,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "optional": true, "requires": { @@ -6619,19 +6619,19 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": false, + "resolved": "", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, "once": { "version": "1.4.0", - "resolved": false, + "resolved": "", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "optional": true, "requires": { @@ -6640,19 +6640,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "optional": true }, "osenv": { "version": "0.1.5", - "resolved": false, + "resolved": "", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "optional": true, "requires": { @@ -6662,19 +6662,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "optional": true }, "rc": { "version": "1.2.7", - "resolved": false, + "resolved": "", "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "optional": true, "requires": { @@ -6686,7 +6686,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": false, + "resolved": "", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } @@ -6694,7 +6694,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": false, + "resolved": "", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "optional": true, "requires": { @@ -6709,7 +6709,7 @@ }, "rimraf": { "version": "2.6.2", - "resolved": false, + "resolved": "", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "optional": true, "requires": { @@ -6718,43 +6718,43 @@ }, "safe-buffer": { "version": "5.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "optional": true }, "sax": { "version": "1.2.4", - "resolved": false, + "resolved": "", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "optional": true }, "semver": { "version": "5.5.0", - "resolved": false, + "resolved": "", "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "string-width": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "optional": true, "requires": { @@ -6765,7 +6765,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "optional": true, "requires": { @@ -6774,7 +6774,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "optional": true, "requires": { @@ -6783,7 +6783,7 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "optional": true }, @@ -6812,13 +6812,13 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "optional": true }, "wide-align": { "version": "1.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "optional": true, "requires": { @@ -6827,7 +6827,7 @@ }, "wrappy": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "optional": true }, @@ -7042,18 +7042,11 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "graphql": { - "version": "0.13.2", - "resolved": "http://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz", - "integrity": "sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.3.0.tgz", + "integrity": "sha512-MdfI4v7kSNC3NhB7cF8KNijDsifuWO2XOtzpyququqaclO8wVuChYv+KogexDwgP5sp7nFI9Z6N4QHgoLkfjrg==", "requires": { - "iterall": "^1.2.1" - }, - "dependencies": { - "iterall": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", - "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" - } + "iterall": "^1.2.2" } }, "graphql-extensions": { @@ -11160,7 +11153,7 @@ }, "find-up": { "version": "3.0.0", - "resolved": false, + "resolved": "", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { @@ -11175,7 +11168,7 @@ }, "glob": { "version": "7.1.3", - "resolved": false, + "resolved": "", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { @@ -11199,7 +11192,7 @@ }, "locate-path": { "version": "3.0.0", - "resolved": false, + "resolved": "", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { @@ -11228,7 +11221,7 @@ }, "p-locate": { "version": "3.0.0", - "resolved": false, + "resolved": "", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { diff --git a/package.json b/package.json index aec2eb40186..f2c8eb1ac11 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "flat": "4.1.0", "forest-express-sequelize": "3.1.1", "fs-extra": "8.0.1", - "graphql": "0.13.2", + "graphql": "14.3.0", "graphql-iso-date": "3.6.1", "graphql-type-json": "0.3.0", "handlebars": "4.1.2", diff --git a/server/graphql/v1/CollectiveInterface.js b/server/graphql/v1/CollectiveInterface.js index 75b48b44cab..3959d21cfaf 100644 --- a/server/graphql/v1/CollectiveInterface.js +++ b/server/graphql/v1/CollectiveInterface.js @@ -27,6 +27,7 @@ import { PaginatedPaymentMethodsType, ImageFormatType, NotificationType, + DateString, } from './types'; import { OrderDirectionType, TransactionInterfaceType } from './TransactionInterface'; @@ -509,9 +510,9 @@ export const CollectiveInterfaceType = new GraphQLInterfaceType({ type: LocationType, description: 'Name, address, country, lat, long of the location.', }, - createdAt: { type: GraphQLString }, - startsAt: { type: GraphQLString }, - endsAt: { type: GraphQLString }, + createdAt: { type: DateString }, + startsAt: { type: DateString }, + endsAt: { type: DateString }, timezone: { type: GraphQLString }, maxAmount: { type: GraphQLInt }, hostFeePercent: { type: GraphQLInt }, @@ -794,19 +795,19 @@ const CollectiveFields = () => { }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(collective) { return collective.createdAt; }, }, startsAt: { - type: GraphQLString, + type: DateString, resolve(collective) { return collective.startsAt; }, }, endsAt: { - type: GraphQLString, + type: DateString, resolve(collective) { return collective.endsAt; }, diff --git a/server/graphql/v1/TransactionInterface.js b/server/graphql/v1/TransactionInterface.js index 13ac0e7c637..c197efd5f9a 100644 --- a/server/graphql/v1/TransactionInterface.js +++ b/server/graphql/v1/TransactionInterface.js @@ -13,7 +13,7 @@ import { import { CollectiveInterfaceType, UserCollectiveType } from './CollectiveInterface'; -import { SubscriptionType, OrderType, PaymentMethodType, UserType } from './types'; +import { SubscriptionType, OrderType, PaymentMethodType, UserType, DateString } from './types'; export const TransactionInterfaceType = new GraphQLInterfaceType({ name: 'Transaction', @@ -50,8 +50,8 @@ export const TransactionInterfaceType = new GraphQLInterfaceType({ type: { type: GraphQLString }, description: { type: GraphQLString }, privateMessage: { type: GraphQLString }, - createdAt: { type: GraphQLString }, - updatedAt: { type: GraphQLString }, + createdAt: { type: DateString }, + updatedAt: { type: DateString }, refundTransaction: { type: TransactionInterfaceType }, }; }, @@ -231,13 +231,13 @@ const TransactionFields = () => { }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(transaction) { return transaction.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(transaction) { return transaction.updatedAt; }, diff --git a/server/graphql/v1/inputTypes.js b/server/graphql/v1/inputTypes.js index dd3f1240aa5..bd7f8218167 100644 --- a/server/graphql/v1/inputTypes.js +++ b/server/graphql/v1/inputTypes.js @@ -12,7 +12,7 @@ import { import GraphQLJSON from 'graphql-type-json'; import { Kind } from 'graphql/language'; -import { IsoDateString } from './types'; +import { IsoDateString, DateString } from './types'; const EmailType = new GraphQLScalarType({ name: 'Email', @@ -399,8 +399,8 @@ export const ExpenseInputType = new GraphQLInputObjectType({ id: { type: GraphQLInt }, amount: { type: GraphQLInt }, currency: { type: GraphQLString }, - createdAt: { type: GraphQLString }, - incurredAt: { type: GraphQLString }, + createdAt: { type: DateString }, + incurredAt: { type: DateString }, description: { type: GraphQLString }, category: { type: GraphQLString }, status: { type: GraphQLString }, diff --git a/server/graphql/v1/types.js b/server/graphql/v1/types.js index bc974d3d59c..8e8f2419948 100644 --- a/server/graphql/v1/types.js +++ b/server/graphql/v1/types.js @@ -58,6 +58,13 @@ export const paginatedList = (type, typeName, valuesKey) => { }); }; +export const DateString = new GraphQLScalarType({ + name: 'DateString', + serialize: value => { + return value.toString(); + }, +}); + export const UserType = new GraphQLObjectType({ name: 'UserDetails', description: 'This represents the details of a User', @@ -231,7 +238,7 @@ export const MemberType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(member) { return member.createdAt; }, @@ -496,19 +503,19 @@ export const ExpenseType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(expense) { return expense.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(expense) { return expense.updatedAt; }, }, incurredAt: { - type: GraphQLString, + type: DateString, resolve(expense) { return expense.incurredAt; }, @@ -679,19 +686,19 @@ export const UpdateType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(update) { return update.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(update) { return update.updatedAt; }, }, publishedAt: { - type: GraphQLString, + type: DateString, resolve(update) { return update.publishedAt; }, @@ -838,13 +845,13 @@ export const CommentType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(comment) { return comment.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(comment) { return comment.updatedAt; }, @@ -946,13 +953,13 @@ export const NotificationType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(comment) { return comment.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(comment) { return comment.updatedAt; }, @@ -1135,13 +1142,13 @@ export const TierType = new GraphQLObjectType({ }, }, startsAt: { - type: GraphQLString, + type: DateString, resolve(tier) { return tier.startsAt; }, }, endsAt: { - type: GraphQLString, + type: DateString, resolve(tier) { return tier.startsAt; }, @@ -1382,13 +1389,13 @@ export const OrderType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(order) { return order.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(order) { return order.updatedAt; }, @@ -1466,13 +1473,13 @@ export const ConnectedAccountType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(ca) { return ca.createdAt; }, }, updatedAt: { - type: GraphQLString, + type: DateString, resolve(ca) { return ca.updatedAt; }, @@ -1505,7 +1512,7 @@ export const PaymentMethodType = new GraphQLObjectType({ }, }, createdAt: { - type: GraphQLString, + type: DateString, resolve(paymentMethod) { return paymentMethod.createdAt; }, @@ -1518,7 +1525,7 @@ export const PaymentMethodType = new GraphQLObjectType({ }, }, expiryDate: { - type: GraphQLString, + type: DateString, resolve(paymentMethod) { return paymentMethod.expiryDate; }, diff --git a/test/features/support/steps/expenses.js b/test/features/support/steps/expenses.js index 29fd3995a44..ce92045e4a9 100644 --- a/test/features/support/steps/expenses.js +++ b/test/features/support/steps/expenses.js @@ -14,7 +14,7 @@ When('{string} expenses {string} for {string} to {string} via {string}', async f const user = this.getValue(`${userName}-user`); const collective = this.getValue(collectiveName); const expense = { - amount, + amount: Number(amount), currency, description, payoutMethod: payoutMethod.toLowerCase(),