Skip to content

Commit 207a523

Browse files
committed
fix: do not import node-specific 'crypto' module in cruddl/core endpoint
We can't use the "crypto" global because it's still experimental in node -> back to the uuid npm package (we never removed it)
1 parent bfd5de0 commit 207a523

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/execution/execution-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { OperationDefinitionNode } from 'graphql';
22
import { AuthContext } from '../authorization/auth-basics';
3-
import { randomUUID } from 'crypto';
3+
import { v4 as uuidv4 } from 'uuid';
44

55
export type MutationMode = 'normal' | 'disallowed' | 'rollback';
66

@@ -180,6 +180,6 @@ export class UUIDGenerator implements IDGenerator {
180180
* Generates a random UUID
181181
*/
182182
generateID(): string {
183-
return randomUUID();
183+
return uuidv4();
184184
}
185185
}

0 commit comments

Comments
 (0)