File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 31
31
# Application definition
32
32
33
33
INSTALLED_APPS = [
34
+ "django.contrib.staticfiles" ,
35
+ "graphene_django" ,
34
36
'django.contrib.admin' ,
35
37
'django.contrib.auth' ,
36
38
'django.contrib.contenttypes' ,
123
125
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
124
126
125
127
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
128
+
129
+ GRAPHENE = {
130
+ "SCHEMA" : "django_root.schema.schema"
131
+ }
Original file line number Diff line number Diff line change 15
15
"""
16
16
from django .contrib import admin
17
17
from django .urls import path
18
+ from graphene_django .views import GraphQLView
18
19
19
20
urlpatterns = [
20
21
path ('admin/' , admin .site .urls ),
22
+ path ("graphql" , GraphQLView .as_view (graphiql = True )),
21
23
]
Original file line number Diff line number Diff line change
1
+ import graphene
2
+
3
+ class Query (graphene .ObjectType ):
4
+ hello = graphene .String (default_value = "Hi!" )
5
+
6
+ schema = graphene .Schema (query = Query )
You can’t perform that action at this time.
0 commit comments