Skip to content

πŸš— an example of GraphQL + MongoDB server, created with deno.

License

Notifications You must be signed in to change notification settings

padulkemid/debunktcar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦– DebunktCar πŸ¦•

Ow yeahh it iz DONE. ( did you get it ? no ? 😞 )

License Coverage Codacy Grade

Description πŸ“•

A lot of you want to create a simple MongoDB CRUD with GraphQL. But hey, you want to try this new thing called deno too. Yup, try this example and go further explore things. Build and Improve your App using the latest techs indeed! 😁

Well this is just a simple CRUD, It'll cover the most basic template you would want to build a simple server, expect nothing more. πŸ™ƒ

Just pull some requests / issues if you found one!
Thank you very much! ☺️

Contributing πŸ‘‰πŸ»πŸ‘ˆπŸ»

  1. Install deno, this should be mandatory.

  2. Clone this thing.

  3. cd debunktcar and edit stuffs.

  4. Refer to this snippet on how to run the server.
    ( created for you, because we are all lazy to type those. )

    padul@universe:~$ chmod +x run
  5. Then run the server with ./run

    padul@universe:~$ ./run
  6. Should be on http://localhost:4000

Queries πŸ–‹

  • Get all cars

    query getCars {
      getCars {
        id
        manufacturer
        name
        power
      }
    }
  • Get car by its ID

    query getCarById($id: ID!){
      getCarById(id: $id){
        id
        manufacturer
        name
        power
      }
    }
    {
      "id": "5ee74a120079915d000f5562"
    }

Mutations πŸ’ͺ🏼

  • Create a New Car

    mutation createCar($input: NewCar!){
      createCar(input: $input){
        id
        manufacturer
        name
        power
      }
    }
    {
      "input": {
        "manufacturer": "Datsun",
        "name": "GO Panca",
        "power": 1200
      }
    }
  • Update a Car by its ID

    mutation updateCar($input: EditCar!){
      updateCar(input: $input){
        id
        manufacturer
        name
        power
      }
    }
    {
      "input": {
        "id": "5ee74a120079915d000f5562",
        "manufacturer": "Datsun",
        "name": "GO Panca +",
        "power": 1650
      }
    }
  • Delete a Car by its ID

    mutation deleteCar($id: ID!){
      deleteCar(id: $id){
        id
        result
      }
    }
    {
      "id": "5ee74a120079915d000f5562"
    }

License πŸ’³

MIT

Footnote πŸ‘£

Thanks for reading until the bottom of this README, press the star button if you like it ! ⭐️

About

πŸš— an example of GraphQL + MongoDB server, created with deno.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published