From 99f473873a680eb8fa67a67fa0b0c267f57d54a5 Mon Sep 17 00:00:00 2001 From: izzy lyseggen Date: Thu, 20 Aug 2020 10:00:26 +0100 Subject: [PATCH] fix(subs): remove redundant stream sub defs --- modules/core/graph/schemas/streams.graphql | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/core/graph/schemas/streams.graphql b/modules/core/graph/schemas/streams.graphql index 7c91a2084..1acbf1552 100644 --- a/modules/core/graph/schemas/streams.graphql +++ b/modules/core/graph/schemas/streams.graphql @@ -88,7 +88,9 @@ extend type Subscription { """ Subscribes to new stream created event for a given user. """ - userStreamCreated( ownerId: String! ): JSONObject @hasRole(role: "server:user") @hasScope(scope: "profile:read") + userStreamCreated( ownerId: String! ): JSONObject + @hasRole(role: "server:user") + @hasScope(scope: "profile:read") # Source: # - stream delete mutation (target: all stream users in acl) @@ -98,21 +100,15 @@ extend type Subscription { """ Subscribes to stream deleted event for a given user. """ - userStreamCreated( ownerId: String! ): JSONObject - # TODO: how should auth be enforced for this? + userStreamDeleted( ownerId: String! ): JSONObject @hasRole(role: "server:user") + @hasScope(scope: "profile:read") """ Subscribes to stream updated event. """ streamUpdated( streamId: String! ): JSONObject @hasRole(role: "server:user") """ - Subscribes to stream deleted event. (do we want this for streamId?) - """ - userStreamDeleted( ownerId: String! ): JSONObject - # TODO: how should auth be enforced for this? - @hasRole(role: "server:user") - """ Subscribes to stream permission granted event. """ streamPermissionGranted( userId: String! ): JSONObject