One JS example with Dgraph-js for beginners. Using graphQL instead of REST

The Repo GitHub - MichelDiz/apollo-universal-starter-kit-With-Dgraph-DB: Apollo Universal Starter Kit — GraphQL React JavaScript app boilerplate for Mobile, Server and Web where code for all platforms built with Webpack to enable max code reuse, stack: Apollo, GraphQL, React 16, React Native, Expo, Express, Dgraph, Twitter Bootstrap, Babel, Webpack

It’s a kind of “reverse engineering for beginners”. Read the Readme completely to better understand the whole Kit. It’s functional, you can edit the “connector.js” if you need to. But just to test you can simply follow the setup in the readme and execute “yarn watch” (or NPM run watch).

There are some bugs with ReactJS, but nothing that a “refresh page” that does not resolve. Still debugging to understand what is missing. Also I am using Dgraph’s password type instead of bcrypt.

The advantages of this project is that it comes with:

  • Authentication (social auth need some more work, I forgot to support it xD ).
  • JWT Tokens
  • Authorization .
  • Posts and Comments (CRUD working)
  • GraphQL instead of REST (The Dgraph mix with GraphQL is beautiful - easy peasy lemon squeezy).
  • ReactJS
  • React-native
  • subscriptions
  • ES6 and ES7
  • Easy installation of new modules and code organization.
  • A good community behind the Kit
  • TypeScript

Another good example for JS users is graphoverflow GitHub - dgraph-io/graphoverflow: Run the entire StackOverflow on Dgraph. Work in progress.

Cheers.

4 Likes