Code Monkey home page Code Monkey logo

twitter-go's Introduction


Go Lang GraphQL Boilerplate

This is my GraphQL Boilerplate for starters at Go and GraphQL

Why i created this?

I was studying Go Lang and i did not found any great tutorial of how to build a simple GraphQL server with authentication and with password hashing

What you need to know?

There are three stuff that you need to know about this boilerplate

What database is beign used?

MongoDB, and for managing i'm using the mgm that is a ODM for mongo, and the models that i create are all inside the database/models folder. You can create your models inside that folder like this: database/models/user/user.go

What is being used to handle GraphQL?

GQL Gen, the graphql gen it's a pretty easy solution to work with GraphQL with Go!

It has some tools to help you develop faster you just need to change the schema and run the following command to generate the models and resolvers skeleton:

go run github.com/99designs/gqlgen

It will generate a model inside the file graph/model/models_gen.go folder and also will create the resolvers for you automatically inside graph/schema.resolvers.go, but there are two things that you need to know:

  1. The models should not be edited because they are generated based on the graph/schema.graphqls
  2. You can edit the graph/schema.resolvers.go but when you run the gql gen command will create resolvers but without any kind of logic inside

How to run the project

  1. Clone the repo
  2. Enter the project folder and run the following command to install the deps go mod download
  3. Run the go run server.go and you should be fine

twitter-go's People

Contributors

lfscamargo avatar

Stargazers

Sudheer Saka avatar tom twinkle avatar Kayongo Johnson Brian avatar Wellerson avatar  avatar lucas picollo avatar Bruno Melo avatar

Watchers

James Cloos 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.