Repository navigation
Implement Django command for dumping schema.json - #73
Conversation
* Implement Django `./manage.py graphql_schema` * Required to have 'graphene.django.contrib' in INSTALLED_APPS setting * Introduces two new optional settings GRAPHENE_SCHEMA and GRAPHENE_SCHEMA_OUTPUT * GRAPHENE_SCHEMA for the Django app containing the schema * GRAPHENE_SCHEMA_OUTPUT for the output file (defaults to schema.json) * Use `./manage.py graphql_schema -h` for help in command line
|
Great work! 👍 |
Implement Django command for dumping schema.json
|
@lightning18 This is great, thank you :-) Just a minor hiccup: It seems that the |
|
That is unfortunate, is it a deal breaker? Should I use an if statement to support 1.8 too? |
|
I recall @syrusakbary stating a preference to support Django 1.6 as quite a few of the graphql-core folks are using it. IMHO I don't think it is a critical problem in this case, but it is a very useful command so it would be great to sort it somehow. Personally, I'd be tempted to just remove the styling. Side note – I didn't know that Django offered this styling - I'm sure I'll be making use of it soon :-) Edit: Added link |
|
Yes, sure, I don't mind it being removed, it's just a visual after all. I can submit a PR for that. I'd also like to include some documentation. Should I just add it on the Django quickstart? |
|
I'm working in fixing the compatibility in older versions of Django. And adding some basic testing for the command. If you could add some documentation would be great! @lightning18 (just create a dedicated .md file in this folder and I will take care of the rest) |
./manage.py graphql_schemaGRAPHENE_SCHEMA_OUTPUT
./manage.py graphql_schema -hfor help in command line