I'm using Appolo and React Native to query some data. I need to get the isRestriced field from the response by using inline fragments. For every query, I only get userId without the isRestricted field.
I tried various things but couldn't figure out what's causing the issue. Not sure if the problem is with the inline fragment, but this code works in React, but in React-Native, I can't get any data except the userId.
Query:
export const GET_USER = gql`
query getUser {
loggedInUser {
userId
... on MainOrganization {
isUploadEnabled
organization {
isRestricted
}
}
}
`;`
Response
userId: "123-456-789-123-42ade233"
__typename: "User"
package.json
"@apollo/client": "^3.3.12",
"react-native": "0.63.4",
"graphql": "^15.5.0",
"graphql-tag": "^2.10.3",