how to Join with get_query
See original GitHub issueJust trying to filter on a field from a foreign table.
This doesn’t seem to work
def resolve_articles(self, args, context, info):
query = Article.get_query(context)
authorName = args.get('authorName')
return query.join(Author).filter(Author.name == authorName)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Joins | Dynamic Queries | Drupal Wiki guide on Drupal.org
Joins. To join against another table, use the join(), innerJoin(), leftJoin(), or addJoin() methods, like so:
Read more >Doctrine query builder using inner join with conditions
I'm going to answer my own question. innerJoin should use the keyword "WITH" instead of "ON" (Doctrine's documentation [13.2.6.
Read more >8 - entityQuery to get Nodes referenced by other nodes like an ...
Playing around with the raw SQL, what I basically need to do is an INNER JOIN or LEFT JOIN with the field field_detail_page_article_ref...
Read more >Select using Query Builder - typeorm - GitBook
Each select can have its own alias, you can select from multiple tables each with its own alias, you can join multiple tables...
Read more >Selecting data using JDatabase - Joomla! Documentation
$query = $db->getQuery(true); // Select all records from the user profile ... Using the JDatabaseQuery's join methods, we can select records ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey sorry for delay, but it’s been a while since I used sqlalchemy so needed a quick refresh. You don’t need to subclass a connection field instead use a standard one with a custom resolver.
You can file complete files I’ve used to test here: https://gist.github.com/earlgreyz/bcbb9dc1b1e0618fe96125cd57b563a0
@zhanibekshynarbek the problem is that when using
add_columnsyou get a tuple withArticleModelobject and anauthor_namestring. I came up with a rather dirty solution but you may be able to make something nice out of this: