apollo-test-utils
Advanced tools
Comparing version 0.1.1 to 0.1.2
# Change log | ||
# 0.1.1 | ||
- Update dependencies | ||
# v0.1.0 | ||
Initial release. We didn't track changes before this version. |
@@ -13,3 +13,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var printer_1 = require("graphql-tag/printer"); | ||
var bundledPrinter_1 = require("graphql-tag/bundledPrinter"); | ||
function mockNetworkInterface() { | ||
@@ -67,3 +67,3 @@ var mockedResponses = []; | ||
if (!responses || responses.length === 0) { | ||
throw new Error("No more mocked responses for the query: " + printer_1.print(request.query) + ", variables: " + JSON.stringify(request.variables)); | ||
throw new Error("No more mocked responses for the query: " + bundledPrinter_1.print(request.query) + ", variables: " + JSON.stringify(request.variables)); | ||
} | ||
@@ -142,3 +142,3 @@ var _a = responses.shift(), result = _a.result, error = _a.error, delay = _a.delay; | ||
throw new Error("No more mocked subscription responses for the query: " + | ||
(printer_1.print(subscription.request.query) + ", variables: " + JSON.stringify(subscription.request.variables))); | ||
(bundledPrinter_1.print(subscription.request.query) + ", variables: " + JSON.stringify(subscription.request.variables))); | ||
} | ||
@@ -177,3 +177,3 @@ var response_1 = subscription.results.shift(); | ||
function requestToKey(request) { | ||
var queryString = request.query && printer_1.print(request.query); | ||
var queryString = request.query && bundledPrinter_1.print(request.query); | ||
return JSON.stringify({ | ||
@@ -180,0 +180,0 @@ variables: request.variables || {}, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var graphql_1 = require("graphql"); | ||
var printer_1 = require("graphql-tag/printer"); | ||
var bundledPrinter_1 = require("graphql-tag/bundledPrinter"); | ||
function mockNetworkInterfaceWithSchema(options) { | ||
return { | ||
query: function (request) { | ||
return graphql_1.graphql(options.schema, printer_1.print(request.query), {}, {}, request.variables, request.operationName); | ||
return graphql_1.graphql(options.schema, bundledPrinter_1.print(request.query), {}, {}, request.variables, request.operationName); | ||
}, | ||
@@ -10,0 +10,0 @@ }; |
{ | ||
"name": "apollo-test-utils", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
@@ -14,3 +14,3 @@ "author": "Kamil Kisiela <kamil.kisiela@gmail.com>", | ||
"type": "git", | ||
"url": "git+https://github.com/apollostack/apollo-test-utils.git" | ||
"url": "git+https://github.com/apollographql/apollo-test-utils.git" | ||
}, | ||
@@ -39,3 +39,3 @@ "bugs": { | ||
"peerDependencies": { | ||
"apollo-client": "^0.9.0" | ||
"apollo-client": "^0.9.0 || ^0.10.0" | ||
}, | ||
@@ -49,3 +49,3 @@ "devDependencies": { | ||
"graphql": "^0.9.1", | ||
"graphql-tag": "^1.2.4", | ||
"graphql-tag": "^1.3.1", | ||
"graphql-tools": "^0.10.0", | ||
@@ -52,0 +52,0 @@ "istanbul": "^0.4.4", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21020