Giter Site home page Giter Site logo

iashraful / pnp-graphql Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 58 KB

A plug and play type graphql API making library

Home Page: https://ashraful.dev/docs/plug-n-play-graphql/

License: MIT License

Python 100.00%
graphql api query-language django python plug-and-play

pnp-graphql's Introduction

Plug & Play GraphQL (pnp-graphql)-- Change Log

A library for making GraphQL API with Python/Django. This is like a flash drive, just how you plug into computer and transfer files.

Read Full Documentation here: https://docs.ashraful.dev/pnp-graphql

Quick Start

Documentation is coming soon...

  • Install from pip pip install pnp-graphql
  • Add graphene_django on top of installed apps on settings.py
  • Add pnp_graphql into installed apps on settings.py
  • Add PnP GraphQL config on settings.
GRAPHENE = {
    'SCHEMA': 'pnp_graphql.schema.schema'
}

PNP_GRAPHQL = {
    'ENABLED_APPS': ['example_app'],
    # If you want to use Token Authentication. Otherwise it's optional
    'AUTHENTICATION_CLASS': 'pnp_graphql.authentication.TokenAuthentication'
}
  • Add the following code on urls.py
from pnp_graphql.urls import urlpatterns as up

urlpatterns = [
    # ... ... ... 
]
urlpatterns += up
  • Set DEBUG = False for production use.

That's it :)
Now visit: http://your-ip:port/api/graphql-explorer/ for explore GraphQL built-in UI explorer for query.
Production ready API : http://your-ip:port/api/graphql/

What's working?

  • GraphQL query
  • Mutation (Create, Update, Delete)
  • Pagination
  • API filtering for Number, String, Date, DateTime
  • Authentication

What are the plans?

  • Proper error handling
  • Field validation
  • Caching
  • many more ... ... ...

Waiting for your contribution ๐Ÿ˜„

pnp-graphql's People

Contributors

iashraful avatar

Stargazers

 avatar  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.