Code Monkey home page Code Monkey logo

graphql-link's Introduction

Technical Stack used

  • Apollo Server
  • Graph QL
  • NodeJs
  • The data comes from 2 Json file in |--json_ressources/

Commands to run the project

Install Node Dependencies:

npm i

Start the server with nodemon:

npm start

Run GraphQl Queries

  • You can use Apollo playground on http://localhost:4000/ to:
    • Read the GraphQl API documentation
    • Read The GraphQl Schema
    • Run queries

Current implementation

  • The current schema allow to:
    • Client can create / modify a Link
    • Client can get All ( Users || Links )
    • Client can get ( User || Links ) By Id

Blocking points

  • The Client can not create dynamically a link, some improvement need to be done e.g add a schema directive
  • The Client can not get links orderby date. Need to implement helper function to sort that
  • Field Validation are not done. Need to code custom scalar type for some fields e.g Date / character limit / url parser

Futur implementation

  • All the blocking points :)
  • Add TypeScript Support
  • Use a proper Naming convention for the function
  • Refactor the Schema and use Interfaces
  • Add ExpressJs dependencies to get the benefices of the framework
  • Add Unit Test
  • Create better way to handle Errors and log them
  • Authentification system:
    • JWT in cookies and managed on server side
  • Authorization context: Roles and Permission
  • Security/Protection:
    • add a rate limit to the queries , it can be role based
    • add a depth limit
    • implement pagination
    • implement cost score attribute for all queries
  • adopt a proper folder structure:
    • modularise GraphQl folder like resolver / mutation / queries....
    • Create Models / controllers / services / Helpers folders

graphql-link's People

Contributors

vianney-victoria 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.