Giter Club home page Giter Club logo

andrewjbateman / angular-graphql-api Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 2.05 MB

:clipboard: Frontend: Angular used with GraphQL and Apollo Client to view the backend Engineering Parts data set Backend: Node.js + GraphQL used with Apollo Server and GraphQL schema to execute queries on a data set

JavaScript 48.18% TypeScript 37.72% HTML 13.07% SCSS 1.03%
node nodejs apollo-server uuid-generator uuid resolvers database schema apollo graphql

angular-graphql-api's Introduction

โšก Angular GraphQL API

  • Frontend: Angular used with GraphQL and Apollo Client to view the backend Engineering Parts data set
  • Backend: Node.js + GraphQL used with Apollo Server and GraphQL schema to execute queries on a data set
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

๐Ÿ“„ Table of contents

๐Ÿ“š General info

  • Angular frontend uses the GraphQL module to fetch data via localhost port 4000
  • GraphQL used to query a mock Engineering parts db.js database with field reviews of parts and comments to improve the parts supply process
  • This was an idea of mine to link humdrum parts depots/maintenance to social media-like commenting from field personnel to flag up any problems with parts or their documentation.
  • Based on my time on engineering sites, where maintenance, spare parts, tools and related warehousing and manhours is big budget. Project costing was based on the weight of the modifications so this was vital data, e.g. weight of cables and cable-trays/cable-ladders.
  • Engineering parts are classified as critical parts or not with a Boolean criticalPart field.
  • Users can query, add, mutate (update) and delete parts, categories & field reviews

๐Ÿ“ท Screenshots

Image Image

๐Ÿ“ถ Technologies

๐Ÿ’พ Setup

  • Front & Back ends: npm i to install dependencies
  • Backend: cd Node-backend then npm run dev runs backend in the development mode with auto-restart after changes
  • Open http://localhost:4000 to access backend Apollo GraphQL Server
  • Frontend: (new terminal) cd Angular-frontend then npm run start runs frontend with auto-restart after changes
  • Open http://localhost:4200 to view frontend

๐Ÿ”ง Testing

  • Frontend tested using GraphQL backend data
  • Backend tested using GraphQL server Sandbox

๐Ÿ’ป Code Examples

  • Backend: list of GraphQL mutations
 type Mutation {
  addCategory(input: AddCategoryInput!): Category!
  addPart(input: AddPartInput!): Part!
  addFieldReview(input: AddFieldReviewInput!): FieldReview!
  deleteCategory(id: ID!): Boolean!
  deletePart(id: ID!): Boolean!
  deleteFieldReview(id: ID!): Boolean!
  updateCategory(id: ID!, input: UpdateCategoryInput!): Category
  updatePart(id: ID!, input: UpdatePartInput!): Part
  updateFieldReview(id: ID!, input: UpdateFieldReviewInput!): FieldReview
 }

๐Ÿ†’ Features

  • GraphQL query only returns the data specified, unlike REST queries that return everything

๐Ÿ“‹ Status, Testing & To-Do List

  • Status: Basic Front and Backends working
  • To-Do: Add CMS API or POSTgreSQL database. Add frontend queries etc styling, Tailwind cards or table for data

๐Ÿ‘ Inspiration

๐Ÿ“ License

  • N/A

โœ‰๏ธ Contact

angular-graphql-api's People

Contributors

andrewjbateman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.