How to fetch records based on array of ID's with graphql API
See original GitHub issueWhich Category is your question related to? API
What AWS Services are you utilizing? Cognito, AWS AppSync, graphql API
Provide additional details e.g. code snippets
I have array of todoID
how do I fetch only records matching these ID’s.
Currently I fetch everything and filter.
const allTodos = await API.graphql(graphqlOperation(listTodos));
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to get all data of array of ids in one query in graphql?
My query for Roster - query GetRoster( $startDate: DateTime! $endDate: DateTime! $wardId: String! $rosterTypeId: String! ) ...
Read more >GraphQL List - How to use arrays in GraphQL schema ...
The user query returns the User object based on the passed id. The users query then returns a list of users. We have...
Read more >GraphQL Search and Filter – How to ...
} Let's try this: type AlbumsFilters = { genre: Genre ids: [ID!] } type AlbumsInput = { filter: AlbumsFilters } type Query {...
Read more >Global Object Identification
This returns objects which conform to a "Node" interface. The id field can be extracted out of the response safely, and can be...
Read more >How to query multiple document refs in GraphQL - Help
I have the following graphQL Schema. I want to query the Decor type by multiple reference ID's. I have an array of Decor...
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
@jamesalester If the client is specifying projectIDs on the fly, you would have to either have the client issue multiple byProject() queries or have a lambda resolver as you mentioned. If the projects that you are querying are known in advance though (such as “all projects in an organization” then you could include another field in the todo table such as “organizationID” and have a GSI on that field so you could query Todos “byOrganization”
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.