Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API requests fail with: Invalid options provided to ApolloServer #34

Closed
nikolasburk opened this issue Dec 19, 2017 · 6 comments
Closed

Comments

@nikolasburk
Copy link
Contributor

nikolasburk commented Dec 19, 2017

The last release seems to be broken. I was creating and starting my yoga server as follows:

const server = new GraphQLServer({
  typeDefs,
  resolvers,
  context: req => ({
    ...req,
    db: new Graphcool({
      schemaPath: './database/schema.graphql',
      endpoint: 'http://localhost:60000/api/database/dev',
      secret: 'mysecret123',
    }),
  }),
})
server.start(() => console.log('Server is running on http://localhost:4000'))

However, I was not able to access the API on http://localhost:4000, the Playground could not load the schema but failed with an internal server error and the message: Invalid options provided to ApolloServer:.

Rolling back to version 0.3.0 fixed the problem.

@schickling
Copy link
Contributor

Thanks for reporting this @nikolasburk. @kbrandwijk could you have a look into this as this seems to be related to your recent PR.

@kbrandwijk
Copy link
Contributor

graphql-import 0.1.7 is released. This should have fixed the underlying issue.

@schickling
Copy link
Contributor

The issue still seems to persist. You should be able to reproduce the problem here: https://github.com/graphql-boilerplates/node-graphql-server/tree/master/basic

@kbrandwijk
Copy link
Contributor

Fixed after all dependencies across all packages were updated to the same graphql version (0.12).

@marktani
Copy link
Contributor

awesome!

@Urigo
Copy link
Collaborator

Urigo commented Mar 29, 2022

Hey, @Urigo from The Guild here!

You might know us from projects such as graphql-code-generator, envelop or graphql-tools.

For a long time we thought that the Javascript ecosystem is still missing a lightweight cross-platform, but still highly customizable GraphQL Server.

In the past the awesome Prisma team took on that great challenge and now we are happy to announce that we are continuing them and just released GraphQL Yoga 2.0 - Build fast, extensible, and batteries-included (Subscriptions, Serverless, File uploads support) GraphQL APIs in Node.js 🚀

We have been working a long time on version 2.0 and have been using it in our clients projects for a few months now and shared a couple of alpha cycles here.
Thank you all for your feedback and suggestions, you made this release possible!

Please try Yoga out again, give us feedback and help us spread the word on the new release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants