INNER CODE UNIT · Python
Mutation
The-Art-of-Hacking/websploit · additional-labs/GraphQL/app.py:98
class Mutation(graphene.ObjectType):
create_user = CreateUser.Field()
schema = graphene.Schema(query=Query, mutation=Mutation)
# --- Flask App ---
app = Flask(__name__)
app.debug = True
# Add the GraphQL endpoint
app.add_url_rule(
'/graphql',
view_func=GraphQLView.as_view(
'graphql',
schema=schema,
graphiql=True # Enable the GraphiQL interface
)
)