@croquiscom/crary-graphql
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -58,4 +58,14 @@ "use strict"; | ||
}; | ||
const request = { document, variables: {} }; | ||
const transformed = new delegate_1.FilterToSchema(schema).transformRequest(new delegate_1.AddFragmentsByField(schema, (_a = info === null || info === void 0 ? void 0 : info.schema.extensions) === null || _a === void 0 ? void 0 : _a.stitchingInfo.fragmentsByField).transformRequest(request)); | ||
const original_request = { document, variables: {} }; | ||
const stitchingInfo = (_a = info === null || info === void 0 ? void 0 : info.schema.extensions) === null || _a === void 0 ? void 0 : _a.stitchingInfo; | ||
const transforms = [ | ||
new delegate_1.AddSelectionSets({}, stitchingInfo.selectionSetsByField, stitchingInfo.dynamicSelectionSetsByField), | ||
new delegate_1.FilterToSchema(), | ||
]; | ||
const delegation_context = { | ||
targetSchema: schema, | ||
info: info, | ||
returnType: info.returnType, | ||
}; | ||
const transformed = transforms.reduce((request, transform) => transform.transformRequest(request, delegation_context, {}), original_request); | ||
const definition = transformed.document.definitions[0]; | ||
@@ -62,0 +72,0 @@ return Object.assign(Object.assign({}, info), { fieldNodes: definition.selectionSet.selections }); |
{ | ||
"name": "@croquiscom/crary-graphql", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "Croquis's library - graphql extension", | ||
@@ -26,8 +26,8 @@ "main": "./lib", | ||
"dependencies": { | ||
"@graphql-tools/delegate": "^6.2.4", | ||
"@graphql-tools/utils": "^6.2.4", | ||
"@graphql-tools/delegate": "^7.0.6", | ||
"@graphql-tools/utils": "^7.1.0", | ||
"graphql": "^15.4.0" | ||
}, | ||
"devDependencies": { | ||
"@graphql-tools/stitch": "^6.2.4", | ||
"@graphql-tools/stitch": "^7.1.1", | ||
"@types/chai": "^4.2.14", | ||
@@ -43,3 +43,3 @@ "@types/graphql": "^14.5.0", | ||
}, | ||
"gitHead": "c229c4f7eea12370babb5448171f63ea75e07cbb" | ||
"gitHead": "12415bc17275d25abf1b745d3a32681f42b030c8" | ||
} |
@@ -8,3 +8,3 @@ [](https://badge.fury.io/js/%40croquiscom%2Fcrary-graphql) | ||
* [graphql-tools](https://github.com/apollographql/graphql-tools) | ||
* [graphql-tools](https://github.com/ardatan/graphql-tools) | ||
* [graphql-list-fields](https://github.com/jakepusateri/graphql-list-fields) | ||
@@ -11,0 +11,0 @@ * [@okgrow/graphql-scalars](https://github.com/okgrow/graphql-scalars) |
37703
804
+ Added@graphql-tools/batch-execute@7.1.2(transitive)
+ Added@graphql-tools/delegate@7.1.5(transitive)
+ Added@graphql-tools/schema@7.1.5(transitive)
+ Added@graphql-tools/utils@7.10.0(transitive)
+ Addedcamel-case@4.1.2(transitive)
+ Addedtslib@2.2.0(transitive)
+ Addedvalue-or-promise@1.0.6(transitive)
- Removed@graphql-tools/delegate@6.2.4(transitive)
- Removed@graphql-tools/schema@6.2.4(transitive)
- Removed@graphql-tools/utils@6.2.4(transitive)
- Removedcamel-case@4.1.1(transitive)
- Removedis-promise@4.0.0(transitive)
- Removedtslib@1.14.1(transitive)
Updated@graphql-tools/utils@^7.1.0