You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two query services, one is a Customer and the other is a Notes, both can be called independently, and each are underpinned with a respective REST service. However, if you execute a Customer query, you can additionally request their notes too, and this is accomplished with a Field Resolver.
Now, lets say the Customer service is working fine and dandy, but the Notes service is currently off-line....
Scenario 1
If I make a direct query to Notes, then an IError response is sent with the appropriate information and no data is available, even that the data property is returned to the consumer.
Scenario 2
I request a Customer which I also want Notes too ... but as Notes service is down, it wont be able to provide it... In this case, I want to respond with the Customer details, provide an empty Notes list, but need to inform the consumer that Notes is not available.
Can I do this with an IError response ... I can send back an error, but I don't seem to be able to populate the data property with the data I have.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have two query services, one is a Customer and the other is a Notes, both can be called independently, and each are underpinned with a respective REST service. However, if you execute a Customer query, you can additionally request their notes too, and this is accomplished with a Field Resolver.
Now, lets say the Customer service is working fine and dandy, but the Notes service is currently off-line....
Scenario 1
If I make a direct query to Notes, then an
IError
response is sent with the appropriate information and no data is available, even that the data property is returned to the consumer.Scenario 2
I request a Customer which I also want Notes too ... but as Notes service is down, it wont be able to provide it... In this case, I want to respond with the Customer details, provide an empty Notes list, but need to inform the consumer that Notes is not available.
Can I do this with an
IError
response ... I can send back an error, but I don't seem to be able to populate thedata
property with the data I have.Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions