GraphQL 制限
Every GraphQL API has its own limitations. We cannot query an arbitrarily large number of nodes because the API returns an error if the connector exceeds the maximum cost. The query cost function is directly dependent on the page sizes. The connector uses its own algorithms for finding the page sizes but also gives you the freedom to tweak them based on your needs. There are two ways you can configure this behavior:
- Specify custom page size weights by including the "other:pageSizeWeights" attribute. For example, suppose we have a "Customers" table which has two nested GraphQl connections, "businesses" and "customers". If you want a specific ratio between these two entities per query, such as 200 customers per 1 business, specify "other:pageSizeWeights=1:200" in the respective script. The advantage of this attribute is that you do not bypass our logic for finding the optimal page size based on the query cost.
- Specify custom page sizes by including the "other:pageSizes" attribute. By specifying this attribute, you bypass any check we do for query cost. Specify this attribute with caution, as you will encounter API errors if you exceed the maximum cost per query. Example: "other:pageSizeWeights=10,30", retrieves at most 10 businesses and at most 30 customers per business in one query.