Giter Site home page Giter Site logo

node-vue-graphql-demo's Introduction

GraphQL Intro and Playground

A project that gives a little intro to GraphQL / Node / Vue end-to-end.

Project setup and commands

Install dependencies and seed local db

yarn setup

Start local client + dev server

yarn start

Client server will be running at localhost:8080 Express server (GraphQL endpoint) will be running at localhost:3000/graphql

Building out this project

This project provides enough scaffolding to get you started playing around with GraphQL from both the client and the server. The inital starting point is missing some key pieces that need to be implemented before anything works:

I'd recommend starting with the server, and implementing the following pieces:

server/graphql.js

  • Schema definition based on the data in db.json
  • Our resolver needs to fetch some actual data from db.json

For the client queries

client/graphql/queries.js

  • write some queries that conform to the schema we wrote on the server-side

client/store.js

  • we need to use the queries that we wrote above to fetch data from the server in our actions
  • then we need to set this data on the state in our mutations

** Getting Advanced **

TODO

Documentation

These are docs for the primary tools used to build this demo / playground

Server

  • Nodemon - Runs node with hot reloading
  • Express - Wonderful server and routing framework
  • Apollo Server - Allows us to field incoming GraphQL requests
  • LowDB - A super simple local JSON store, with ORM like interactions provided by lodash

Client

  • Vue - Our favorite front end framework
  • Vuex - State management for Vue
  • GraphQL Tag - Used to build GraphQL tags from string literals
  • Apollo Client - Provides tools for connection to GraphQL. Note: These docs are "for React" but remain pretty framework agnostic

Process management

  • concurrently - This tool makes running the client and server in parallel easier by enabling us to run one yarn command to spin up both processes!

node-vue-graphql-demo's People

Contributors

emilymalecbrown avatar

Stargazers

Josh Larson avatar

Watchers

 avatar

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.