From 2bf77a8df2675c55afd16dddc2420c1ebbaf20d2 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Fri, 2 Oct 2020 17:16:17 +0100 Subject: [PATCH] fix(dates): consolidates date formatting to ISO strings --- modules/auth/graph/schemas/apps.graphql | 2 +- modules/core/graph/schemas/apitoken.graphql | 14 +++++++------- .../core/graph/schemas/branchesAndCommits.graphql | 4 ++-- modules/core/graph/schemas/streams.graphql | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/auth/graph/schemas/apps.graphql b/modules/auth/graph/schemas/apps.graphql index 5d02343b1..3368e3cf9 100644 --- a/modules/auth/graph/schemas/apps.graphql +++ b/modules/auth/graph/schemas/apps.graphql @@ -20,7 +20,7 @@ type ServerApp { public: Boolean trustByDefault: Boolean author: AppAuthor - createdAt: String! + createdAt: DateTime! redirectUrl: String! scopes: [Scope]! } diff --git a/modules/core/graph/schemas/apitoken.graphql b/modules/core/graph/schemas/apitoken.graphql index 80be9609e..186adc523 100644 --- a/modules/core/graph/schemas/apitoken.graphql +++ b/modules/core/graph/schemas/apitoken.graphql @@ -1,9 +1,9 @@ -extend type User{ +extend type User{ """ Returns a list of your personal api tokens. """ apiTokens: [ApiToken] - @hasRole(role: "server:user") + @hasRole(role: "server:user") @hasScope(scope: "tokens:read") } @@ -12,7 +12,7 @@ type ApiToken { name: String! lastChars: String! scopes: [String]! - createdAt: String! #date + createdAt: DateTime! #date lifespan: BigInt! lastUsed: String! #date } @@ -23,17 +23,17 @@ input ApiTokenCreateInput { lifespan: BigInt } -extend type Mutation { +extend type Mutation { """ Creates an personal api token. """ apiTokenCreate(token: ApiTokenCreateInput!):String! - @hasRole(role: "server:user") + @hasRole(role: "server:user") @hasScope(scope: "tokens:write") """ Revokes (deletes) an personal api token. """ apiTokenRevoke(token: String!):Boolean! - @hasRole(role: "server:user") + @hasRole(role: "server:user") @hasScope(scope: "tokens:write") -} \ No newline at end of file +} diff --git a/modules/core/graph/schemas/branchesAndCommits.graphql b/modules/core/graph/schemas/branchesAndCommits.graphql index df851f79c..fbc476e67 100644 --- a/modules/core/graph/schemas/branchesAndCommits.graphql +++ b/modules/core/graph/schemas/branchesAndCommits.graphql @@ -24,7 +24,7 @@ type Commit { message: String authorName: String authorId: String - createdAt: String + createdAt: DateTime } type CommitCollectionUserNode { @@ -64,7 +64,7 @@ extend type Mutation { branchDelete( branch: BranchDeleteInput! ): Boolean! @hasRole(role: "server:user") @hasScope(scope: "streams:write") - + commitCreate( commit: CommitCreateInput! ): String! @hasRole(role: "server:user") @hasScope(scope: "streams:write") diff --git a/modules/core/graph/schemas/streams.graphql b/modules/core/graph/schemas/streams.graphql index f353d4b62..b7ba2b201 100644 --- a/modules/core/graph/schemas/streams.graphql +++ b/modules/core/graph/schemas/streams.graphql @@ -16,8 +16,8 @@ type Stream { name: String! description: String isPublic: Boolean! - createdAt: String! - updatedAt: String! + createdAt: DateTime! + updatedAt: DateTime! collaborators: [ StreamCollaborator ]! }