Query Limit does not work properly with API GraphQL
See original GitHub issueNote: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker
Describe the bug I try to get X elements from AppSync with query Limit but it does not work properly.
Amplify CLI Version 4.18.1
To Reproduce Schema.graphql
type InventoryRoom
@model
@auth(rules: [
{ allow: private, operations: [read] }
{ allow: groups, groups: ["admin"] }
])
{
id: ID!
name: String
items: [InventoryItem] @connection(keyName: "byRoom", fields: ["id"])
}
type InventoryItem
@model
@key(name: "byRoom", fields: ["roomID"])
@auth(rules: [
{ allow: private, operations: [read] }
{ allow: groups, groups: ["admin"] }
])
{
id: ID!
name: String!
volume: Int!
imageKey: String
imageIdentityId: String
roomID: ID!
room: InventoryRoom! @connection(fields: ["roomID"])
}
Expected behavior I except to receive 5 items if I enter limit: 5
Screenshots
Limit 5: got 2
Limit 10: got 3
Limit 500: to list all
Desktop (please complete the following information):
- OS: Windows 10 Pro
- Node Version. v12.16.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Securing GraphQL API endpoints using rate limits and depth ...
See how to secure your GraphQL API endpoints to prevent API spam and query attacks with rate and depth limiting.
Read more >Rate limitations are preventing my query - FAQs - GraphQL API
I am using the Monday API to extract data from 1 board! The problem I am having is that this board, whilst it...
Read more >How to use graphQL limit in aws amplify - Stack Overflow
Consider adding a GSI so that you can query instead of Scan / Filter. Hacks to accumulate the pages of results inside Lambda...
Read more >Five Common Problems in GraphQL Apps (And How to Fix ...
There is a solution though, which is to cache the entire GraphQL query response. Unlike Dataloader, whose scope is limited to the current ......
Read more >API (GraphQL) - Fetch data - JavaScript - AWS Amplify Docs
The API category provides a GraphQL client for working with queries, mutations, and subscriptions. Query Declarations. The Amplify CLI codegen automatically ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Issues on Amplify are almost always left behind, people are asking questions here so why nobody answered? Why there is no link to some doc or somewhere with an explanation? Why is this issue closed? @edeuxk @alxistn asked great questions and I also didn’t get why Dynamo works that way in this case. @yuth
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.