All Projects → syfun → starlette-graphql

syfun / starlette-graphql

Licence: MIT License
The starlette GraphQL implement, which support query, mutate and subscription.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to starlette-graphql

Magento2 NewsletterSubscribeAtCheckout
This Magento 2 module allows you to enable a newsletter subscription checkbox on the checkout page.
Stars: ✭ 13 (-13.33%)
Mutual labels:  subscription
action-mercure
🚀 GitHub Action for Mercure.
Stars: ✭ 14 (-6.67%)
Mutual labels:  subscription
nexus-federation-example
Example of using Apollo Federation and Nexus JS
Stars: ✭ 16 (+6.67%)
Mutual labels:  apollo-federation
Android-MonetizeApp
A sample which uses Google's Play Billing Library and it makes In-app Purchases and Subscriptions.
Stars: ✭ 149 (+893.33%)
Mutual labels:  subscription
simple-subscribe
Collect emails with a subscription box you can add to any page and build your own independent subscriber base.
Stars: ✭ 67 (+346.67%)
Mutual labels:  subscription
google-play-billing-validator
Npm module for Node.js to validate In-app purchases and Subscriptions on your backend
Stars: ✭ 72 (+380%)
Mutual labels:  subscription
azure-service-bus-go
Golang library for Azure Service Bus -- https://aka.ms/azsb
Stars: ✭ 67 (+346.67%)
Mutual labels:  subscription
gn-api-sdk-node
SDK em NodeJS integrada a API Gerencianet. Esta SDK está preparada para integração à API Pix e API Boletos da Gerencianet, que lhe permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto/Bolix, carnê, cartão de crédito e muito mais.
Stars: ✭ 33 (+120%)
Mutual labels:  subscription
react-native-relay
🚀 demo React Native app using React Navigation and Relay with mutations and subscriptions
Stars: ✭ 20 (+33.33%)
Mutual labels:  subscription
drf-stripe-subscription
An out-of-box Django REST framework solution for payment and subscription management using Stripe.
Stars: ✭ 42 (+180%)
Mutual labels:  subscription
utopia-crm
Utopía is an open source platform for community based newsrooms to manage their subscriptions
Stars: ✭ 15 (+0%)
Mutual labels:  subscription
tg-inviter
Generate personal invite links for Telegram channels
Stars: ✭ 26 (+73.33%)
Mutual labels:  subscription
nestjs-graphql-gateway
Apollo Federation support for NextJS GraphQL module. Note: There is support for federation in the official package now so this project is deprecated
Stars: ✭ 13 (-13.33%)
Mutual labels:  apollo-federation
cashier-register
Cashier Register is a simple quota feature usage tracker for Laravel Cashier subscriptions.
Stars: ✭ 93 (+520%)
Mutual labels:  subscription
Vestaboard
An API Wrapper for Vestaboards written in Python
Stars: ✭ 23 (+53.33%)
Mutual labels:  subscription
responsive-html-email-templates
Collection of Free responsive HTML templates for Startups
Stars: ✭ 187 (+1146.67%)
Mutual labels:  subscription
Zee5
Just a simple shit but no one knows
Stars: ✭ 29 (+93.33%)
Mutual labels:  subscription
PurchaseHelper
Sample app to explain the In-App purchase implementation in Android using Play-billing library
Stars: ✭ 30 (+100%)
Mutual labels:  subscription
wave
Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰
Stars: ✭ 3,646 (+24206.67%)
Mutual labels:  subscription
wp-ispconfig3
Wordpress ISPConfig plugin with Gutenberg support
Stars: ✭ 28 (+86.67%)
Mutual labels:  subscription

Starlette GraphQL

The starlette GraphQL implement, which support query, mutate and subscription. Based on python-gql.

Requirement

Python 3.7+

Installation

pip install starlette-graphql

Getting started

# app.py
from gql import query, gql
from stargql import GraphQL

type_defs = gql("""
type Query {
    hello(name: String!): String!
}
""")


@query
async def hello(parent, info, name: str) -> str:
    return name


app = GraphQL(type_defs=type_defs)

Use uvicorn to run app.

uvicorn app:app --reload

Upload File

import uvicorn
from gql import gql, mutate
from stargql import GraphQL

type_defs = gql("""
 scalar Upload
 
 type File {
    filename: String!
  }

  type Query {
    uploads: [File]
  }

  type Mutation {
    singleUpload(file: Upload!): File!
    multiUpload(files: [Upload!]!): [File!]!
  }
""")


@mutate
def single_upload(parent, info, file):
    return file


@mutate
def multi_upload(parent, info, files):
    return files


app = GraphQL(type_defs=type_defs)


if __name__ == '__main__':
    uvicorn.run(app, port=8080)

Subscription

For more about subscription, please see gql-subscriptions.

Apollo Federation

Example

For more abount subscription, please see Apollo Federation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].