-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Stripe wrapper only allows fetching first 100 objects #521
Comments
pg_graphql doesn't do any unique handling of foreign data wrappers. It treats them identically to tables so its unlikely that we'll be able to resolve your issue in this repo. Its possibly you're hitting something like this supabase/wrappers#113 please also note that putting a foreign data wrapper directly on your API's search path is not recommended |
In case it helps create a reproducible example, the underlying SQL that your query gets compiled to would be roughly (
with __records as (
select
*
from
<your fdw>
where
true
order by
<value>
limit
<value>
offset
<value>
),
__total_count(___total_count) as (
select
count(*)
from
<your fdw>
where
true
),
select
jsonb_build_object('id', id)
from
__records foo,
__total_count
) |
closing as not relevant to this repo |
Describe the bug
When performing
pg_graphql
queries on a foreign table imported by thestripe_fdw
, I cannot fetch more than the first 100 items. Checking the foreign table, I can see I have more items to fetch.Using raw sql query works well. Trying with the
postgres_fdw
works also well.Only
stripe_fdw
combinated withpg_graphql
seems to have this limit.To Reproduce
Steps to reproduce the behavior:
stripe_fdw
, create a foreign table based on stripe API. For my example, I will use the object customers.after: <last_cursor>
incustomerCollection
query params. I got only 40 items this time.last_cursor
. I got an empty answer while I have 165 items in my table.{"data": {"customerCollection": {"edges": [], "pageInfo": {"endCursor": null, "__typename": "PageInfo", "startCursor": null}, "__typename": "customerConnection"}}}
Expected behavior
I should be able to fetch my 165 customers and not only the first 100.
Additional context
I already opened an issue related with
stripe_fdw
andpg_graphql
limitations for stripe foreign table relations.The text was updated successfully, but these errors were encountered: