- edited description
Linking of top level schema not working if target field is a List Type
Issue #15
new
I have two schema running on two different service. Let's say Friend and Recommendation. Which roughly looks like below
type Recommendation{
ids:[int]!
}
type Query{
recommendation(someParams):Recommendation
}
type Friend{
....
}
type Query{
friends(ids[Int]):[Friend]
}
I'm stitching these two on a third service using Braid. So the ids from recommendation is passed to the second services.After schema stitching the resultant schema looks like this
recommendation(someParams):Recommendation
Recommendation -
ids:[int]!
friends:Friend
where it should look like this
Recommendation -
ids:[int]!
friends:[Friend]
After some debugging if found that the top level linking was not happening properly and hence at execution it was returning list of Friend .
I'm using the below config for stitching
namespace: "Recommendation"
complexLinks:
- sourceType: Recommendation
field: friends
targetNamespace: Friend
targetType: Friend
topLevelQueryField: friends
arguments:
- sourceName: ids
argumentSource: OBJECT_FIELD
queryArgumentName: ids
- sourceName: XYZ
argumentSource: FIELD_ARGUMENT
queryArgumentName: XYZ
Comments (4)
-
reporter -
reporter I have created a pull request for the same where I'm using the type of the top level field. https://bitbucket.org/atlassian/graphql-braid/pull-requests/119/toplevellinking/diff
-
reporter -
is there any update on that issue ^^ ?
- Log in to comment