-
Notifications
You must be signed in to change notification settings - Fork 286
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
GraphQL support #53
Comments
I just realized that apollo-server uses express too... |
We are using next together with Apollo. It’s working fine but then we don’t deploy on Zeit.co. Zeit.co is done with lambda functions and graphql can only work performaned if you cache a lot. So you need a different infrastructure |
@wortkotze Did you try using Redis or Memcached https://www.apollographql.com/docs/apollo-server/data/data-sources/#using-memcachedredis-as-a-cache-storage-backend |
@ljc-dev I am using GraphQL with Next.js right now actually. If this gets a lot of interests, I would love to create one as another project. |
Yes I’m using redis but not with Zeit deployments. |
Thanks for your feedback! I think I get it now. I also got advised by Ben Awad (YT nextjs tutorials) to separate API from frontend. Basically, use Next js frontend and express graphql backend. I think I'll stick with that for now, I haven't learnt Redis yet. |
I'm reopening it, as I just realized by closing this issue others can't ask for the graphQL feature. |
+1 |
@ljc-dev have you tried looking at this example https://github.com/zeit/next.js/blob/canary/examples/api-routes-graphql/pages/api/graphql.js You do not need to learn Redis at all- simply copy the config over from https://www.apollographql.com/docs/apollo-server/data/data-sources/#using-memcachedredis-as-a-cache-storage-backend |
@hoangvvo I have checked your previous link on apollo client side caching. I understand how easy it is to configure it but I don't know anything on Redis yet. Not even how to use a redis client like ioredis. |
@hoangvvo |
Hello, I wanted to ask how you'd add GraphQL. You said express was big and slowed next js. Would you use apollo-server then?
The text was updated successfully, but these errors were encountered: