Open vjpr opened 6 years ago
I tried this out, and it is was also an issue on apollo-server-express
(ie. not a koa-specific issue)
I believe this is because we are spreading over the source context here
getLatestComic
is implemented as a class method which are not enumerable
Here is a babel example to show that the class methods are not included in the newly created object {...sourceContext}
@jlengstorf I'm not sure if this means we should change the implementation in data-source-xkcd
or somehow change how @gramps/gramps
spreads over context
@ecwyne Good find, and thanks for the detailed explanation!
I'm not sure if this means we should change the implementation in data-source-xkcd or somehow change how @gramps/gramps spreads over context
I would suggest playing it safe, and change how gramps/gramps spreads over context.
@ecwyne @vjpr First: sorry I'm so late to respond here. 😨
The problem of spreading over classes was fixed in the XKCD data source by moving the class under an object property:
Are you using the latest version of the data source?
I'd be happy to accept a PR that addressed the problem of spreading over classes. I'll update this issue and label it appropriately.
Server log:
I tried this:
I can see all the functions in graphiql, but running them causes this error.