@shopify/cypress-graphql
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -6,6 +6,14 @@ "use strict"; | ||
var body = req.body; | ||
return ( | ||
// Standard use case - operationName is included in the req body | ||
/* eslint-disable-next-line no-prototype-builtins */ | ||
body.hasOwnProperty('operationName') && body.operationName === operationName); | ||
if (body.hasOwnProperty('operationName')) { | ||
return body.operationName === operationName; | ||
} | ||
// Edge case - some packages include API calls that don't - so check the query body instead | ||
/* eslint-disable-next-line no-prototype-builtins */ | ||
if (body.hasOwnProperty('query')) { | ||
return body.query.includes(operationName); | ||
} | ||
return false; | ||
}; | ||
exports.hasOperationName = hasOperationName; |
{ | ||
"name": "@shopify/cypress-graphql", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Cypress commands for stubbing, intercepting and testing graphql endpoints", |
@@ -20,3 +20,3 @@ # `@shopify/cypress-graphql` | ||
``` | ||
import '@shopify/cypress-graphql | ||
import '@shopify/cypress-graphql'; | ||
``` | ||
@@ -23,0 +23,0 @@ |
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
12026
135