Skip to content
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

Developer and user help around maxResults/defaultFetchSize/defaultPageLimitSize #238

Open
molexx opened this issue Jan 30, 2020 · 3 comments
Labels

Comments

@molexx
Copy link
Contributor

molexx commented Jan 30, 2020

  • Please can defaultMaxResults, defaultFetchSize and defaultPageLimitSize be documented - it's a bit confusing working out the differences between them.

  • if defaultPageLimitSize is greater than defaultMaxResults, defaultMaxResults is used. Maybe defaultMaxResults should be raised to match defaultPageLimitSize if it is greater?

  • Please note a breaking change in the changelog as now by default results will be restricted to 100, whether the query includes paging or not.

  • Is there a way to notify the caller that their requested page {limit} has been ignored because it is over the defaultPageLimitSize? Or if they did not specify paging that their results are restricted by the default? I'm not sure about creating an item in the errors array for it but there doesn't seem to be a place for warnings.

@igdianov
Copy link
Collaborator

@molexx Good points. The rationale for applying defaultMaxResults to override user specified page limit size is to provide a circuit breaker in case the user want to retrieve unreasonable number of records that may result in OoM.

The defaultPageLimitSize is applied if the user does not specify page size for backward compatibility.

I think it may be a good idea to provide warnings in the errors to notify the user about limits.

At the moment defaultLimitSize and defaultPageSize are set to 100.

@molexx
Copy link
Contributor Author

molexx commented Feb 3, 2020

Makes sense, thanks.

What about defaultFetchSize?

Also, what happens when multiple schemas are stitched together by GraphQLSchemaRegistration? Does each one keep its own limits or are they merged somehow?

@hump
Copy link

hump commented Feb 18, 2020

Can the user/developer change these default ofs 100 in his application?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants