SupabaseS
Supabase2y ago
loup

Apollo Client Graphql : limit to one row relation one-to-many

Okay there is the problem, I wanna know if when requesting table which as a relation with another one in one-to-many, its was possible to get data a single rows without edges and node sub folder ? Like a one-to-one relation ? Because Im using the second table for translation so I just need one translation for a specific language...

For example, I have the table tmdb_movie which contain the movie id only, and another table tmdb_movie_translation which contain the language and the movie_id and the title (in right language).
I have this kind of resposne right now :
"movie": {
                            "id": "545611",
                            "data": {
                                "edges": [
                                    {
                                        "node": {
                                            "id": "1781950",
                                            "title": "Everything Everywhere All at Once",
                                            "__typename": "tmdb_movie_translation"
                                        },
                                        "__typename": "tmdb_movie_translationEdge"
                                    }
                                ],
                                "__typename": "tmdb_movie_translationConnection"
                            },
                            "__typename": "tmdb_movie",
                            "backdrop_path": "/fIwiFha3WPu5nHkBeMQ4GzEk0Hv.jpg",
                            "original_title": "Everything Everywhere All at Once",
                            "original_language": "en"
                        },
Was this page helpful?