-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pagination error - Cannot read properties of undefined (reading 'fieldsByTypeName') #13
Comments
Please paste your graphql schema and query. |
Ok, i've tried to simplify things a bit more by taking out the relation mappings (getting same result): Schema:
Query:
Resolver:
Model class:
Full stack trace:
|
As you're using pagination, you need to define a type for page ( |
I'm trying a fairly straightforward example with pagination, but am running into the following error:
Cannot read properties of undefined (reading 'fieldsByTypeName')
It's failing on line 62 of
graph.ts
because in line 61tree
is being assigned totree.fieldsByTypeName[type][field]
, but field has been set to "nodes" incursor.ts
line 112, and there are no fields named "nodes" on the entity so tree is assigned undefined.I've tried instantiating
CursorPaginator
with no options, and with differenttake
andfields
optionsIf there is other useful information I can add here, please let me know.
The text was updated successfully, but these errors were encountered: