daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Dec 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.conf.urls import url
  2. from graphene import Schema, ObjectType, Int, Field
  3. from graphene_django.views import GraphQLView
  4.  
  5.  
  6. class Query(ObjectType):
  7.     health_level = Field(Int)
  8.  
  9.     def resolve_health_level(self, args, context, info):
  10.         return 9999
  11.  
  12.  
  13. schema = Schema(query=Query)
  14.  
  15.  
  16. urlpatterns = [
  17.     url(r'^graphql', GraphQLView.as_view(schema=schema, graphiql=True))
  18. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top