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

GraphQL support #53

Open
jc3lee opened this issue Mar 28, 2020 · 11 comments
Open

GraphQL support #53

jc3lee opened this issue Mar 28, 2020 · 11 comments
Labels

Comments

@jc3lee
Copy link

jc3lee commented Mar 28, 2020

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?

@jc3lee
Copy link
Author

jc3lee commented Mar 28, 2020

I just realized that apollo-server uses express too...

@wortkotze
Copy link

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

@hoangvvo
Copy link
Owner

@hoangvvo
Copy link
Owner

@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.

@wortkotze
Copy link

Yes I’m using redis but not with Zeit deployments.

@jc3lee
Copy link
Author

jc3lee commented Mar 29, 2020

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.

@jc3lee jc3lee closed this as completed Mar 29, 2020
@jc3lee
Copy link
Author

jc3lee commented Mar 29, 2020

I'm reopening it, as I just realized by closing this issue others can't ask for the graphQL feature.
Btw, I plan on using apollo-client in next js and express-graphql backend.

@jc3lee jc3lee reopened this Mar 29, 2020
@foaadnami
Copy link

+1

@hoangvvo
Copy link
Owner

hoangvvo commented Mar 29, 2020

@jc3lee
Copy link
Author

jc3lee commented Mar 29, 2020

@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.
To be honest, I'd rather use express-graphql than apollo-server-micro because there are more tutorials plus it's easier to google for help. And size won't be a problem because I'm going to use nextjs on frontend and express backend. Thanks for the advice anyway!

@jc3lee
Copy link
Author

jc3lee commented Apr 16, 2020

@hoangvvo
I made a jwt auth with graphQL using apollo-client + nextjs as front and apollo-server-express + express as back and added redis cache today. There really is nothing to configure to add apollo server redis cache. Thanks again and I'd be glad if you checked it out
https://github.com/ljc-dev/jwt-auth-nextjs-express

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

No branches or pull requests

4 participants