Git Product home page Git Product logo

Comments (5)

docelic avatar docelic commented on June 4, 2024 1

Fabulous! Thanks Artem as always.

from graphene-sqlalchemy-filter.

art1415926535 avatar art1415926535 commented on June 4, 2024

I added a new example.

In short:

class TotalCount(graphene.Interface):
total_count = graphene.Int()
def resolve_total_count(self, info):
return self.length

class UserConnection(Connection):
class Meta:
node = UserNode
interfaces = (TotalCount,)

It uses graphene-sqlalchemy feature.

from graphene-sqlalchemy-filter.

PriyatamNayak avatar PriyatamNayak commented on June 4, 2024

@art1415926535
How we can count or average without relay
dont want to see the contents with node and edge
Could you please help me??

from graphene-sqlalchemy-filter.

art1415926535 avatar art1415926535 commented on June 4, 2024

If you are not using the graphene-sqlalchemy relay, then you need to solve this problem by building on your schema. For example, make a separate field and write your resolver for it.

from graphene-sqlalchemy-filter.

docelic avatar docelic commented on June 4, 2024

I finally got to trying this suggestion today. But I realized that the given solution is the standard way how I already implement totalCount. It works by counting objects in Python rather than using a db-level count() function.

from graphene-sqlalchemy-filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.