GraphQL Server with Deno and MongoDB

GraphQL Server with Deno and MongoDB

  • Sample GraphQL Server with Deno and MongoDB

Deno Installation

$ curl -fsSL https://deno.land/x/install/install.sh | sh
  • Add below lines in .bashrc
export DENO_INSTALL="/$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
  • Run the following command
$ source ~/.bashrc

Deno Commands

  • Run the project
$ deno run --allow-net server.ts

Deno Links

Modules Used

GraphQL Query

# Write your query or mutation here
{
  getUser(id: "Avi"){
    firstName,
    lastName
  }
}

Notes

Oak framework in Deno is general equivalent of Express in Node.

Download Details:

Author: iAvinashVarma

Source Code: https://github.com/iAvinashVarma/mongo-graphl-deno

#deno #nodejs #node #mongodb #graphql

GraphQL Server with Deno and MongoDB
7.85 GEEK