Link for the Code Repo
https://github.com/anilgurindapalli/apolloServer_RestDataSource
Response not successful: Received status code 500 only after adding dataSources to ApolloServer.
const server = new ApolloServer({
schema,
dataSources: () => ({
randomUserAPI: new RandomUserDataSource()
})
});
everything is working fine if i comment dataSouces.
Worked after updating Babel from 6.x to 7.x.
If anyone has the same issues you can check the repository for the working example of RestDataSource using ApolloServer
https://github.com/anilgurindapalli/apolloServer_RestDataSource.git
I had the same issue introspection: true solved the issue
const server = new ApolloServer({
..........,
introspection: true
})