Skip to content

Instantly share code, notes, and snippets.

@ashish-mj
Created April 26, 2024 08:03
Show Gist options
  • Save ashish-mj/5a521dcd3453a89c357d8dbec36611fc to your computer and use it in GitHub Desktop.
Save ashish-mj/5a521dcd3453a89c357d8dbec36611fc to your computer and use it in GitHub Desktop.
from flask_graphql import GraphQLView
from graphene import Schema
from flask import Flask
from gql.query import Query
from gql.mutation import Mutation
app = Flask(__name__)
schema = Schema(query=Query,mutation=Mutation)
app.add_url_rule('/staffday',view_func=GraphQLView.as_view( 'staffday',schema=schema, graphiql=True))
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment