We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b87d54 commit 662ec10Copy full SHA for 662ec10
src/main/java/graphql/relay/Relay.java
@@ -212,6 +212,9 @@ public String toGlobalId(String type, String id) {
212
213
public ResolvedGlobalId fromGlobalId(String globalId) {
214
String[] split = Base64.fromBase64(globalId).split(":", 2);
215
+ if (split.length != 2) {
216
+ throw new IllegalArgumentException(String.format("expecting a valid global id, got %s", globalId));
217
+ }
218
return new ResolvedGlobalId(split[0], split[1]);
219
}
220
0 commit comments