I've created class with some ratings changing. Methods in this class should be static, but I have problem with calling it.
class Rating {
static changeRating ( leftRating,rightRating){
return(leftRating+rightRating);
}
}
and in another file I have
import { User, Team } from '../../models'
import mongoose from 'mongoose'
import { UserInputError, ApolloError } from 'apollo-server-core';
import Joi from 'joi'
import * as Validator from '../../validation'
import * as Config from '../../config'
import * as Rating from '../../rating'
export default {
Mutation:{
changeRating: async (root, args, { req }, info) => {
console.log(Rating.changeRating(1255,1244))
}
}
}
Then I get
"Rating.changeRating is not a function."
I want to have number, this sum is to change in future of course.