Git Product home page Git Product logo

Comments (3)

tychota avatar tychota commented on May 18, 2024 3

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.

from learnapollo.

hammannja avatar hammannja commented on May 18, 2024

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.

  1. I did: "npm install --save graphql-tools graphql" (graphql is a dependency of graphql-tools).
  2. I also npm updated all of the dependencies and validated that the Application still worked post-update (it did!).
  3. I then went to http://dev.apollodata.com/tools/graphql-tools/mocking.html#Default-mock-example and copied the import statements and code into Pokedex.js
    a. I commented out "import { graphql } from 'graphql';" because the page was already importing graphql from "react-apollo."
  4. I inserted the schema provided at https://www.learnapollo.com/tutorial-react/react-02/#introduction in between the "const schemaString = ...;" single-parentheses.
  5. I opened a terminal window and entered "npm start" (after already doing "npm init" in the folder).

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.

from learnapollo.

Kanairy avatar Kanairy commented on May 18, 2024

@hammannja,

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.

from learnapollo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.