"Error Occurs When Filtering API Queries Using Owner and Input Type with Generated GraphQL Schema (schema.json, mutations.graphql, queries.graphql, fragments.graphql, subscriptions.graphql) #2884
Labels
api
pending-community-response
Issue is pending response from the issue requestor
question
General question
Before opening, please confirm:
Language and Async Model
Kotlin
Amplify Categories
GraphQL API
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
We are working on a project where the same API is used for both a web app and a mobile app. To integrate this API into the mobile app, I used AWS Amplify with the following commands to generate the necessary configurations:
This command generated the graphqlconfig.yml file along with fragments.graphql, mutations.graphql, subscriptions.graphql, and queries.graphql files. These files were then used to generate the corresponding Java classes that allow interaction with the API.
I then used these generated classes to make API requests, specifically to retrieve a list of sessions. When I make a request to retrieve the full list of sessions, it works correctly, and I receive all available sessions.
Problem:
The issue arises when I try to filter the list of sessions using an owner field and an input of type Session. Here's an example of the query I’m using to filter
Reproduction steps (if applicable)
No response
Code Snippet
``Kotlin
suspend fun getSessions(userId: String): List<ListSessionsQuery.Item>? {
val sessionFilterInput = ModelSessionFilterInput.builder()
.owner(ModelStringInput.builder().eq(userId).build())
.archived(ModelBooleanInput.builder().eq(false).build())
.build()
amplifyconfiguration.json
GraphQL Schema
i have only a schema.json file along with four GraphQL schema files: mutations.graphql, queries.graphql, fragments.graphql, and subscriptions.graphql
Additional information and screenshots
The text was updated successfully, but these errors were encountered: