Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Refactor to use Apollo Client #57

Merged
merged 3 commits into from
Jan 16, 2017
Merged

Refactor to use Apollo Client #57

merged 3 commits into from
Jan 16, 2017

Conversation

helfer
Copy link
Contributor

@helfer helfer commented Oct 6, 2016

Removed a bunch of stuff that's now unnecessary.

It works on my end, but I'm not very familiar with webpack, so HMR isn't working. Probably an easy fix though, for someone who knows it better than me.

@kevinold
Copy link
Contributor

kevinold commented Oct 7, 2016

@helfer Nice work getting Apollo client integrated!

The issue with HMR is one I see often where it does not work with Functional Stateless Components (gaearon/babel-plugin-react-transform#57).

The issue you see with HMR does not work on the master branch if updating a FSC.

React Hot Loader 3 is supposed to fix this and someone has this working (https://github.com/dimagimburg/react-hot-loader-stateless-function-component-example), but I have yet to try in any of my projects.

@dreadjr
Copy link

dreadjr commented Nov 1, 2016

What are the benefits of choosing Apollo vs relay? Have you seen one work better in production environments?

@dkryptr
Copy link

dkryptr commented Dec 2, 2016

I'm also wondering the same as @dreadjr

@helfer
Copy link
Contributor Author

helfer commented Dec 13, 2016

@dreadjr that's probably a question best asked in the GraphQL slack or on stackoverflow.

@dreadjr
Copy link

dreadjr commented Dec 13, 2016

@helfer That is probably true in general but i was really interested in context of this project.

@nikgraf
Copy link
Contributor

nikgraf commented Dec 14, 2016

sorry for the delay, I was busy with a lot of other stuff, but will try to come back to this later this week or early next week …

@stubailo
Copy link

stubailo commented Jan 4, 2017

Hi, any updates on this? Let's get a boilerplate going with Apollo as well, I think that will be advantageous for a lot of people using Redux.

@dreadjr
Copy link

dreadjr commented Jan 4, 2017

I was more curious about the choice in relation with this project. Although generally speaking I would be interested as well. Both clients make specific choices and as a reference implementation i am looking for any points that fueled the decision.

@stubailo
Copy link

stubailo commented Jan 5, 2017

I think Apollo is a better choice in general (especially for people getting started), while Relay might be better for some specific apps. It integrates better with various community tools for Redux and React, is more flexible for a variety of apps, has sophisticated dev tools, and more closely follows forward-looking best practices like avoiding dynamic query manipulation. The best option might be to have two starter kits for GraphQL with serverless, one for Relay and one for Apollo, since people might still prefer to use Relay.

Is there anything specific to this project which would inform choosing one library over another?

@helfer
Copy link
Contributor Author

helfer commented Jan 5, 2017

@stubailo What you wrote reads a bit ambiguously. I'm sure you meant to say that Apollo integrates better with community tools for Redux and React, right?

@nikgraf nikgraf merged commit 0bb815d into serverless:master Jan 16, 2017
@nikgraf
Copy link
Contributor

nikgraf commented Jan 16, 2017

@helfer thanks again for your help! I really appreciate it. For some time I wasn't sure what's the best way to move forward and if we want to support a Apollo & Relay version.

I splitted the repo: this one was renamed to serverless-graphql-apollo and extracted the other to serverless-graphql-relay. I plan to invest a bit more into this repo over the next couple days.

@helfer @stubailo did anything in Apollo change since you opened the PR that would require a major change?

@singlow
Copy link

singlow commented Jan 16, 2017

@nikgraf I am trying project for first time, but it seems the latest commit removes the updateSchema.js that is referenced in the npm script which is the 3rd step in the install/setup process. npm run update-schema is no longer necessary? Or is there a new substitute?

@stubailo
Copy link

@singlow with Apollo that step is unnecessary. Sounds like we need to update the setup directions.

@nikgraf
Copy link
Contributor

nikgraf commented Jan 16, 2017

@singlow just updated the Readme

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

Successfully merging this pull request may close these issues.

7 participants