diff --git a/src/graphql/mutation/article-from-draft.ts b/src/graphql/mutation/article-from-draft.ts new file mode 100644 index 00000000..882e49f0 --- /dev/null +++ b/src/graphql/mutation/article-from-draft.ts @@ -0,0 +1,28 @@ +import { gql } from '@urql/core' + +export default gql` + mutation ShoutFromDraftMutation($draft: Int!) { + draftToShout(draft: $draft) { + error + shout { + _id: slug + slug + title + subtitle + body + topics { + # id + title + slug + } + authors { + id + name + slug + userpic + caption + } + } + } + } +` diff --git a/src/graphql/query/my-collabs.ts b/src/graphql/query/my-drafts.ts similarity index 80% rename from src/graphql/query/my-collabs.ts rename to src/graphql/query/my-drafts.ts index bf78e8f8..b5dd8c1a 100644 --- a/src/graphql/query/my-collabs.ts +++ b/src/graphql/query/my-drafts.ts @@ -1,8 +1,8 @@ import { gql } from '@urql/core' export default gql` - query GetCollabsQuery { - getCollabs { + query MyDraftsQuery { + loadDrafts { authors { id slug diff --git a/src/graphql/query/my-feed.ts b/src/graphql/query/my-feed.ts new file mode 100644 index 00000000..dee34894 --- /dev/null +++ b/src/graphql/query/my-feed.ts @@ -0,0 +1,43 @@ +import { gql } from '@urql/core' + +export default gql` + query MyFeedQuery($options: LoadShoutsOptions) { + myFeed(options: $options) { + _id: slug + id + title + subtitle + slug + layout + cover + # community + mainTopic + topics { + # id + title + body + slug + stat { + _id: shouts + shouts + authors + followers + } + } + authors { + id + name + slug + userpic + } + createdAt + publishedAt + stat { + _id: viewed + viewed + reacted + rating + } + } + } +`