Getting More Data#
Click for Interactive Documentation
Clicking this button will enable editing and execution of the code-blocks on this page. Learn more here.
By default, subgraphs will emit only 100 rows for a given entity. In order to surface more data from an entity, you must leverage field arguments, specifically the
first argument. This specifies how many entities you wish to retrieve from that specific entity.
from subgrounds import Subgrounds
with Subgrounds() as sg:
curve = sg.load_subgraph(
It is possible to query more than a 100 rows worth of data without specifying a
first argument by using nested fields. Essentially, you would be querying multiple rows for each row as
subgrounds would paginated the nested field and then auto-flatten said field.
Subgraphs and GraphQL usually restrict you to a maximum
first argument of
subgrounds, you can specify as large as a number as you want as
subgrounds will automatically create multiple, paginated, requests to retrieve more data. This means you'll be able to access all the data from an entity by just setting the
first argument to a high-enough number!