Giter Club home page Giter Club logo

fastapi-graphql-strawberry-mongodb-template's Introduction

FastAPI Strawberry-graphql MongoDB Integrated Template/Boilerplate Code ๐Ÿš€

โš–๏ธ GitHub License

Template repository for a Service using FastAPI + Strawberry-Graphql + MongoDB.

Contains example code for various variations of queries, mutations, types and models, for further reference and easy coding...
Check out Sample entities, for reference.

You can add multiple services by duplicating the template folder and its corresponding entry in the docker-compose.yml file. Create new services based on these copies.


How to use ๐Ÿ“

  1. Click the green Use this template button on the top right to create a new repository in the personal account for the service.
  2. Clone the newly created repository to make changes and push.
  3. Copy .env file (Make changes in it as required):
cp .example.env .env
  1. Build and spin up all services:
docker compose up --build -d
  1. Check out
localhost:80
  1. To stop, press Ctrl + C

Example Requests

# Create document
curl -X 'POST' \
  'http://localhost:80/graphql' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"query": "mutation{sampleMutationOne(sampleInput: {attribute2: \"hi\", email: \"[email protected]\", name: \"test\"}) {name}}"}'

# Get documents
curl -X 'POST' \
  'http://localhost:80/graphql' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"query": "query{sampleQueryTwo{attribute1, name}}"}'

This code was referred from the template code (Private Repository in Clubs-Council-IIITH Organisation) by @bhavberi, @ek234 and @v15hv4.


GitHub Code size in bytes

fastapi-graphql-strawberry-mongodb-template's People

Contributors

bhavberi avatar buckldav avatar deepsource-io[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

buckldav minsuhya

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.