diff --git a/package.json b/package.json index 8cbfadf..331c776 100644 --- a/package.json +++ b/package.json @@ -23,12 +23,12 @@ }, "homepage": "https://github.com/graphql-compose/graphql-compose-connection", "peerDependencies": { - "graphql-compose": ">=3.0.0" + "graphql-compose": ">=3.0.0 || >=4.0.0" }, "devDependencies": { "babel-cli": "^6.26.0", "babel-core": "^6.26.0", - "babel-eslint": "^8.2.2", + "babel-eslint": "^8.2.3", "babel-jest": "^22.4.3", "babel-plugin-transform-flow-strip-types": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", @@ -38,16 +38,16 @@ "eslint": "^4.19.1", "eslint-config-airbnb-base": "^12.1.0", "eslint-config-prettier": "^2.9.0", - "eslint-plugin-flowtype": "^2.46.1", - "eslint-plugin-import": "^2.10.0", + "eslint-plugin-flowtype": "^2.46.2", + "eslint-plugin-import": "^2.11.0", "eslint-plugin-prettier": "^2.6.0", - "flow-bin": "^0.69.0", + "flow-bin": "^0.70.0", "graphql": "0.13.2", - "graphql-compose": "^3.1.1", + "graphql-compose": "^4.0.0", "jest": "^22.4.3", - "prettier": "^1.11.1", + "prettier": "^1.12.0", "rimraf": "^2.6.2", - "semantic-release": "^15.1.4" + "semantic-release": "^15.1.7" }, "dependencies": { "babel-runtime": "^6.26.0" diff --git a/src/__tests__/connectionResolver-test.js b/src/__tests__/connectionResolver-test.js index 361a06e..acbf357 100644 --- a/src/__tests__/connectionResolver-test.js +++ b/src/__tests__/connectionResolver-test.js @@ -81,23 +81,23 @@ describe('connectionResolver', () => { describe('resolver args', () => { it('should have `first` arg', () => { - expect(connectionResolver.getArg('first').type).toBe(GraphQLInt); + expect(connectionResolver.getArgType('first')).toBe(GraphQLInt); }); it('should have `last` arg', () => { - expect(connectionResolver.getArg('last').type).toBe(GraphQLInt); + expect(connectionResolver.getArgType('last')).toBe(GraphQLInt); }); it('should have `after` arg', () => { - expect(connectionResolver.getArg('after').type).toBe(GraphQLString); + expect(connectionResolver.getArgType('after')).toBe(GraphQLString); }); it('should have `before` arg', () => { - expect(connectionResolver.getArg('before').type).toBe(GraphQLString); + expect(connectionResolver.getArgType('before')).toBe(GraphQLString); }); it('should have `sort` arg', () => { - expect(connectionResolver.getArg('sort').type.name).toBe('SortConnectionUserEnum'); + expect((connectionResolver.getArgType('sort'): any).name).toBe('SortConnectionUserEnum'); }); }); diff --git a/yarn.lock b/yarn.lock index d2d855f..e384998 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-beta.44", "@babel/code-frame@^7.0.0-beta.40": +"@babel/code-frame@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" dependencies: @@ -63,7 +63,7 @@ babylon "7.0.0-beta.44" lodash "^4.2.0" -"@babel/traverse@^7.0.0-beta.40": +"@babel/traverse@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" dependencies: @@ -78,7 +78,7 @@ invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@7.0.0-beta.44", "@babel/types@^7.0.0-beta.40": +"@babel/types@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757" dependencies: @@ -497,14 +497,14 @@ babel-core@^6.0.0, babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" -babel-eslint@^8.2.2: - version "8.2.2" - resolved "http://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz#1102273354c6f0b29b4ea28a65f97d122296b68b" +babel-eslint@^8.2.3: + version "8.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.3.tgz#1a2e6681cc9bc4473c32899e59915e19cd6733cf" dependencies: - "@babel/code-frame" "^7.0.0-beta.40" - "@babel/traverse" "^7.0.0-beta.40" - "@babel/types" "^7.0.0-beta.40" - babylon "^7.0.0-beta.40" + "@babel/code-frame" "7.0.0-beta.44" + "@babel/traverse" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" eslint-scope "~3.7.1" eslint-visitor-keys "^1.0.0" @@ -992,7 +992,7 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26 lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@7.0.0-beta.44, babylon@^7.0.0-beta.40: +babylon@7.0.0-beta.44: version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d" @@ -1117,7 +1117,7 @@ btoa-lite@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1725,17 +1725,16 @@ eslint-module-utils@^2.2.0: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-flowtype@^2.46.1: - version "2.46.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.1.tgz#c4f81d580cd89c82bc3a85a1ccf4ae3a915143a4" +eslint-plugin-flowtype@^2.46.2: + version "2.46.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.2.tgz#8749fddda6f6c30d0672011151bea726765b5753" dependencies: lodash "^4.15.0" -eslint-plugin-import@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.10.0.tgz#fa09083d5a75288df9c6c7d09fe12255985655e7" +eslint-plugin-import@^2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.11.0.tgz#15aeea37a67499d848e8e981806d4627b5503816" dependencies: - builtin-modules "^1.1.1" contains-path "^0.1.0" debug "^2.6.8" doctrine "1.5.0" @@ -1745,6 +1744,7 @@ eslint-plugin-import@^2.10.0: lodash "^4.17.4" minimatch "^3.0.3" read-pkg-up "^2.0.0" + resolve "^1.6.0" eslint-plugin-prettier@^2.6.0: version "2.6.0" @@ -2077,9 +2077,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.69.0: - version "0.69.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.69.0.tgz#053159a684a6051fcbf0b71a2eb19a9679082da6" +flow-bin@^0.70.0: + version "0.70.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.70.0.tgz#080ae83a997f2b4ddb3dc2649bf13336825292b5" for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" @@ -2250,11 +2250,12 @@ git-url-parse@^8.0.0: dependencies: git-up "^2.0.0" -git-url-parse@^8.1.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-8.2.0.tgz#74969b0105f805df58873ee5b96bc1a4dc0573b1" +git-url-parse@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-9.0.0.tgz#a82a36acc3544c77ed0984d6488b37fbcfbec24d" dependencies: git-up "^2.0.0" + parse-domain "^2.0.0" glob-base@^0.3.0: version "0.3.0" @@ -2326,9 +2327,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -graphql-compose@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-3.1.1.tgz#97fcf4f4a0aa5d58906eb9ec4166cbf426437c73" +graphql-compose@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-4.0.0.tgz#6b260dc4e220c33feae46e50e34edd9072ef0244" dependencies: babel-runtime "^6.26.0" object-path "^0.11.4" @@ -3923,6 +3924,10 @@ p-retry@^1.0.0: dependencies: retry "^0.10.0" +parse-domain@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-domain/-/parse-domain-2.0.0.tgz#e9f42f697c30f7c2051dc5c55ff4d8a80da7943c" + parse-github-url@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" @@ -4076,9 +4081,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" +prettier@^1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.0.tgz#d26fc5894b9230de97629b39cae225b503724ce8" pretty-format@^22.4.3: version "22.4.3" @@ -4460,6 +4465,12 @@ resolve@^1.2.0: dependencies: path-parse "^1.0.5" +resolve@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + dependencies: + path-parse "^1.0.5" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -4535,9 +4546,9 @@ sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" -semantic-release@^15.1.4: - version "15.1.4" - resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.1.4.tgz#000ddbd8a8977dc1a68cacfbeef2fb551e4b9791" +semantic-release@^15.1.7: + version "15.1.7" + resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.1.7.tgz#b29eef1b9443f75addab7c2e353338b72b9b628d" dependencies: "@semantic-release/commit-analyzer" "^5.0.0" "@semantic-release/error" "^2.2.0" @@ -4552,7 +4563,7 @@ semantic-release@^15.1.4: execa "^0.10.0" get-stream "^3.0.0" git-log-parser "^1.2.0" - git-url-parse "^8.1.0" + git-url-parse "^9.0.0" hook-std "^0.4.0" hosted-git-info "^2.6.0" lodash "^4.17.4"