type instanceof GraphQLObject type is not safe
wtrocki opened this issue · comments
Wojciech Trocki commented
Checking if(type instanceof GraphQLObject)
type is not safe when having multiple packages.
Implementation should use isGraphQLType helpers from graphql schema as they are checking if the types are coming from the same package.
With multiple package structure, it will be possible that type will be created from different graphql-js instance - this will lead to graphql-toolkit failing silently - while using helpers triggers helpfull message for users to fix graphql duplicate in node modules. This is very simple fix but wanted to know opinion before PR.
This is minor issue
Arda TANRIKULU commented
Available in latest version!