I have a graphql schema in aws-amplify, appsync.
my schema is:
type Project
@model
{
id: ID!
project_number: String!
name: String!
architect: String!
interfaces: [Interface] @connection(name: "ProjectInterfaces")
}
type Interface
@model
{
id: ID!
interface_name: String!
version: String!
release: String!
source_feature: String!
MFT_feature_id: String!
state: String!
source_application: String!
source_env: String!
source_go_live: String!
source_payload: String!
source_payload_format: String!
source_payload_volume: String!
source_protocol: String!
target_application: String!
target_env: String!
target_go_live: String!
target_payload: String!
target_payload_format: String!
target_payload_volume: String!
target_protocol: String!
frequency: String!
authentication: String!
payload_security: String!
transport_security: String!
network_paths: String!
project: Project @connection(name: "ProjectInterfaces")
}
and I want to know if I can search a projects interfaces by project_number instead of id. I added an index on project_name, but it doesn't seem to work. My current query is
query GetProject {
getProject(project_number:"P200") {
name
architect
interfaces{
items{
interface_name
version
release
source_feature
MFT_feature_id
state
source_application
source_env
source_go_live
source_payload
source_payload_format
source_payload_volume
source_protocol
target_application
target_env
target_go_live
target_payload
target_payload_format
target_payload_volume
target_protocol
frequency
authentication
payload_security
transport_security
network_paths
}
}
}
}
Please let me know if this is possible. I would like it so that I can just search by project_name, and then get all the details from interface.