Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.conf.urls import url
- from graphene import Schema, ObjectType, Int, Field
- from graphene_django.views import GraphQLView
- class Query(ObjectType):
- health_level = Field(Int)
- def resolve_health_level(self, args, context, info):
- return 9999
- schema = Schema(query=Query)
- urlpatterns = [
- url(r'^graphql', GraphQLView.as_view(schema=schema, graphiql=True))
- ]
Add Comment
Please, Sign In to add comment