diff --git a/src/auth.js b/src/auth.js index 74b2a808..29697176 100644 --- a/src/auth.js +++ b/src/auth.js @@ -96,14 +96,14 @@ export const possiblyAddScopeDirective = ({ operationType === 'Delete' ) { return parseDirectiveSdl( - `@hasScope(scopes: ["${typeName}: ${operationType}"])` + `@hasScope(scopes: ["${typeName}:${operationType}"])` ); } } if (entityType === 'relation') { if (operationType === 'Add') operationType = 'Create'; else if (operationType === 'Remove') operationType = 'Delete'; - return `@hasScope(scopes: ["${typeName}: ${operationType}", "${relatedTypeName}: ${operationType}"])`; + return `@hasScope(scopes: ["${typeName}:${operationType}", "${relatedTypeName}:${operationType}"])`; } } return undefined;