Comments (3)
id will be converted to graphql node id
graphene-sqllachemy does this, not graphene-sqllachemy-filter.
In my projects I do like this:
class ArticleFilter(FilterSet):
class Meta:
model = Article
fields = {'id': [...]}
class InternalID(graphene.Interface):
internal_id = graphene.Int(required=True)
def resolve_internal_id(self, info):
return self.id
class ArticleNode(SQLAlchemyObjectType):
class Meta:
model = Article
interfaces = (graphene.relay.Node, InternalID)
connection_field_factory = MyFilterableConnectionField.factory
from graphene-sqlalchemy-filter.
I managed to fix this by using a static custom filter.
@staticmethod
def db_id_filter(info, query, value):
return SomeModel.id == value
from graphene-sqlalchemy-filter.
Since we have an easy work around here, I don't really want to implement this feature considering that we don't usually create synonyms for everything. Closing this issue for now.
from graphene-sqlalchemy-filter.
Related Issues (20)
- to calculate avg HOT 1
- Auto define all filters for all fields via Ellipsis HOT 1
- ambiguous column exception in _get_query in connection_field.py HOT 1
- FilterSet.aliased no longer works with SQLAlchemy 1.4 HOT 1
- Error for nested filtered connection fields that are Sets HOT 1
- ModuleNotFoundError: No module named 'sqlalchemy.ext.declarative.clsregistry' HOT 1
- How to you filter many to many table? HOT 2
- How to do multiple level joins HOT 1
- Complex filter - generating incorrect SQL Query HOT 1
- impliment custom resolver together with filters or a must call method HOT 1
- Trying to generate CustomField.Factory for nested filters
- Several join filters with the same table HOT 1
- graphene v3 breaks graphene-sqlalchemy-filter HOT 1
- Intercept nested queries to add default filters
- Filter Error When DB column is named `id` but aliased to something else HOT 2
- Post processing, override relationship result.
- Edge case bug while using FilterableConnectionField within a Union Connection
- Filter across a join without using a filter function HOT 2
- Should support graphene-sqlalchemy version 3 HOT 2
- Fix RemovedIn20Warning
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphene-sqlalchemy-filter.