Skip to content

Add support for apollo-server-micro #270

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

Closed
kevinwolfcr opened this issue Jan 13, 2020 · 2 comments
Closed

Add support for apollo-server-micro #270

kevinwolfcr opened this issue Jan 13, 2020 · 2 comments
Labels
scope/server Related to the server component

Comments

@kevinwolfcr
Copy link
Contributor

I initially posted this in graphql-hive/graphql-yoga#614 but since yoga seems to be superseded by santa, I will post it here.

Although server support and lambda support is currently great, I'd been having troubles trying to expose a graphql-yoga endpoint in next.js.

Since I am using Next9, I want to leverage the API Routes feature, which although is a serverless function, has a slightly different signature than lambda functions.

The good news is that those API routes support any micro compatible middleware out-of-the-box. And even better, there is already an apollo-server-micro implementation, which is really similar to using the apollo-server-lambda exposed in GraphQLServerLambda.

Are there any plans on making the micro integration soon? If not, I can help with a PR.

@jasonkuhrt
Copy link
Member

Hey @iamkevinwolf to get up to speed on this stuff, could you point to a minimal example app and/or the relevant docs to read up on? Also wonder how much impact #231 would have on this issue (were we to go that way).

@jasonkuhrt jasonkuhrt added the scope/server Related to the server component label Jan 14, 2020
@fveauvy
Copy link

fveauvy commented Jan 21, 2020

Hi @jasonkuhrt, here is an example of an interaction between next and prisma :
https://qiita.com/just_cheese/items/6c1c113dc47886fb3af5

Here is a example repo using api routes in nextjs :
https://github.com./zeit/next.js/tree/master/examples/with-typescript-graphql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/server Related to the server component
Projects
None yet
Development

No branches or pull requests

3 participants