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
Query on secondary index throws without error #2525
Comments
Debugging Appsync I uncovered the underlying error message:
|
hey👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
@kekami - we're actively working on it. We've almost gotten the fix wrapped up. |
+1 on this error, except all of my secondary index queries are throwing: // model
Friendship: a
.model({
id: a.id().required(),
receiverId: a.id().required(),
receiver: a.belongsTo("User", "receiverId"),
senderId: a.id().required(),
sender: a.belongsTo("User", "senderId"),
status: a.ref("FriendStatus").required(),
})
.authorization((allow) => [allow.publicApiKey()])
.secondaryIndexes((index) => [
index("senderId")
.name("bySender")
.sortKeys(["receiverId"])
.queryField("listFriendshipsBySenderId"),
index("receiverId")
.name("byReceiver")
.sortKeys(["senderId"])
.queryField("listFriendshipsByReceiverId"),
]) // code
const currentUser = await getCurrentUser()
const client = generateClient<Schema>()
const response = await client.models.Friendship.listFriendshipsByReceiverId({ <--- throwing error every time
receiverId: currentUser.userId,
}) I have checked if the getCurrentUser is |
We've patched this bug in the latest release of |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Environment information
Description
Created a simple reproducable schema:
When trying to query using the generated
.listProjectByUserIdAndPublishedAt
function, it throws without an error message.Example
App.tsx
The text was updated successfully, but these errors were encountered: