-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index out of bounds when creating a relation with a stripe foreign table #519
Comments
@imor this smells like a wrappers issue/limitation. any thoughts? |
@thomtrp its worth mentioning that exposing foreign tables through APIs is not recommended and will raise a lint error in our security advisor. You can read more about why that's a risky idea in the linter docs |
@olirice Hard to say if it's @thomtrp do you see a similar error when you query the |
@imor @olirice thank you for the answers, here are additional informations:
|
@imor here is an additional information. I don't know yet if this is related:
This query is failing with the error: Checking Also, the same query on a foreign table that use Thank you! |
@thomtrp thanks for the information. Stripe's non-numeric ids are unlikely to be the cause. The fact that it works fine with |
Stripe tables do not support `hasNextPage` and `totalCount`. This may be because of stripe wrapper do not properly support `COUNT` request. Waiting on pg_graphql answer [here](supabase/pg_graphql#519). This PR: - removes `totalCount` and `hasNextPage` form queries for remote objects. Even if it works for postgres, this may really be inefficient - adapt the `fetchMore` functions so it works despite `hasNextPage` missing - remove `totalCount` display for remotes - fix `orderBy` --------- Co-authored-by: Thomas Trompette <[email protected]>
Stripe tables do not support `hasNextPage` and `totalCount`. This may be because of stripe wrapper do not properly support `COUNT` request. Waiting on pg_graphql answer [here](supabase/pg_graphql#519). This PR: - removes `totalCount` and `hasNextPage` form queries for remote objects. Even if it works for postgres, this may really be inefficient - adapt the `fetchMore` functions so it works despite `hasNextPage` missing - remove `totalCount` display for remotes - fix `orderBy` --------- Co-authored-by: Thomas Trompette <[email protected]>
Describe the bug
Hello, I am from Twenty core team. I am using stripe foreign data wrapper.
I created a foreign table
customer
(based on stripe customers) and it worked well, my data are available as expected.But I have an issue when I try to create a relationship with one of my local object using
pg_graphql
.Following the supabase doc, I tried to create a relation with my local object
favorite
. When trying to fetch the customers linked to a given favorite, it results with an error:index out of bounds: the len is 1 but the index is 18446744073709551615
To Reproduce
Steps to reproduce the behavior:
@graphql({"primary_key_columns": ["id"], "totalCount": {"enabled": true}})
customerId
field on my table favoritecustomerId
is a foreign key@graphql({"totalCount":{"enabled":true},"foreign_keys":[{"local_name":"favoriteCollection","local_columns":["customerId"],"foreign_name":"customer","foreign_schema":"my_schema","foreign_table":"customer","foreign_columns":["id"]}]})
Expected behavior
Customer object should be returned properly.
Additional context
If I add another object to fetch that would be working without customer, the query stops failing but customer is not returned:
If I add again another object to fetch, the error changes to:
index out of bounds: the len is 1 but the index is 1
The text was updated successfully, but these errors were encountered: