@pothos/plugin-relay
Advanced tools
Comparing version 3.35.0 to 3.36.0
# Change Log | ||
## 3.36.0 | ||
### Minor Changes | ||
- d60cb49e: handle string contining ':' in global ID | ||
## 3.35.0 | ||
@@ -4,0 +10,0 @@ |
@@ -6,3 +6,4 @@ import { decodeBase64, encodeBase64, PothosValidationError } from '@pothos/core'; | ||
export function decodeGlobalID(globalID) { | ||
const [typename, id] = decodeBase64(globalID).split(":"); | ||
const decoded = decodeBase64(globalID).split(":"); | ||
const [typename, id] = decoded; | ||
if (!typename || !id) { | ||
@@ -13,5 +14,5 @@ throw new PothosValidationError(`Invalid global ID: ${globalID}`); | ||
typename, | ||
id | ||
id: decoded.length > 2 ? decoded.slice(1).join(":") : id | ||
}; | ||
} | ||
//# sourceMappingURL=global-ids.js.map |
@@ -20,3 +20,4 @@ "use strict"; | ||
function decodeGlobalID(globalID) { | ||
const [typename, id] = (0, _core.decodeBase64)(globalID).split(':'); | ||
const decoded = (0, _core.decodeBase64)(globalID).split(':'); | ||
const [typename, id] = decoded; | ||
if (!typename || !id) { | ||
@@ -27,3 +28,3 @@ throw new _core.PothosValidationError(`Invalid global ID: ${globalID}`); | ||
typename, | ||
id | ||
id: decoded.length > 2 ? decoded.slice(1).join(':') : id | ||
}; | ||
@@ -30,0 +31,0 @@ } |
{ | ||
"name": "@pothos/plugin-relay", | ||
"version": "3.35.0", | ||
"version": "3.36.0", | ||
"description": "A Pothos plugin for adding relay style connections, nodes, and cursor based pagination to your GraphQL schema", | ||
@@ -46,3 +46,3 @@ "main": "./lib/index.js", | ||
"graphql-tag": "^2.12.6", | ||
"@pothos/core": "3.25.0", | ||
"@pothos/core": "3.27.0", | ||
"@pothos/plugin-complexity": "3.12.0", | ||
@@ -49,0 +49,0 @@ "@pothos/test-utils": "1.4.7" |
@@ -8,3 +8,4 @@ import { decodeBase64, encodeBase64, PothosValidationError } from '@pothos/core'; | ||
export function decodeGlobalID(globalID: string) { | ||
const [typename, id] = decodeBase64(globalID).split(':'); | ||
const decoded = decodeBase64(globalID).split(':'); | ||
const [typename, id] = decoded; | ||
@@ -15,3 +16,3 @@ if (!typename || !id) { | ||
return { typename, id }; | ||
return { typename, id: decoded.length > 2 ? decoded.slice(1).join(':') : id }; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
402556
5167