question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Polka with Sapper and Apollo-server-express

See original GitHub issue

I am trying to use graphql apollo-server-express with Sapper-template but I am getting 404 page it seems sapper is not allowing to add a route. Here is my code.

  graphQLServer.applyMiddleware({app, path:'/graphql'}); // app is from polka

Rich said on disord that it could be related to the way Polka runs middleware in a different order. Try using Express

@lukeed do you have any idea how to solve this issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lukeedcommented, Sep 1, 2018

Thanks! That helps

Looks like you can add this in:

sapper({ ignore: '/graphql', manifest })

You can see this PR for more info :: https://github.com/sveltejs/sapper/pull/326

0reactions
lukeedcommented, Sep 1, 2018

Awesome! 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrating with Node.js middleware
Use Apollo Server with Express, Koa, and more. Apollo Server integrates easily with several popular Node.js middleware libraries. To integrate, first install ...
Read more >
Sapper - Using Express (instead of Polka) - YouTube
Sapper tutorial. Sapper - Using Express (instead of Polka ). 2.2K views 3 years ago. Svelte Mastery. Svelte Mastery. 9.14K subscribers.
Read more >
Svelte, Sapper, GraphQL, and Subscriptions
It has support for Server Side Rendering (for that SEO magic) via a package called Sapper. I've been wanting to explore GraphQL, and...
Read more >
Codecov
dependabot/npm_and_yarn/examples/with-sapper/node-fetch-2.6.1 ... dependabot/npm_and_yarn/examples/with-apollo/apollo-server-express-2.14.2.
Read more >
node.js - A Sapper-compatible setup to serve multiple apps ...
I need to set up a Polka (or Express) server so that it can serve multiple applications (one per hostname) from a single...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found