Apollo-server: Response not successful: Received status code 500 only after adding dataSources to ApolloServer

Created on 8 Jan 2019  路  2Comments  路  Source: apollographql/apollo-server

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.

All 2 comments

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 })

Was this page helpful?
0 / 5 - 0 ratings

Related issues

espoal picture espoal  路  3Comments

deathg0d picture deathg0d  路  3Comments

attdona picture attdona  路  3Comments

dbrrt picture dbrrt  路  3Comments

nevyn-lookback picture nevyn-lookback  路  3Comments