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
Possible Excursion: Mocking and Changing Data Endpoints #42
Comments
Hey, thank for the kind words. It is true that we don't cover the server part. In LearnApollo, we focused on the client part, because there are literally 100 ways to make a graphQL server. We though the scope was too large, and admittedly, it is pretty easy for newcomers to start with GraphCool (I don't work at GraphCool) : they don't have to buy a server, understand how to do authentication, understand how to optimise the server for the n query problem, etc.. While those topics are interesting, it is also easier to start with a SAAS and visualise the benefit in term of decoupling and optimised, readable code. I think that it will be nice to have a full new website learngraphqlserver.com or whatever, and put those topics over there. |
Thanks for the response. In keeping with the focus of Learn Apollo on the client side, I attempted to add the data mocking capabilities provided by graphql-tools into one of the examples.
I get the following error: "Uncaught Error: Must provide schema definition with query type or a type named Query." I suspect the solution to this problem is easy to solve, but the existing documentation doesn't help me get there. I would appreciate help solving it and I think this would be helpful to many others. Conclusion: The front-end examples provided at LearnApollo are currently the best examples I have found for actually learning Apollo at the level of detail necessary to use the examples as a beginning template to start building a person's new App on their own. It includes many details that are not documented or are poorly documented. In order for a person to build their own new App without setting up their own Graphql server (using Apollo Group's Graphql First development mindset), the person needs to add mock capabilities and, later, completely decouple the application from the Pokedex server you wonderfully provided. They can then work on their App for weeks/months before having to figure out how to set up their back-end. It would be helpful if you provided those transition steps to new Apollo developers. Thanks again for all of your hard work. |
You can always use a service like https://www.graph.cool/ to make your own graphql endpoint to play with. In fact, the Pokedex server used in the lessons are hosted by graphcool. I agree with @tychota, a full new url with the purpose of teaching gql server would me most suitable. |
Loved the React Tutorial!
In the tutorial, you do the wonderful thing of setting up a client data interface for us to an existing back-end: networkInterface: createNetworkInterface({ uri: 'https://api.graph.cool/simple/v1/cix0ooaws024k0132n9tbc5p9'}),
It would be nice to have an Excursion or Track specifically on the data layer. Specifically, it would be great to see an excursion demonstrating no data back-end (using graphql-tools mocking features), and then a conversion of that no data back-end environment to the creation of a back-end. With enough topics (e.g., pulling from two data sources within one qraphql query), this might even be more than an Excursion, and instead a separate Track!
Thanks!
The text was updated successfully, but these errors were encountered: