Skip to content

Provides some additional functionality on top of graphene-mongo

License

Notifications You must be signed in to change notification settings

riverfr0zen/graphene-mongo-extras

Repository files navigation

This project is in a very early state. It achieves the core functionality below, but is missing niceties such as configuration options.

Better docs will come later. For now, please see the tests:

See the examples folder for a demo app and query examples.

Overview / Todo-list

Filtering Field

  • Filter using Mongoengine query operators
  • Provide the correct query operators in GraphQL for each field type
  • Nested filtering with AND/OR logic for filter sets
  • Ordering of results
  • Configure filtering field
    • depth
    • exclude fields
    • include fields
  • Support list of embedded fields
  • Examine compatibility with various fields
  • Support reference fields and list of reference fields

Interfaces

  • a way to set up interfaces (MongoNodeInterface)
  • use interfaces with list fields
  • use interfaces with connection fields (InterfaceConnectionField)
  • See example app

Misc:

  • total count in ConnectionField graphql queries (CountableConnectionBase)

Mutation support

  • MongoengineInputObjectType
    • An InputObjectType that derives from an assigned model

Changelog

0.7.0

  • Improved implementing interfaces. It is no longer necessary to create a separate graphene.Connection subclass. Now you use IntefaceConnectionField and pass in your MongoNodeInterface subclass directly.
    • NOTE: If you are doing it the old way, this may be a breaking change (haven't tested). In any case, it is recommended you switch to the new way.
  • FilteringField is now a subclass of InterfaceConnectionField. Shouldn't change anything except now it supports interface implementation as indicated above.

0.6.0

  • Dependencies updated
  • Support camel case params in orderBy

0.5.0

  • MongoengineInterface now extends graphene.Node and renamed to MongoNodeInterface.
  • Added example app showing the use of interfaces with list fields or connections.

0.4.0

  • Filtering
    • Fixed required fields generating required filters (issue 2)

0.3.0

  • Filtering
    • List of EmbeddedDocumentFields now supported issue
  • Moved examples from separate repo into examples folder in this repo

0.2.0

  • MongoengineExtrasType added to support new Meta config options (in-lieu of MongoengineObjectType)
  • Filtering
    • Depth and excluded fields can now be configured

0.1.0

  • Initial

About

Provides some additional functionality on top of graphene-mongo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages