github graphql-compose/graphql-compose v7.15.0

latest releases: v9.0.10, v9.0.9, v9.0.8...
3 years ago

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 }
});

Don't miss a new graphql-compose release

NewReleases is sending notifications on new releases.