Here is a snippet of code that I am working with:
import { GraphQLNonNull, GraphQLString, GraphQLList, GraphQLInt } from 'graphql';
import systemType from './type';
import { resolver } from 'graphql-sequelize';
let a = ({System}) => ({
system: {
type: systemType,
args: {
id: {
description: 'ID of system',
type: new GraphQLNonNull(GraphQLInt)
}
},
resolve: resolver(System, {
after: (result: any[]) => (result && result.length ? result[0] : result)
})
},
systems: {
type: new GraphQLList(systemType),
args: {
names: {
description: 'List option names to retrieve',
type: new GraphQLList(GraphQLString)
},
limit: {
type: GraphQLInt
},
order: {
type: GraphQLString
}
},
resolve: resolver(System, {
before: (findOptions: any, { query }: any) => ({
order: [['name', 'DESC']],
...findOptions
})
})
}
});
export = { a: a };
I'm encountering the TS7031 warning in VSCode:
Binding element 'System' implicitly has an 'any' type
Is there a way to address this warning?