I got a Django project with two apps. The project uses graphene-django. Each of the apps got their own schema.py file. How do i reference both the schema files in settings.py in the project folder so that I can access all the schema's in graphql?
I have tried:
GRAPHENE = {
"SCHEMA":
"blog.schema.schema",
"newsletter.schema.schema",
GRAPHENE = {
"SCHEMA":[
"blog.schema.schema",
"newsletter.schema.schema",
],
...and other combinations which I can't remember, but they all either lead to errors or to just the last schema in the list to work.
The solution is to make a third
schema.pyfile in the same folder as yoursettings.pyfile. The newschema.pyfile should look like:Your
settings.pyfile should then reference the new thirdschema.pyfile: