question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal to use graphene-django without relay

See original GitHub issue

A few weeks ago I started playing with this module and it seemed very good, congratulations to the whole team. The truth is that after further testing, following the documentation, I was not pleased that most of the implementations of important aspects in an API (pagination, filtering, among others) were only present for Relay, so I continued testing on a small project in which I was working, and make a small module, which I call graphene-django-extras, in which the following characteristics are present:

Fields: 1. DjangoListField 2. DjangoFilterListField 3. DjangoFilterPaginateListField 4. DjangoListObjectField Mutations: 1. DjangoSerializerMutation Types: 1. DjangoInputObjectType 2. DjangoPaginatedObjectListType Pagination: 1. LimitOffsetGraphqlPagination 2. PageGraphqlPagination 3. CursorGraphqlPagination (cooming soon)

Here a example of query with pagination and filters, without Relay:

{
  allUsers(username_Icontains:"john"){
    results(limit:5, offset:5){
      id
      username
      firstName
      lastName
    }
    totalCount
  }
}

Here I leave the link of the repository with some documentation: graphene-django-extras

Note: If someone finds a bug please let me know. I would also appreciate any help you want to provide to improve the features. Enjoy it!!!

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:46
  • Comments:36 (4 by maintainers)

github_iconTop GitHub Comments

15reactions
mekhamicommented, Dec 16, 2019

I highly recommend getting graphene-django-extras as functionalities in the core library. They are basic functionalities that should be maintained by the core team and open source community at large. Tying the graphene library so closely to the Relay client needs to be undone, and that would be a good first step.

15reactions
dregladcommented, Mar 17, 2018

A brilliant job has done @eamigo86 in his graphene-django-extras package.

IMHO, the team should seriously consider somehow integrating it into graphene-django, or at least mentioning it in the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use parameters in subfields with graphene-django without ...
I'm using graphene with django and I'm struggling to do something that in my head should be very simple, but I don't find...
Read more >
Django + Graphene: From REST to GraphQL - FullStack Labs
This walk-through demonstrates the power of using Graphene with Django by covering the basics, testing, and more advanced features.
Read more >
django-filter - Graphene-Python
Graphene -Django integrates with django-filter (2.x for Python 3 or 1.x for Python 2) to provide filtering of results. See the usage documentation...
Read more >
How to use the graphene.ID function in graphene - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. ... so we need to...
Read more >
[LIVE] Django GraphQL API with Python Graphene - YouTube
This is an edited livestream where I build a GraphQL API in Python's Django framework.It's a spaced repetition learning back-end to compare ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found