Skip to content

v7.15.0

Choose a tag to compare

@nodkz nodkz released this 10 May 16:42
· 140 commits to master since this release

7.15.0 (2020-05-10)

Bug Fixes

  • Interface & Union type composers on addTypeResolver now automatically add provided types to schema (b506bd5)

Features

  • add List, NonNull getters to all TypeComposers (f07ebad)

These getters help to simplify your code and make it more readable:

const UserTC = schemaComposer.createObjectTC(`type User { name: String }`);
schemaComposer.Query.addFields({
   // equivalent to SDL `users: [User!]`
-  users: { type: new ListComposer(new NonNullComposer(UserTC))}
-  users: { type: UserTC.getTypeNonNull().getTypePlural() }
+  users: { type: UserTC.NonNull.List }
});