diff --git a/server/src/typeDefs.js b/server/src/typeDefs.js index 6f0f5f1..7b85468 100644 --- a/server/src/typeDefs.js +++ b/server/src/typeDefs.js @@ -3,7 +3,7 @@ import { gql } from 'apollo-server' const typeDefs = gql` type Query { "Returns only a few fields of a user" - basicUser(sAMAccountName: String!): User! @cacheControl(maxAge: 350) + basicUser(sAMAccountName: String!): User! @cacheControl(maxAge: 10) "The authenticated user" me: User! @auth @@ -15,20 +15,20 @@ const typeDefs = gql` limit: Int = 15 "Should return only students?" onlyStudents: Boolean = false - ): [User!] @auth(roles: ["servant"]) @cacheControl(maxAge: 350) + ): [User!] @auth(roles: ["servant"]) @cacheControl(maxAge: 10) "A single user" user(sAMAccountName: String!): User! @auth(roles: ["superAdmin"]) - @cacheControl(maxAge: 350) + @cacheControl(maxAge: 10) "AD groups" groups(where: GroupWhereInput!, limit: Int = 10): [Group!]! @auth(roles: ["servant"]) - @cacheControl(maxAge: 350) + @cacheControl(maxAge: 10) "Current stats. Differs from the historical statistics." - stats: Stats! @cacheControl(maxAge: 30) + stats: Stats! "Users who has some device currently connected to Wi-Fi" userPresence(search: String = ""): [UserPresence!] @auth(roles: ["watcher"]) @@ -38,14 +38,10 @@ const typeDefs = gql` search: String = "" identifiedOnly: Boolean = false nonIdentifiedOnly: Boolean = false - ): [WifiDevice]! - @cacheControl(maxAge: 10, scope: PRIVATE) - @auth(roles: ["superAdmin"]) + ): [WifiDevice]! @auth(roles: ["superAdmin"]) "Users that uses the Wi-Fi" - wifiUsers: [User]! - @auth(roles: ["superAdmin"]) - @cacheControl(maxAge: 10, scope: PRIVATE) + wifiUsers: [User]! @auth(roles: ["superAdmin"]) "Application Logs" logs( @@ -53,9 +49,7 @@ const typeDefs = gql` dateIn: String dateOut: String limit: Int = 200 - ): [Log]! - @auth(roles: ["superAdmin"]) - @cacheControl(maxAge: 2, scope: PRIVATE) + ): [Log]! @auth(roles: ["superAdmin"]) pAHosts: [PAHost!]! @auth(roles: ["superAdmin"]) }