Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Jan 15, 2022
1 parent a715bb7 commit 4110a8b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -24,7 +24,7 @@ jobs:
env:
CI: true
- name: Send codecov.io stats
if: matrix.node-version == '12.x'
if: matrix.node-version == '14.x'
run: bash <(curl -s https://codecov.io/bash) || echo ''

publish:
Expand All @@ -33,10 +33,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x
- name: Install node_modules
run: yarn install
- name: Build
Expand Down
14 changes: 12 additions & 2 deletions src/resolvers/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ export default function createSearchResolver<TSource, TContext>(
argsConfigMap.collapse = searchITC.getField('collapse');
argsConfigMap.highlight = searchITC.getField('highlight');

const topLevelArgs = ['q', 'query', 'collapse', 'sort', 'limit', 'skip', 'aggs', 'highlight', 'opts'];
const topLevelArgs = [
'q',
'query',
'collapse',
'sort',
'limit',
'skip',
'aggs',
'highlight',
'opts',
];
argsConfigMap.opts = schemaComposer
.createInputTC({
name: `${sourceTC.getTypeName()}Opts`,
Expand Down Expand Up @@ -146,7 +156,7 @@ export default function createSearchResolver<TSource, TContext>(
args.body.query = args.query;
delete args.query;
}

if (args.collapse) {
args.body.collapse = args.collapse;
delete args.collapse;
Expand Down
2 changes: 1 addition & 1 deletion src/types/SearchHitItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function getSearchHitItemTC<TContext>(
type: 'JSON',
description: 'Returns data only if `args.collapse` is provided',
},

highlight: {
type: 'JSON',
description: 'Returns data only if `args.highlight` is provided',
Expand Down

0 comments on commit 4110a8b

Please sign in to comment.