diff --git a/CHANGELOG.md b/CHANGELOG.md index b2c73e0..79ec472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +1.2.0 / 2018-05-08 +================== + + * Feature: Functional helpers for conditional resolvers (#25, @rynobax) + 1.1.0 / 2018-02-22 ================== diff --git a/README.md b/README.md index 2c89a45..1551d31 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ const resolvers = combineResolvers([ export default resolvers; ``` -Conditional resovlers: +Conditional resolvers: ```javascript import { and, or } from 'apollo-resolvers'; diff --git a/dist/context.js.map b/dist/context.js.map index ad30cef..a0aa1eb 100644 --- a/dist/context.js.map +++ b/dist/context.js.map @@ -1 +1 @@ -{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAIhC,CAAC;AACW,QAAA,oBAAoB,GAAG,CAAC,IAAI,EAAE,GAAG;IAC5C,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC;IAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACR,MAAM,CAAC,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,EAAE,oFAAoF,CAAC,CAAC;QAC7H,gEAAgE;QAChE,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,OAAO,IAAI,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAClF,CAAC;IACD,MAAM,CAAC,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;IAGE,YAAa,IAAiB;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,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AO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;IAGE,YAAa,IAAiB;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,sEAAsE;QACtE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3F,CAAC;CACF;AAhBD,0BAgBC"} \ No newline at end of file diff --git a/dist/helper.js b/dist/helper.js index 41cf1f1..c8c136e 100644 --- a/dist/helper.js +++ b/dist/helper.js @@ -4,11 +4,15 @@ const merge = require("deepmerge"); // Helper function to combine multiple resolver definition hashes into a single hash for consumption by Apollostack's graphql-server exports.combineResolvers = (resolvers = []) => resolvers .reduce((combined, resolver) => merge(combined, resolver)); +// Accepts multiple authentication resolvers and returns a function which will be called +// if all of the authentication resolvers succeed, or throw an error if one of them fails exports.and = (...conditions) => resolver => { return conditions.reduceRight((p, c) => { return c.createResolver(p); }, resolver); }; +// Accepts multiple authentication resolvers and returns a function which will be called +// if any of the authentication resolvers succeed, or throw an error if all of them fail exports.or = (...conditions) => resolver => (...query) => { return new Promise((resolve, reject) => { let limit = conditions.length - 1; diff --git a/dist/helper.js.map b/dist/helper.js.map index f015f52..6602270 100644 --- a/dist/helper.js.map +++ b/dist/helper.js.map @@ -1 +1 @@ -{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";;AAAA,mCAAmC;AAEnC,oIAAoI;AACvH,QAAA,gBAAgB,GAAG,CAAC,SAAS,GAAG,EAAE,KAAK,SAAS;KAC1D,MAAM,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEhD,QAAA,GAAG,GAAG,CAAC,GAAG,UAAU,KAAK,QAAQ;IAC5C,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC,EAAE,QAAQ,CAAC,CAAA;AACd,CAAC,CAAA;AAEY,QAAA,EAAE,GAAG,CAAC,GAAG,UAAU,KAAK,QAAQ,IAAI,CAAC,GAAG,KAAK;IACxD,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;QACjC,IAAI,KAAK,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,CAAC,CAAC,KAChB,UAAU,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC;aAC7C,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;aACzB,KAAK,CAAC,GAAG;YACR,EAAE,CAAA,CAAC,CAAC,KAAK,KAAK,CAAC;gBAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC5B,IAAI;gBAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACP,OAAO,CAAC,CAAC,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"helper.js","sourceRoot":"","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C;IACb,CAAC,CAAC,CAAC;AACL,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/promise.js.map b/dist/promise.js.map index 647345e..164c5ba 100644 --- a/dist/promise.js.map +++ b/dist/promise.js.map @@ -1 +1 @@ -{"version":3,"file":"promise.js","sourceRoot":"","sources":["../src/promise.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,gGAAgG;AAChG,IAAI,CAAC,GAAG,OAAO,CAAC;AAEhB,4CAA4C;AAC/B,QAAA,UAAU,GAAG,IAAI;IAC5B,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE,0DAA0D,CAAC,CAAC;IAC3F,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,oGAAoG,CAAC,CAAC;IAC7H,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,mGAAmG,CAAC,CAAC;IAC3H,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,gGAAgG,CAAC,CAAC;IACrH,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,uHAAuH,CAAC,CAAC;IACvJ,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,wHAAwH,CAAC,CAAC;IACzJ,CAAC,GAAG,IAAI,CAAC;AACX,CAAC,CAAC;AAEF,4CAA4C;AAC/B,QAAA,UAAU,GAAG,MAAM,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"promise.js","sourceRoot":"","sources":["../src/promise.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,gGAAgG;AAChG,IAAI,CAAC,GAAG,OAAO,CAAC;AAEhB,4CAA4C;AAC/B,QAAA,UAAU,GAAG,IAAI,CAAC,EAAE;IAC/B,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE,0DAA0D,CAAC,CAAC;IAC3F,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,oGAAoG,CAAC,CAAC;IAC7H,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,mGAAmG,CAAC,CAAC;IAC3H,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,gGAAgG,CAAC,CAAC;IACrH,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,uHAAuH,CAAC,CAAC;IACvJ,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,wHAAwH,CAAC,CAAC;IACzJ,CAAC,GAAG,IAAI,CAAC;AACX,CAAC,CAAC;AAEF,4CAA4C;AAC/B,QAAA,UAAU,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/resolver.js.map b/dist/resolver.js.map index b14dbf1..c8c9729 100644 --- a/dist/resolver.js.map +++ b/dist/resolver.js.map @@ -1 +1 @@ -{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":";;AAAA,uCAAuC;AACvC,iCAAqE;AAGxD,QAAA,cAAc,GAAG,CAAC,KAAK,EAAE,KAAK;IACzC,MAAM,OAAO,GAAG,oBAAU,EAAE,CAAC;IAC7B,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE;QACjD,wFAAwF;QACxF,EAAE,CAAC,CAAC,CAAC,iBAAU,CAAC,KAAK,CAAC,CAAC;YAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,CAAC,gBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;YAClD,kFAAkF;YAClF,EAAE,CAAC,CAAC,CAAC,iBAAU,CAAC,KAAK,CAAC,CAAC;gBAAC,MAAM,CAAC,CAAC;YAChC,0BAA0B;YAC1B,MAAM,C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AI,CAAC,CAAC;YAC7F,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;YAC9C,sEAAsE;YACtE,MAAM,KAAK,GAAG,iBAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAEvG,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gBACpB,yCAAyC;gBACzC,IAAI,2BAAoB,CAAC,CAAC,CAAC;oBAAE,MAAM,CAAC,CAAC;gBACrC,0DAA0D;gBAC1D,OAAO,iBAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;oBAC7E,kEAAkE;oBAClE,MAAM,CAAC,IAAI,GAAG,CAAC;gBACjB,CAAC,EAAE,CAAC,CAAC,EAAE;oBACL,iEAAiE;oBACjE,MAAM,CAAC,IAAI,GAAG,CAAC;gBACjB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,0CAA0C;QAC1C,OAAO,sBAAc,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAChD,CAAC,CAAA;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/util.js.map b/dist/util.js.map index b3dfbe9..d1a4263 100644 --- a/dist/util.js.map +++ b/dist/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.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C,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3E;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;SAClB;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEW,QAAA,oBAAoB,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 717ff93..1f78108 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apollo-resolvers", - "version": "1.1.0", + "version": "1.2.0", "description": "Expressive and composable resolvers for Apollostack's GraphQL server Edit", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -48,6 +48,7 @@ "rimraf": "^2.5.4", "sinon": "^1.17.7", "supertest": "^3.0.0", + "typescript": "^2.8.3", "typings": "^2.1.1" } }