Issues (37)

graphql/queries/brewery/single.js (3 issues)

1
import {
2
  GraphQLList,
0 ignored issues
show
The variable GraphQLList seems to be never used. Consider removing it.
Loading history...
3
  GraphQLID,
4
  GraphQLNonNull
5
} from 'graphql';
6
import {Types} from 'mongoose';
7
8
import breweryType from '../../types/brewery';
9
import BreweryModel from '../../../models/brewery.model';
10
11
export default {
12
  type: breweryType,
13
  args: {
14
    id: {
15
      name: 'id',
16
      type: new GraphQLNonNull(GraphQLID)
17
    }
18
  },
19
  resolve (root, params, ctx, options) {
0 ignored issues
show
The parameter ctx is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
The parameter options is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
20
21
    return BreweryModel
22
      .findById(params.id)
23
      .exec();
24
  }
25
};
26