5.7 KiB
5.7 KiB
master
0.0.0-semantically-released (September 12, 2016)
This package publishing automated by semantic-release. Changelog is generated automatically and can be found here: https://github.com/nodkz/graphql-compose/releases
0.0.23 (September 6, 2016)
- Update dependencies
- Update order of imported modules, due eslint warnings
- Flowtype 0.32
0.0.22 (August 25, 2016)
- Fix
Resolver.wrapResolve()overwrites original resolver in TypeComposer. Double wrapResolve does not work properly.
0.0.21 (August 25, 2016)
- Add
getProjectionMappermethod toTypeComposer. More clarified variable and type names for projection in fields.
0.0.20 (August 22, 2016)
- fix:
TypeComposer.getByPath()now can extract type fromGraphQLNonNullandGraphQLList. - fix: Maximum call stack size exceeded for schema build with cross referenced types.
- fix: checking
Resolverinstance in relations, improve error message.
0.0.19 (August 19, 2016)
- fix: Resolver now accept middlewares via options. Resolver.clone() now copy all middlewares.
0.0.18 (August 18, 2016)
- Add
Resolver.wrapResolve(resolveMW: ResolverMWResolve): Resolvermethod It will create new Resolver with wrappedresolvemethod.
const UserFindByIdRestrictedResolver = UserTC
.getResolver('findById')
.wrapResolve(next => resolveParams => {
return resolveParams.context.isAdmin
? next(resolveParams) // call internal resolver
: Promise.reject('This operation permitted only for admins.');
});
- fix: Catch error for
relationsand display it to the server stdout.- If article does not have value in
authorId, thenfindByIdresolver throws error, that not provided author id. By default this error will be caught, and client will receivenullforauthorfield. - If
catchErrors = false, then error will be passed to client.
- If article does not have value in
ArticleTC.addRelation(
'author',
() => ({
resolver: UserTC.getResolver('findById'),
args: {
_id: (source) => `${source.authorId}`,
},
projection: { authorId: true },
catchErrors: false, // true, by default
})
);
0.0.17 (August 15, 2016)
- fix: babel build via the workaround https://phabricator.babeljs.io/T2877#78089 Huh, it's too tricky to use Map/Set in ES5.
0.0.16 (August 13, 2016)
- fix: babel build process
0.0.15 (August 10, 2016)
- Update packages, add
babel-plugin-transform-runtimefor build process. Fix issue for vanilla node.js users without babel (thanks @jacobbubu).
0.0.14 (August 9, 2016)
- Added
projectionargument forTypeComposer.addFieldandTypeComposer.addField. Sometimes, when you create relations or some tricky fields, you should have a data from additional fields, that not in a query projection. E.g. for obtainingfriendListyou also should addfriendIdsto projection. Or forfullnamefield you should requestfirstnameandlastnamefrom DB. - Again was changed
TypeComposer.addRelationdeclaration. Added ability to create relations for cross imported files via an anonymous function. Also added build step for converting relations to GraphQL fields, when calling schemaBuild(). - Fix
projectionfrom AST method. Incorrectly worksProjectionMapperwithGraphQLListandConnectiontypes. - Added flow-type
ProjectionType
0.0.13 (August 8, 2016)
- Change
TypeComposer.addRelationarguments:- move
argsMappertoopts.args - add
projectiontoopts(relations may require some fields, that not described in GraphQL query)
- move
- Add projectionMapper to Types. Now
relationworks without redundantly defining additional fields.- When you create relations you need query additional fields, that not in the GraphQL query. E.g. for obtaining
friendListyou also should addfriendIdsto projection. ProjectionMapper solves this problem.
- When you create relations you need query additional fields, that not in the GraphQL query. E.g. for obtaining
0.0.11 (July 28, 2016)
- Add
getByPathmethod to TypeComposer and InputTypeComposer for obtaining deep field type.
Eg.
const recordInputTC = GQC.rootMutation().getByPath('addUser.@input.record');
const languagesTC = GQC.rootQuery().getByPath('viewer.user.languages');
const languagesTC2 = GQC.get('User').getByPath('viewer.user.languages');
const languagesTC3 = new TypeComposer(UserOutputType).getByPath('viewer.user.languages');
0.0.10 (July 21, 2016)
- Change
addRelationmethod. Now it maps arguments, and strip out provided args from field config.
0.0.9 (July 20, 2016)
- Add method
getFlatProjectionFromAST, which returns projection only for first level toInputObjectTypenow works with TypeComposer, rather than GraphQLType (if TypeComposer already has InputType, then it does not generate new one)- Clear types' fields, if they are ObjectTypes without fields.
- Rename GQC methods:
typeComposertogetsetTypetoaddhasTypetohas
0.0.8 (July 18, 2016)
- Add export of
getProjectionFromASTfunction to module - Fix peerDependencies
- Update flow-bin till 0.29
- Fix
undefinedpostfix for generated InputTypes
0.0.6 (July 15, 2016)
- feat: derive projection for resolverParams from fieldASTs
- fix: clone for Types
0.0.5 (July 08, 2016)
- ResolverMiddlewares now have access to wrapped resolver
0.0.4 (July 07, 2016)
- TypeComposer can manipulate the object type interfaces
- add ability to clone types
- exports flow annotations
- some internal improvements
0.0.3 (July 03, 2016)
- Published for playing and testing
graphql-compose-mongoose - fix call resolver function with proper arguments
0.0.2 (July 01, 2016)
- Published for playing and testing
graphql-compose-mongoose
0.0.1 (June 07, 2016)
- Initial commit with proposal