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

how to fix graphql query can't get full result? #849

Closed
ipsonkat opened this issue Mar 14, 2024 · 4 comments
Closed

how to fix graphql query can't get full result? #849

ipsonkat opened this issue Mar 14, 2024 · 4 comments

Comments

@ipsonkat
Copy link

when i added @searchable to a table in schema the list query will not work probably. when i use List query Photos by filtering photosCaseHistoryId, then i only get 1 record for the result but the result actually should has 2 records, and I have no set limit in query.

my schema:
type CaseHistories @model @auth(rules: [{allow: public}]) @searchable{
id: ID!
User: Users @hasone
remark: String
Case: Cases @hasone
Location: Locations @hasone
title: String
}

type Photos @model @auth(rules: [{allow: public}]) {
id: ID!
key: String!
createdOn: AWSDateTime
updatedOn: AWSDateTime
CaseHistory: CaseHistories @hasone
}

@cwoolum
Copy link

cwoolum commented May 23, 2024

I'm going to transfer this to the data team who should be able to help you

@cwoolum cwoolum transferred this issue from aws-amplify/amplify-studio May 23, 2024
@phani-srikar
Copy link
Contributor

Hi @ipsonkat, since you have a hasOne relationship b/w Photos and CaseHistories, the connected field value i.e photosCaseHistoryId should be unique. Can you share a snapshot of the records you're expecting to be returned and the query you're running?

@AnilMaktala
Copy link
Member

Hey 👋 , This issue is being closed due to inactivity. If you are still experiencing the same problem and need further assistance, please feel free to leave a comment. This will enable us to reopen the issue and provide you with the necessary support.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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

No branches or pull requests

4 participants