Commit Graph

115 Commits

Author SHA1 Message Date
Jonathan Kim
348fcf37a0
Detect format from output file path (#868)
* Detect format from output file path

* Fix tests

* Add test for exporting graphql file

* Add some documentation
2020-03-13 10:04:55 +00:00
Jonathan Kim
b8e598d66d
Add options to override how Django Choice fields are converted t… (#860)
* Add new setting to create unique enum names

* Add specific tests for name generation

* Add schema test

* Rename settings field

* Rename setting

* Add custom function setting

* Add documentation

* Use format instead of f strings

* Update graphene_django/converter.py

Co-Authored-By: Syrus Akbary <me@syrusakbary.com>

* Fix tests

* Update docs

* Import function through import_string function

Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2020-03-13 10:04:25 +00:00
Akhil Gopi
13352216a4
Improv/documentation fixes (#895)
* Bump up the minimum support Django version.

* Update documentation to mention support for Django 1.11.

Co-authored-by: Akhil <akhil@healthifyme.com>
2020-03-07 17:17:45 +01:00
Jonathan Kim
de87573e0c
Add information on how to deal with CSRF protection (#838) 2020-01-11 14:49:17 +01:00
Jason Kraus
a818ec9017 replace merge_queryset with resolve_queryset pattern (#796)
* replace merge_queryset with resolve_queryset pattern

* skip double limit test

* Update graphene_django/fields.py

Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>

* yank skipped test

* fix bad variable ref

* add test for annotations

* add test for using  queryset with django filters

* document ththat one should use defer instead of values with queysets and DjangoObjectTypes
2019-11-28 10:49:37 +00:00
Athul Cyriac Ajay
e51e60209a Updated Tutorial with Highlights (#801) 2019-10-31 19:31:31 -04:00
Brett Jackson
def6b15e5b Update schema introspection docs to show SCHEMA_INDENT option (#802)
* Update schema introspection docs to show indent settings

* fix whitespace
2019-10-19 20:33:33 +01:00
Tyler Kennedy
4bbc0824a6 Fix a small typo, filerset_class -> filterset_class (#762) 2019-09-17 09:13:47 -07:00
Talley Lambert
254e59c36f Adds variables arg to GraphQLTestCase.query (#699)
* add variables arg in GraphQLTestCase.query

* update GraphQLTestCase.query docstring and remove type check
2019-09-07 11:49:29 -07:00
Semyon Pupkov
ac79b38cf0 Use field and exclude in docs instead deprecated attrs (#740) 2019-09-07 09:49:41 -07:00
A C SREEDHAR REDDY
1b8184ece1 make Mutation class ObjectType. (#748) 2019-08-16 14:34:28 +01:00
A C SREEDHAR REDDY
9d245287a4 is_authenticated is bool not callable. (#749) 2019-08-16 14:33:59 +01:00
Gert Van Gool
d5e71bc9be Fix typo of imoprt to import (#742) 2019-08-10 21:30:17 +01:00
Jonathan Kim
b7e4937775
Alias only_fields as fields and exclude_fields as exclude (#691)
* Create new fields and exclude options that are aliased to exclude_fields and only_fields

* Update docs

* Add some checking around fields and exclude definitions

* Add all fields option

* Update docs to include `__all__` option

* Actual order of fields is not stable

* Update docs/queries.rst

Co-Authored-By: Semyon Pupkov <semen.pupkov@gmail.com>

* Fix example code

* Format code

* Start raising PendingDeprecationWarnings for using only_fields and exclude_fields

* Update tests
2019-07-09 14:03:11 +01:00
Jonathan Kim
0988e0798a
Adds documentation to CAMELCASE_ERRORS setting (#689)
* Rename setting and add documentation

* Add examples

* Use `cls`
2019-07-08 22:22:08 +01:00
Jonathan Kim
612ba5a4ea
Add convert_choices_to_enum option on DjangoObjectType Meta class (#674)
* Add convert_choices_to_enum meta option

* Add tests

* Run black

* Update documentation

* Add link to Django choices documentation

* Add test and documentation note

That setting to an empty list is the same as setting the value as False

* Fix Django warning in tests

* rst is not markdown
2019-06-17 18:48:29 +01:00
Jonathan Kim
6e8dce95ae
Update doc setup (#673)
* Expose doc commands in root makefile and add autobuild

* Fix some errors

* Alias some commands and add PHONY
2019-06-14 12:33:37 +01:00
Emil Goldsmith Olesen
fcc491fffb Add watch option to graphql_schema (#656)
* Add watch option to graphql_schema

* add documentation for grapql_schema --watch
2019-06-09 17:06:50 -07:00
Mel van Londen
a9a8d672e9
Merge pull request #600 from sierreis/filterset-class
Add support for filterset_class meta parameter
2019-06-09 16:48:46 -07:00
Richard Sween
d06217d203
Fix Mutations Relay example imports
Per comment here: https://github.com/graphql-python/graphene-django/pull/657#issuecomment-499618785
2019-06-06 13:53:16 -05:00
Richard Sween
fc49a50cc3
Update mutations.rst
I believe the `[1]` was ommitted from the `from_global_id` call as that method returns a tuple of type and id, of which we're only interested in the id here. Took me half a day to figure out why this code wasn't working today. See function def here: https://github.com/graphql-python/graphql-relay-py/blob/master/graphql_relay/node/node.py#L67
2019-06-05 19:43:51 -05:00
Dulmandakh
49aedf171a bump graphiql to 0.13.0, and rename __debug to _debug due to __ limitations 2019-05-20 17:48:28 +08:00
Paul Hallett
80125c3077
Merge pull request #641 from changeling/fix_babel_link
Correct Babel Relay Plugin docs link per Issue 358.
2019-05-16 09:08:31 +01:00
changeling
04fe299a6e Corrected docs/queries.rst. (#633)
* Corrected typos in docs/queries.rst.

* Add basic resolvers to Relay Full example in docs/queries.rst.

Added basic resolvers to Full example in Relay section.

* Remove question and question resolver.

* Add query example to queries.rst.

Added query example in Relay section.
Minor clean-up.
2019-05-15 20:50:55 -04:00
changeling
884c4cce0c Correct Babel Relay Plugin docs link per Issue 358.
See graphql-python#358.
2019-05-15 16:27:35 -05:00
Paul Hallett
e26a9f2a44
Merge pull request #631 from graphql-python/fix-628
Fix importing error for GraphQLTestCase
2019-05-13 18:12:22 +01:00
David Beitey
ce9d989bcd Update install docs for Django 2.x
This uses the new URL routing syntax introduced in Django 2.0 (https://docs.djangoproject.com/en/2.2/releases/2.0/#simplified-url-routing-syntax).  The older `url()` syntax will deprecated at some point in future https://docs.djangoproject.com/en/2.2/ref/urls/#url
2019-05-13 17:08:26 +10:00
Paul Hallett
2bf7e7f66d
Fix importing error for GraphQLTestCase 2019-05-08 22:45:28 +01:00
Paul Hallett
bd53940d23
newline 2019-05-07 20:23:26 +01:00
Paul Hallett
df4a07982f
Add documentation for settings 2019-05-07 20:23:10 +01:00
Paul Hallett
31468f5687
Rebuild documentation 2019-05-07 19:23:01 +01:00
Mel van Londen
2016011394
Merge pull request #605 from GitRon/bugfix/missing-type-declaration-in-docs
Missing LOC in django model form documentation (fixes #602)
2019-04-27 09:34:58 -07:00
Mel van Londen
fb8a129752
Merge pull request #608 from GitRon/feature/base-test-class
Added test class for django api unittests and documentation
2019-04-27 09:16:23 -07:00
Edi Santoso
090ce6e1f1 Fix invalid url django-filter docs (#589) 2019-03-31 12:13:07 +01:00
Jason Kraus
0a5020bee1 Get queryset (#528)
* first attempt at adding get_queryset

* add queryset_resolver to DjangoConnectionField and fix test failures

* cleanup get_queryset API to match proposal as close as possible

* pep8 fix: W293

* document get_queryset usage

* add test for when get_queryset is defined on DjangoObjectType
2019-03-31 12:01:17 +01:00
Gary Donovan
fcc3de2a90 Allow graphql schema export to use a canonical representation (#439)
When we use the `graphql_schema` management command, the output can vary from run to run depending on arbitrary factors (because there is no guarantee made about the order used to output JSON dictionary keys). This makes it difficult to compare two schema's at different points in time.

We address this by including a new `canonical` flag to the command, which uses standard `json.dump` funcitonality to sort dictionary keys and force pretty-printed output.
2019-03-31 11:30:29 +01:00
Ronny Vedrilla
b491878c27 * Added test class for django api unittests and documentation how to use it 2019-03-29 11:51:40 +01:00
Ronny Vedrilla
547a4cb576 Missing LOC in django model form documentation (fixes #602) 2019-03-27 16:30:35 +01:00
sierreis
5c191b9062 Add support for filterset_class meta parameter
* Allow for use of either filter_fields or filterset_class
* Add tests to check that the behavior is similar to filter_fields
* Add documentation to show how to make use of the parameter
2019-03-25 00:38:49 -04:00
Atul Varma
263c7267cb Fix code errors in form-mutations.rst (#499)
This fixes what appear to be some code errors/typos:

* The `FormMutation` class was renamed to `DjangoFormMutation`, and `ModelFormMutation` to `DjangoModelFormMutation`, in 40610c64a3.
* `form_valid` was renamed to `perform_mutate` in 463ce68b16.

It also clarifies a few things that I found confusing:

* It explicitly mentions that `perform_mutate` is a class method.
* The code samples now import the form classes from their packages, so readers know where to import them from too.
2019-03-19 20:24:24 +00:00
Liam O'Flynn
75bf398523 Ensure code example is fully functional (#477)
Simple change, it took me a while to figure out why the documentation's code was throwing an AssertionError :)
2019-03-19 20:22:04 +00:00
Charles Bradshaw
ae126a6dc3 Add Introspection Schema Link in Documentation (#489)
By the end of the Graphene and Django Tutorial using Relay, one might think they have finished everything needed server side for Relay, but six sections later, in a section that doesn't mention Relay in the title, the final required step for Relay is documented.
2019-03-19 20:20:26 +00:00
Alonso
f3144bf996
fix order in params 2018-09-26 13:07:50 -05:00
Syrus Akbary
f6dba3942c
Merge pull request #506 from ccsv/patch-1
Update authorization docs to Graphene 2.0
2018-09-05 13:30:40 +02:00
Syrus Akbary
2ccd483ffc
Update authorization.rst 2018-09-05 13:22:54 +02:00
Syrus Akbary
446013c752
Update authorization.rst 2018-09-05 13:21:39 +02:00
Jay Hale
dc0c2900d1 Making GrapheneFilterSetMixin compatible with django_filter 2 2018-09-04 13:15:04 -04:00
C Chan
84d82f82a9
Update authorization docs to Graphene 2.0
*  Re-write some language in "Limiting Field Access"
* Added code to "Queryset Filtering On Lists" section to handle queries that return nothing
* fix code to Filtering ID-based node access to work based on question [here](https://stackoverflow.com/questions/51057784/django-graphene-with-relay-restricting-queries-access-based-on-id/51958088#51958088)
* Rewrote Adding Login Requirements to be Django 2.0 compatible 
Fixed login requirements
2018-08-29 00:37:27 -07:00
Adam
40da74fc52
Mention filter incompatibility with django 2.0
Was in the process of updating our app to Python 3 + Django 2.1 and ran into this (would've been nice if t was mentioned in the docs).

Related: https://github.com/graphql-python/graphene-django/issues/464
2018-08-07 11:04:52 -04:00
Adam Johnson
1ba9652f38
Reword 'abstract' -> 'mixin' in plain tutorial
More technically correct
2018-08-01 12:51:46 +01:00