Hi,
So i have this query
query u($b: [ID!]){
queryProduct {
id
name
isSoldBy(filter: {id: $b}) {
__typename
}
size
}
}
This works locally on my dgraph image 20.04 standalone image. When I run the same on slash graphql it fails.
{"data":{"queryProduct":[null]},"errors":[{"locations":[{"column":11,"line":5}],"message":"Non-nullable field 'isSoldBy' (type Account!) was not present in result from Dgraph. GraphQL error propagation triggered.","path":["queryProduct",0,"isSoldBy"]}]}
Schema
type Product implements Node
@auth(
add: { and: [
{ rule: "{ $isAuthenticated: { eq: \"True\" } }" },
{ rule: "{ $role: { eq: \"USER\" } }"},
{ rule: """
query($email: String!) {
queryProduct {
user(filter: { username: { eq: $email}}) {
username
}
}
}
"""
},
]},
query: { and: [
{ rule: "{ $isAuthenticated: { eq: \"True\" } }" },
{ rule: "{ $role: { eq: \"USER\" } }"},
{ rule: """
query($email: String!) {
queryProduct {
user(filter: { username: { eq: $email}}) {
username
}
}
}
"""
},
]},
update: { and: [
{ rule: "{ $isAuthenticated: { eq: \"True\" } }" },
{ rule: "{ $role: { eq: \"USER\" } }"},
{ rule: """
query($email: String!) {
queryProduct {
user(filter: { username: { eq: $email}}) {
username
}
}
}
"""
},
]},
delete: { and: [
{ rule: "{ $isAuthenticated: { eq: \"True\" } }" },
{ rule: "{ $role: { eq: \"USER\" } }"},
{ rule: """query($email: String!) {
queryProduct {
user(filter: { username: { eq: $email}}) {
username
}
}
}
"""
},
]},
)
{
name: String! @search(by: [fulltext])
size: String! @search
user: User!
isSoldBy: Account! @hasInverse(field: products)
}
}