Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnionTypeComposer.getType().getTypes() not working #167

Closed
stefanprobst opened this issue Feb 6, 2019 · 5 comments
Closed

UnionTypeComposer.getType().getTypes() not working #167

stefanprobst opened this issue Feb 6, 2019 · 5 comments
Labels

Comments

@stefanprobst
Copy link
Collaborator

Calling SomeUTC.getTypes() works as expected, but SomeUTC.getType().getTypes() does not, seems necessary to call SomeUTC.getType().getTypes()(). Haven't quite figured out yet where this is happening.

@nodkz
Copy link
Member

nodkz commented Feb 7, 2019

Very strange, needs code demo or test case

@stefanprobst
Copy link
Collaborator Author

Ok, this seems to only happen with graphql@0.13, something changed concerning gqType._types, will investigate. You can check with:

const { TypeComposer, UnionTypeComposer } = require('graphql-compose')
const Foo = TypeComposer.create('type Foo { foo: String }')
const Bar = TypeComposer.create('type Bar { bar: String }')
const Union = UnionTypeComposer.create('Union')
Union.setTypes([Foo, Bar])

// graphql@14
console.log(Union.getType().getTypes())

// graphql@0.13
// console.log(Union.getType().getTypes()())

@stefanprobst
Copy link
Collaborator Author

@nodkz
Copy link
Member

nodkz commented Feb 7, 2019

Thanks for the investigation. I'll try to fix this today at evening.

@nodkz nodkz closed this as completed in d7366e0 Feb 7, 2019
@nodkz
Copy link
Member

nodkz commented Feb 7, 2019

🎉 This issue has been resolved in version 5.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nodkz nodkz added the released label Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants