Skip to content

Commit

Permalink
Merge branch 'fix/875' into fix/register-email
Browse files Browse the repository at this point in the history
  • Loading branch information
thom4parisot authored Dec 19, 2024
2 parents e423294 + cd1a6b0 commit f1622a3
Show file tree
Hide file tree
Showing 52 changed files with 801 additions and 1,101 deletions.
2 changes: 1 addition & 1 deletion front/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
{{/if}}
</head>
<body>
<div id="root" aria-live style="height: 100%"></div>
<div id="root" style="height: 100%;"></div>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script type="module" src="./src/index.jsx"></script>
</body>
Expand Down
129 changes: 121 additions & 8 deletions front/src/components/Article.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
fragment articleBasicFields on Article {
_id
title
updatedAt

owner {
_id
displayName
username
}

contributors {
user {
_id
email
username
displayName
}
}
}

fragment articleDetailedFields on Article {
...articleBasicFields

tags {
_id
color
name
}

versions {
_id
message
revision
version
type
createdAt
}

workspaces {
_id
color
name
}

corpuses {
_id
name
}
}

fragment articleVersionFields on Article {
versions {
_id
message
revision
version
type
createdAt
}
}

query renameArticle($article: ID!, $title: String!) {
article(article: $article) {
rename(title: $title)

...articleDetailedFields
}
}

Expand All @@ -12,14 +76,7 @@ query linkToZotero($article: ID!, $zotero: String!) {

query getArticleVersions($articleId: ID!) {
article(article: $articleId) {
versions {
_id
message
revision
version
type
createdAt
}
...articleVersionFields
}
}

Expand All @@ -33,6 +90,44 @@ query getArticleWorkspaces($articleId: ID!) {
}
}

query getArticleDetails($articleId: ID!, $corpusFilters: FilterCorpusInput) {
article(article: $articleId) {
...articleDetailedFields
}

tags {
_id
name
color
}

workspaces {
_id
name
color
}

corpus(filter: $corpusFilters) {
_id
name
description
creator {
_id
displayName
username
email
}
metadata
articles {
article {
_id
}
}
createdAt
updatedAt
}
}

query getArticleContributors($articleId: ID!) {
article(article: $articleId) {
contributors {
Expand Down Expand Up @@ -108,3 +203,21 @@ mutation startCollaborativeSession($articleId: ID!) {
}
}
}

mutation addArticleToWorkspace($workspaceId: ID!, $articleId: ID!) {
workspace(workspaceId: $workspaceId) {
addArticle(articleId: $articleId) {
_id
}
}
}

mutation removeArticleFromWorkspace($workspaceId: ID!, $articleId: ID!) {
workspace(workspaceId: $workspaceId) {
article(articleId: $articleId) {
remove {
_id
}
}
}
}
Loading

0 comments on commit f1622a3

Please sign in to comment.