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 was looking at the code to fix an issue in graphql-compose-mongoose and noticed that the return type for ObjectTypeComposer.getRelations is possibly wrong.
It is currently defined as ObjectTypeComposerRelationThunkMap, but nowhere in the code I can see that ObjectTypeComposer. _gqcRelations (which has the same type) gets thunks added. I think that It should be a normal map of relationName => options.
I could be of course mistaken, but I checked all usages of _gqcRelations and didn't see any thunk related code. I see that fields have a proxy/thunk thing going on but that never touches relations I think.
@danez yep, you are right! 👍
I fixed it by myself for speeding up PR for graphql-compose-mongoose.
A new GC package will be published in a couple of minutes.
I was looking at the code to fix an issue in
graphql-compose-mongoose
and noticed that the return type forObjectTypeComposer.getRelations
is possibly wrong.It is currently defined as
ObjectTypeComposerRelationThunkMap
, but nowhere in the code I can see thatObjectTypeComposer. _gqcRelations
(which has the same type) gets thunks added. I think that It should be a normal map ofrelationName => options
.I could be of course mistaken, but I checked all usages of
_gqcRelations
and didn't see any thunk related code. I see that fields have a proxy/thunk thing going on but that never touches relations I think.I can create a PR if someone can confirm this.
https://github.com/graphql-compose/graphql-compose/blob/master/src/ObjectTypeComposer.js#L1710
https://github.com/graphql-compose/graphql-compose/blob/master/src/ObjectTypeComposer.js#L215
The text was updated successfully, but these errors were encountered: