Skip to content

Commit d7baa20

Browse files
committed
chore(package): update graphql-compose
1 parent 1c2c502 commit d7baa20

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"express-graphql": "^0.6.6",
5050
"flow-bin": "^0.47.0",
5151
"graphql": "^0.10.1",
52-
"graphql-compose": "^1.20.4",
52+
"graphql-compose": "^1.21.1",
5353
"jest": "^20.0.4",
5454
"npm-run-all": "^4.0.1",
5555
"prettier": "^1.4.4",

src/resolvers/search.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ export default function createSearchResolver(
8888
});
8989

9090
const type = getSearchOutputTC({ prefix, fieldMap, sourceTC });
91-
const hitsType = type.get('hits.hits');
91+
let hitsType;
92+
try {
93+
hitsType = type.get('hits.hits');
94+
} catch (e) {
95+
hitsType = 'JSON';
96+
}
9297
type
9398
.addFields({
9499
count: 'Int',

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,9 +2023,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6:
20232023
version "1.0.1"
20242024
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
20252025

2026-
graphql-compose@^1.20.4:
2027-
version "1.20.4"
2028-
resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-1.20.4.tgz#de70282439b29e2014fae0ee6effca6fbd348b9e"
2026+
graphql-compose@^1.21.1:
2027+
version "1.21.1"
2028+
resolved "https://registry.yarnpkg.com/graphql-compose/-/graphql-compose-1.21.1.tgz#65a8152335285d51d1d220ba3355b7e4eb52a515"
20292029
dependencies:
20302030
babel-runtime "^6.23.0"
20312031
object-path "^0.11.4"

0 commit comments

Comments
 (0)