peter-mouland / react-lego

React-lego : incrementally add more cool stuff to your react app
http://react-lego.herokuapp.com/
MIT License
414 stars 36 forks source link

GraphQL implementation #4

Closed markshust closed 7 years ago

markshust commented 8 years ago

I'm currently using Meteor for both client and server builds. However with the activity and movement around GraphQL, I believe it could be a very viable option to opt for a client-only build without involving Meteor at all on the client. I also think this would speed up development by using webpack and getting out of Meteor's slow build process.

Any possibility of adding a sample GraphQL item to your list? Can use the just released GitHub GraphQL API for a sample: https://developer.github.com/early-access/graphql/

I also wonder how this would affect Redux (if at all).

btw I LOVE LOVE LOVE this repo! So many great examples.

peter-mouland commented 7 years ago

hey,

I've looked into the graphQL stuff and it does sound like interesting way of retrieving data. It doesn't sound like its specific to React (its another end point any language can hit), so I'm not sure it'd make sense in this project.

glad the repo is helping and thanks for the feedback, keep it coming 👍

markshust commented 7 years ago

@peter-mouland I'd have to very much disagree. It's about as specific to React as Redux is ;)

I'll see if I can get an example going in my own repo. GraphQL is going to be "the" way to get data into React, and wrapping my head around implementing it absolutely poses it's challenges.

peter-mouland commented 7 years ago

ah ok - I didn't get that from the link you sent across. I'll have to do some more reading around it when I get a chance then!

I'll take back what I said - it does look like it'd be great addition :)

peter-mouland commented 7 years ago

I'm starting to look into this now. I found https://github.com/graphql/swapi-graphql which is cool, since this project also uses swapi.

I am less interested in the express side of things and am moving into Koa (since it is much more up to date and is async by default).

Do you know of the differences/preferences of relay vs apollo server?

peter-mouland commented 7 years ago

sounds like I might first go with Apollo based on the long discussion going on here: https://github.com/mxstbr/react-boilerplate/issues/1041#issuecomment-260081364. let me know if you disagree @markoshust

markshust commented 7 years ago

Yes I would agree with Apollo!

peter-mouland commented 7 years ago

a new look react-lego and finally got round to doing this! ... no Apollo or anything yet, just raw GraphQL which i figure is a great place to start!

https://github.com/peter-mouland/react-lego/compare/ssr-css-redux-async...ssr-css-redux-async-graphql

markshust commented 7 years ago

very cool will check this out!