Trying out a federation with two external endpoint services #196
Unanswered
shamin2021
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have two sub graphs as separate services running on two endpoints
For these services I have cloned and upped the two services in the popular Federation Example DGS [https://github.com/Netflix/dgs-federation-example]
In my simple federated gateway creation using orchestrator I have created two service provider classes for the two services
1.Show
2.Review
I have implemented a simple webclientqueryexecutor as well as follows
In my implementation then i stitched the two services and called a query as follows
the query gets executed in the first level properly fetching the required typename and key from the parentType
Response: {data={getPersons=[{lastName=Stark, firstName=Tony}, {lastName=Wayne, firstName=Bruce}, {lastName=Parker, firstName=Peter}]}}
but when requesting the second graphs data by using the typeName and entities it throws the following error
Response: {errors=[{message=Variable 'REPRESENTATIONS' has an invalid value: Variable 'REPRESENTATIONS' has coerced Null value for NonNull type '[_Any!]!', locations=[{line=1, column=8}], extensions={classification=ValidationError}}]}
Can you please let me know if there is a workaround to this , a will attach a link that i found regarding this issue in dgs as well for your reference Netflix/dgs-framework#1058
thankyou
Beta Was this translation helpful? Give feedback.
All reactions