Skip to content

v3.1.0

Compare
Choose a tag to compare
@nodkz nodkz released this 30 Mar 11:38
· 433 commits to master since this release

3.1.0 (2018-03-30)

Features

  • TypeComposer: add new method addNestedFields() (5e8aa6f)

This is the beginning of new graphql-compose' killer feature. For now, it just allows using dots in fields names. But in the future, it will be used for simple but very convenient Authorization.

Method addNestedFields() designed for accepting fieldnames with dots. Under the hood, it will create or reuse existed GraphQLObjectTypes. As the result, you will obtain well-nested mutations.

MutationTC.addNestedFields({
  'crm.page.create': PageTC.getResolver('createOne'),
  'crm.page.update': PageTC.getResolver('updateById'),
  'crm.page.remove': PageTC.getResolver('removeById'),

  'crm.admin.create': AdminTC.getResolver('createOne'),
  'crm.admin.update': AdminTC.getResolver('updateById'),
  'crm.admin.remove': AdminTC.getResolver('removeById'),
});

Stay tuned!