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 language #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Graphql language #4

wants to merge 8 commits into from

Conversation

gforge
Copy link

@gforge gforge commented Mar 12, 2017

Thank you for this excellent example! I finally have some grasp of this elusive cursor concept.

This pull request is about making the example a little more dense by defining the types in GraphQL. I've found this much easier to read and figured that I'd share this if anyone is interested in taking this approach. I suggest that you add a branch with this solution and perhaps a README that points explains both solutions.

Details:

  • I use the babel inline import plugin for loading the graphql files
  • The schema is built using graph-tools makeExecutableSchema.
  • I've added some convenience helpers such as nodemon
  • I've also fixed a bug in the limitQueryWithId
  • I've added the missing bluebird dependency and moved all the babel stuff into dev. The latter is a matter of taste but it nicely separates (in my mind) the core pieces from the fluff

I've tested the code with two articles on my local machine. Some test-cases would perhaps be nice to have, let me know if you want me to add these.

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

Successfully merging this pull request may close these issues.

1 participant