I am trying to make a query to get a list of participants. In GraphiQL, this works. However, on the front end with React-Native/RelayClassic, the query only returns one participants
In GraphiQL:
query getJobInfo ($sessionToken: String!, $jobId: String!) {
viewer(sessionToken: $sessionToken){
job(jobId: $jobId){
jobId
title
participants(first: 1000) {
edges {
node {
userId
firstName
lastName
profilePic
}
}
}
}
}
}
where edges returns many participants
In RelayClassic:
const RelayCompletionPeople =
Relay.createContainer(UnconnectedCompletionPeople, {
initialVariables: {
jobId: "abcd123",
},
fragments: {
viewer: () => Relay.QL`
fragment on Viewer {
job(jobId: $jobId) {
jobId
title
participants (first: 1000) {
edges {
node {
userId
firstName
lastName
profilePic
}
}
}
}
}
`
}
});
where edges returns only one participant
What it is that is causing this to happen?
Are there other places in my code that I need to look in order to return a list?
Any help would be greatly appreciated! I've been stuck on this for quite awhile.
Update:
I found the issue. There was a parent relay container that conflicted with the number of participants that could reach the completionPeople container.