Anyone with good typescript knowledge in here will...
# orm-help
v
Anyone with good typescript knowledge in here willing to help with an off-topic question?
h
Try writing the question 😉
v
Yeah… so I am trying something…
Copy code
import { ApolloServer } from "apollo-server-express";

export class MyGraphQL extends ApolloServer
In my extended class’s constructor I eventually have a call to
super()
. I compiled everything to ES5, all good. I am now using this lib in a project of mine, when I instantiate my class, I get this error
Copy code
_this = _super.call(this, options) || this;

TypeError: Class constructor ApolloServer cannot be invoked without 'new'
h
Are you calling
new MyGraphQL()
anywhere?
v
Yes
Ha, I should specify, I am using the lib compiled in ES5 in a Node.js project (so the proj itself is not using TS)
h
I think you’d be better off making a gist/minimal reproduction repo and posting a link to that 🙂
v
ha, it’ll take a while 😄
h
Who knows, perhaps you’ll discover the issue while building the reproduction 🙂
v
the lib is supposed to be OS anyway, but the project using it is private, so I’ll have to mock something similar
indeed
Not a repo yet, but if you want to have a look: https://github.com/apollographql/apollo-server/issues/1623